36 #ifdef __IEEE_BIG_ENDIAN
37 #define Swap32IfBigEndian(_u) { _u = (_u << 32) | (_u >> 32); }
39 #define Swap32IfBigEndian(_) {}
43 #include "dl_protocol.h"
68 EXTERN bool_t datalink_enabled;
76 if (!datalink_enabled) {
89 #if defined DATALINK && DATALINK == PPRZ
91 #define DatalinkEvent() { \
92 PprzCheckAndParse(PPRZ_UART, pprz_tp); \
96 #elif defined DATALINK && DATALINK == XBEE
98 #define DatalinkEvent() { \
99 XBeeCheckAndParse(XBEE_UART, xbee_tp); \
103 #elif defined DATALINK && DATALINK == W5100
105 #define DatalinkEvent() { \
106 W5100CheckAndParse(W5100, pprz_tp); \
110 #elif defined DATALINK && DATALINK == SUPERBITRF
112 #define DatalinkEvent() { \
113 SuperbitRFCheckAndParse(); \
117 #elif defined DATALINK && DATALINK == BLUEGIGA
119 #define DatalinkEvent() { \
120 BlueGigaCheckAndParse(DOWNLINK_DEVICE, pprz_tp); \
127 #define DatalinkEvent() {}
EXTERN uint8_t dl_buffer[MSG_SIZE]
EXTERN uint16_t datalink_time
time in seconds since last datalink message was received
static void DlCheckAndParse(void)
Check for new message and parse.
EXTERN bool_t dl_msg_available
Flag provided to control calls to dl_parse_msg.
EXTERN uint16_t datalink_nb_msgs
number of datalink/uplink messages received
EXTERN void dl_parse_msg(void)
Should be called when chars are available in dl_buffer.