25 #if PERIODIC_TELEMETRY
32 #if PERIODIC_TELEMETRY
39 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
40 &ore, &ne_err, &fe_err, &_bus0);
49 #if PERIODIC_TELEMETRY
56 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
57 &ore, &ne_err, &fe_err, &_bus1);
66 #if PERIODIC_TELEMETRY
73 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
74 &ore, &ne_err, &fe_err, &_bus2);
83 #if PERIODIC_TELEMETRY
90 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
91 &ore, &ne_err, &fe_err, &_bus3);
100 #if PERIODIC_TELEMETRY
107 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
108 &ore, &ne_err, &fe_err, &_bus4);
117 #if PERIODIC_TELEMETRY
124 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
125 &ore, &ne_err, &fe_err, &_bus5);
134 #if PERIODIC_TELEMETRY
141 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
142 &ore, &ne_err, &fe_err, &_bus6);
151 #if PERIODIC_TELEMETRY
158 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
159 &ore, &ne_err, &fe_err, &_bus7);
167 #if PERIODIC_TELEMETRY
174 pprz_msg_send_UART_ERRORS(trans, dev, AC_ID,
175 &ore, &ne_err, &fe_err, &_bus8);
180 #if PERIODIC_TELEMETRY
181 static void send_uart_err(
struct transport_tx *trans __attribute__ ((unused)),
184 static uint8_t uart_nb_cnt = 0;
185 switch (uart_nb_cnt) {
188 send_uart0_err(trans,
dev);
break;
192 send_uart1_err(trans,
dev);
break;
196 send_uart2_err(trans,
dev);
break;
200 send_uart3_err(trans,
dev);
break;
204 send_uart4_err(trans,
dev);
break;
208 send_uart5_err(trans,
dev);
break;
212 send_uart6_err(trans,
dev);
break;
216 send_uart7_err(trans,
dev);
break;
220 send_uart8_err(trans,
dev);
break;
225 if (uart_nb_cnt == 9) {
250 #if PERIODIC_TELEMETRY
262 return (
uint16_t)(space - 1) >= len;
put_byte_t put_byte
put one byte
uint8_t rx_buf[UART_RX_BUFFER_SIZE]
Receive buffer.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
uint8_t(* get_byte_t)(void *)
static void null_function(struct uart_periph *p)
Generic transmission transport header.
check_free_space_t check_free_space
check if transmit buffer is not full
Periodic telemetry system header (includes downlink utility and generated code).
void WEAK uart_arch_init(void)
struct link_device device
Generic device interface.
#define UART_RX_BUFFER_SIZE
void * periph
pointer to parent implementation
void uart_periph_init(struct uart_periph *p)
#define DefaultPeriodic
Set default periodic telemetry.
get_byte_t get_byte
get a new char
int(* char_available_t)(void *)
uint8_t WEAK uart_getch(struct uart_periph *p)
bool_t uart_check_free_space(struct uart_periph *p, uint8_t len)
volatile uint16_t ne_err
noise error counter
volatile uint16_t fe_err
framing error counter
static const struct usb_device_descriptor dev
void(* put_byte_t)(void *, uint8_t)
uint16_t WEAK uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
void(* send_message_t)(void *)
int(* check_free_space_t)(void *, uint8_t)
Function pointers definition.
#define UART_TX_BUFFER_SIZE
char_available_t char_available
check if a new character is available
volatile uint16_t ore
overrun error counter
send_message_t send_message
send completed buffer
void uart_put_byte(struct uart_periph *periph, uint8_t data)
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.