![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Frame transmission via UART + DMA, synchronised with a CMSIS-RTOS2 semaphore. More...
Go to the source code of this file.
Macros | |
| #define | TLM_UART_BUF 256u |
Functions | |
| int | tlm_uart_init (UART_HandleTypeDef *huart) |
| int | tlm_uart_send (const uint8_t *buf, uint16_t len, uint32_t timeout_ms) |
| Non-blocking beyond timeout_ms: if the previous DMA has not finished, the frame is dropped. | |
| void | tlm_uart_tx_cplt_isr (UART_HandleTypeDef *huart) |
| To be called from HAL_UART_TxCpltCallback() (see 03 - Docs/firmware/build.md) | |
| uint32_t | tlm_uart_dropped (void) |
Variables | |
| static UART_HandleTypeDef * | s_huart |
| static osSemaphoreId_t | s_txFree |
| static uint8_t | s_dmaBuf [TLM_UART_BUF] |
| static volatile uint32_t | s_dropped |
Frame transmission via UART + DMA, synchronised with a CMSIS-RTOS2 semaphore.
Definition in file tlm_uart.c.
| #define TLM_UART_BUF 256u |
Definition at line 9 of file tlm_uart.c.
| int tlm_uart_init | ( | UART_HandleTypeDef * | huart | ) |
Definition at line 16 of file tlm_uart.c.
References s_huart, and s_txFree.
Referenced by TelemetryTask().
| int tlm_uart_send | ( | const uint8_t * | buf, |
| uint16_t | len, | ||
| uint32_t | timeout_ms | ||
| ) |
Non-blocking beyond timeout_ms: if the previous DMA has not finished, the frame is dropped.
Definition at line 23 of file tlm_uart.c.
References s_dmaBuf, s_dropped, s_huart, s_txFree, and TLM_UART_BUF.
Referenced by tx_frame().
| void tlm_uart_tx_cplt_isr | ( | UART_HandleTypeDef * | huart | ) |
To be called from HAL_UART_TxCpltCallback() (see 03 - Docs/firmware/build.md)
Definition at line 36 of file tlm_uart.c.
References s_huart, and s_txFree.
Referenced by app_uart_tx_cplt().
| uint32_t tlm_uart_dropped | ( | void | ) |
Definition at line 41 of file tlm_uart.c.
References s_dropped.
Referenced by send_status().
|
static |
Definition at line 11 of file tlm_uart.c.
Referenced by tlm_uart_init(), tlm_uart_send(), and tlm_uart_tx_cplt_isr().
|
static |
Definition at line 12 of file tlm_uart.c.
Referenced by tlm_uart_init(), tlm_uart_send(), and tlm_uart_tx_cplt_isr().
|
static |
Definition at line 13 of file tlm_uart.c.
Referenced by tlm_uart_send().
|
static |
Definition at line 14 of file tlm_uart.c.
Referenced by tlm_uart_dropped(), and tlm_uart_send().