30 #include "pprzlink/intermcu_msg.h"
33 #ifndef INTERMCU_DL_UPDATE_DL
34 #define INTERMCU_DL_UPDATE_DL TRUE
42 #ifdef TELEMETRY_INTERMCU_DEV
44 #ifdef DOWNLINK_TRANSPORT
47 #error "TELEMETRY_INTERMCU_DEV is defined but not DOWNLINK_TRANSPORT"
59 struct pprzlink_msg pmsg;
62 pmsg.sender_id = pprzlink_get_msg_sender_id(
msg);
63 pmsg.receiver_id = pprzlink_get_msg_receiver_id(
msg);
64 pmsg.component_id = pprzlink_get_msg_component_id(
msg);
66 if (trans->check_available_space(&pmsg, _FD_ADDR, size)) {
67 trans->count_bytes(&pmsg, size);
68 trans->start_message(&pmsg, _FD, size);
69 trans->put_bytes(&pmsg, _FD, DL_TYPE_UINT8, DL_FORMAT_ARRAY, (
void *)
msg, size);
70 trans->end_message(&pmsg, _FD);
72 trans->overrun(&pmsg);
Handling of messages coming from ground and other A/Cs.
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
void intermcu_dl_repack(struct transport_tx *trans, struct link_device *dev, uint8_t *msg, uint8_t size)
Repack message with same header and send on selected link if possible.
void intermcu_dl_on_msg(uint8_t *msg, uint8_t size)
function to forward telemetry from AP to the ground
void intermcu_dl_init(void)
Init function.
struct intermcu_dl_t intermcu_dl
datalink forwarder for InterMCU
struct link_device * dev
Device structure for communication.
struct transport_tx * trans
Forwarding transport.
static const struct usb_device_descriptor dev
Periodic telemetry system header (includes downlink utility and generated code).
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.