29 #ifndef TELEMETRY_COMMON_H
30 #define TELEMETRY_COMMON_H
47 #define TELEMETRY_NB_CBS 4
70 #if PERIODIC_TELEMETRY
74 uint8_t _id __attribute__((unused)),
telemetry_cb _cb __attribute__((unused))) {
return -1; }
77 #if USE_PERIODIC_TELEMETRY_REPORT
void periodic_telemetry_err_report(uint8_t _process, uint8_t _mode, uint8_t _id)
Send an error report when trying to send message that as not been register.
Generic transmission transport header.
Periodic telemetry structure.
uint8_t id
id of telemetry message
#define TELEMETRY_NB_CBS
number of callbacks that can be registered per msg
void(* telemetry_cb)(struct transport_tx *trans, struct link_device *dev)
Telemetry callback definition.
uint8_t nb
number of messages
static int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
const char telemetry_msg[64]
periodic telemetry msg name definition
static const struct usb_device_descriptor dev
struct telemetry_cb_slots * cbs
array of callbacks defined through TELEMETRY_MSG
telemetry_cb slots[TELEMETRY_NB_CBS]