37 #ifndef MORA_TRANSPORT_H
38 #define MORA_TRANSPORT_H
48 #define MORA_SHOOT_MSG_SIZE (4*10)
70 #define MORA_BUFFER_EMPTY 2
74 #define MORA_PAYLOAD 3
75 #define MORA_PAYLOAD_MSG_SIZE 70
81 #define MORA_STATUS_MSG_SIZE (4*2)
101 #define MoraSizeOf(_payload) (_payload+5)
103 #define MoraPutUint8( _byte) { \
104 mora_ck_a += _byte; \
105 mora_ck_b += mora_ck_a; \
106 CameraLinkTransmit(_byte); \
109 #define MoraHeader(msg_id, payload_len) { \
110 CameraLinkTransmit(STX); \
111 uint8_t msg_len = MoraSizeOf( payload_len); \
112 CameraLinkTransmit(msg_len); \
113 mora_ck_a = msg_len; mora_ck_b = msg_len; \
114 MoraPutUint8(msg_id); \
117 #define MoraTrailer() { \
118 CameraLinkTransmit(mora_ck_a); \
119 CameraLinkTransmit(mora_ck_b); \
122 #define MoraPut1ByteByAddr( _byte) { \
123 uint8_t _x = *(_byte); \
uint8_t bin[MORA_SHOOT_MSG_SIZE]
void parse_mora(struct mora_transport *t, uint8_t c)
uint8_t bin[MORA_STATUS_MSG_SIZE]
struct dc_shot_union::@278 data
#define MORA_STATUS_MSG_SIZE
struct mora_transport mora_protocol
#define MORA_SHOOT_MSG_SIZE
struct mora_status_union::mora_status_struct data