29 #include "pprzlink/pprz_transport.h"
30 #include "pprzlink/intermcu_msg.h"
40 struct link_device *
dev;
76 case DL_EMERGENCY_CMD:
102 #if PPRZLINK_DEFAULT_VER == 2
103 struct pprzlink_msg pmsg;
106 pmsg.sender_id =
ac_id;
107 pmsg.receiver_id = 0;
108 pmsg.component_id = 0;
110 trans->count_bytes(&pmsg, size);
111 trans->start_message(&pmsg, _FD, size);
112 trans->put_bytes(&pmsg, _FD, DL_TYPE_UINT8, DL_FORMAT_ARRAY, (
void *) msg, size);
113 trans->end_message(&pmsg, _FD);
115 trans->count_bytes(trans->impl, dev, trans->size_of(trans->impl, size));
116 trans->start_message(trans->impl, dev, 0, size);
117 trans->put_bytes(trans->impl, dev, 0, DL_TYPE_UINT8, DL_FORMAT_ARRAY, (
void *) msg, size);
118 trans->end_message(trans->impl, dev, 0);
void telemetry_intermcu_event(void)
struct link_device dev
Device structure for communication.
static void telemetry_intermcu_repack(struct transport_tx *trans, struct link_device *dev, uint8_t ac_id, uint8_t *msg, uint8_t size)
bool msg_received
Whenever a datalink message is received.
struct short_transport trans
Transport without any extra encoding.
struct link_device * device
Device used for communication.
Periodic telemetry system header (includes downlink utility and generated code).
struct intermcu_t intermcu
Telemetry through InterMCU.
struct link_device * dev
Device structure for communication.
static struct telemetry_intermcu_t telemetry_intermcu
fbw_mode_enum fbw_mode
Fly by wire modes.
uint8_t rx_buffer[MSG_SIZE]
Received bytes from datalink.
void telemetry_intermcu_init(void)
Rotorcraft Inter-MCU interface.
void telemetry_intermcu_on_msg(uint8_t *msg, uint8_t size)
struct pprz_transport transport
Transport over communication line (PPRZ)
static const struct usb_device_descriptor dev
void telemetry_intermcu_periodic(void)
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)