37 #include "pprzlink/dl_protocol.h"
65 EXTERN bool datalink_enabled;
69 #define DatalinkFillDlBuffer(_buf, _len) { \
71 for (_i = 0; _i < _len; _i++) { \
72 dl_buffer[_i] = _buf[_i]; \
74 dl_msg_available = true; \
82 if (!datalink_enabled) {
91 *msg_available =
false;
EXTERN uint8_t dl_buffer[MSG_SIZE]
EXTERN bool dl_msg_available
Flag provided to control calls to dl_parse_msg.
EXTERN uint16_t datalink_time
time in seconds since last datalink message was received
EXTERN void firmware_parse_msg(struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
Firmware specfic msg handler.
EXTERN uint16_t datalink_nb_msgs
number of datalink/uplink messages received
EXTERN void dl_parse_msg(struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
Should be called when chars are available in dl_buffer.
static const struct usb_device_descriptor dev
static void DlCheckAndParse(struct link_device *dev, struct transport_tx *trans, uint8_t *buf, bool *msg_available)
Check for new message and parse.