37 #ifndef MORA_TRANSPORT_H
38 #define MORA_TRANSPORT_H
47 #define MORA_SHOOT_MSG_SIZE (4*10)
69 #define MORA_BUFFER_EMPTY 2
73 #define MORA_PAYLOAD 3
74 #define MORA_PAYLOAD_MSG_SIZE 70
80 #define MORA_STATUS_MSG_SIZE (4*2)
100 #define MoraSizeOf(_payload) (_payload+5)
102 #define MoraPutUint8( _byte) { \
103 mora_ck_a += _byte; \
104 mora_ck_b += mora_ck_a; \
105 CameraLinkTransmit(_byte); \
108 #define MoraHeader(msg_id, payload_len) { \
109 CameraLinkTransmit(STX); \
110 uint8_t msg_len = MoraSizeOf( payload_len); \
111 CameraLinkTransmit(msg_len); \
112 mora_ck_a = msg_len; mora_ck_b = msg_len; \
113 MoraPutUint8(msg_id); \
116 #define MoraTrailer() { \
117 CameraLinkTransmit(mora_ck_a); \
118 CameraLinkTransmit(mora_ck_b); \
121 #define MoraPut1ByteByAddr( _byte) { \
122 uint8_t _x = *(_byte); \
#define MORA_SHOOT_MSG_SIZE
uint8_t bin[MORA_STATUS_MSG_SIZE]
struct dc_shot_union::@15 data
uint8_t bin[MORA_SHOOT_MSG_SIZE]
struct mora_transport mora_protocol
void parse_mora(struct mora_transport *t, uint8_t c)
struct mora_status_union::mora_status_struct data
#define MORA_STATUS_MSG_SIZE