Go to the documentation of this file.
25 #ifndef HAL_UART_LLD_H
26 #define HAL_UART_LLD_H
28 #if (HAL_USE_UART == TRUE) || defined(__DOXYGEN__)
47 #if !defined(PLATFORM_UART_USE_UART1) || defined(__DOXYGEN__)
48 #define PLATFORM_UART_USE_UART1 FALSE
146 #if (UART_USE_WAIT == TRUE) || defined(__DOXYGEN__)
160 #if (UART_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__)
166 #if defined(UART_DRIVER_EXT_FIELDS)
167 UART_DRIVER_EXT_FIELDS
180 #if (PLATFORM_UART_USE_UART1 == TRUE) && !defined(__DOXYGEN__)
Structure representing an UART driver.
uartcb_t rxend_cb
Receive buffer filled callback.
void uart_lld_start(UARTDriver *uartp)
Configures and activates the UART peripheral.
const UARTConfig * config
Current configuration data.
uartccb_t rxchar_cb
Character received while out if the UART_RECEIVE state.
void(* uartecb_t)(UARTDriver *uartp, uartflags_t e)
Receive error UART notification callback type.
size_t uart_lld_stop_receive(UARTDriver *uartp)
Stops any ongoing receive operation.
uarttxstate_t txstate
Transmitter state.
void uart_lld_stop(UARTDriver *uartp)
Deactivates the UART peripheral.
Driver configuration structure.
uartstate_t
Driver state machine possible states.
bool early
Synchronization flag for transmit operations.
void(* uartcb_t)(UARTDriver *uartp)
Generic UART notification callback type.
size_t uart_lld_stop_send(UARTDriver *uartp)
Stops any ongoing transmission.
uarttxstate_t
Transmitter state machine states.
Structure representing a thread.
thread_reference_t threadrx
Waiting thread on RX.
void uart_lld_start_receive(UARTDriver *uartp, size_t n, void *rxbuf)
Starts a receive operation on the UART peripheral.
void(* uartccb_t)(UARTDriver *uartp, uint16_t c)
Character received UART notification callback type.
uint32_t uartflags_t
UART driver condition flags type.
void uart_lld_init(void)
Low level UART driver initialization.
uartrxstate_t
Receiver state machine states.
uartrxstate_t rxstate
Receiver state.
void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf)
Starts a transmission on the UART peripheral.
thread_reference_t threadtx
Waiting thread on TX.
UARTDriver UARTD1
UART1 driver identifier.
uartcb_t txend1_cb
End of transmission buffer callback.
mutex_t mutex
Mutex protecting the peripheral.
uartcb_t txend2_cb
Physical end of transmission callback.
uartstate_t state
Driver state.
uartecb_t rxerr_cb
Receive error callback.