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); \
#define MORA_STATUS_MSG_SIZE
struct dc_shot_union::@293 data
void parse_mora(struct mora_transport *t, uint8_t c)
#define MORA_SHOOT_MSG_SIZE
uint8_t bin[MORA_SHOOT_MSG_SIZE]
struct mora_status_union::mora_status_struct data
uint8_t bin[MORA_STATUS_MSG_SIZE]
struct mora_transport mora_protocol
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.