![]() |
EVE 1.0
|
|
Modules | |
| nRF52 UART driver | |
| SC16IS7x0 UART driver | |
Data Structures | |
| struct | uart_state_t |
| struct | uart_api_t |
| struct | uart_t |
Typedefs | |
| typedef void(* | uart_rx_callback_t) (const struct uart_t *Uart, void *CallbackData, enum uart_rx_status_t RxStatus) |
| typedef void(* | uart_tx_callback_t) (const struct uart_t *Uart, void *CallbackData) |
| typedef void(* | uart_break_callback_t) (const struct uart_t *Uart, void *CallbackData) |
| typedef void(* | uart_init_t) (const struct uart_t *Uart) |
Enumerations |
Functions | |
| static void | UartInit (const struct uart_t *Uart) |
| Name: UartInit Initializes Uart. More... | |
| static void | UartDisable (const struct uart_t *Uart) |
| Name: UartDisable Disables UART. More... | |
| static uint32_t | UartDmaBytesReceived (const struct uart_t *Uart) |
| Name: UartDmaBytesReceived Will return number of received bytes for current DMA transfer. More... | |
| static void | UartStartBasicTx (const struct uart_t *Uart, uint8_t *DataSrc, uint16_t DataSize, uart_tx_callback_t Callback, void *CallbackData) |
| Name: UartStartBasicTx Transmit data using DMA transfer in basic mode. Using primary DMA descriptor only. More... | |
| static void | UartStartPingPongTx (const struct uart_t *Uart, uint8_t *PrimDataSrc, uint16_t PrimDataSize, uint8_t *AltDataSrc, uint16_t AltDataSize, uart_tx_callback_t Callback, void *CallbackData) |
| Name: UartStartPingPongTx Transmit data using DMA transfer in PingPong mode. Will alternate between primary and alternate DMA descriptor. More... | |
| static void | UartRefreshPingPongTx (const struct uart_t *Uart, uint8_t *DataSrc, uint16_t DataSize, bool Stop) |
| Name: UartRefreshPingPongTx Refresh transmit of data using DMA transfer in PingPong mode. More... | |
| static struct data_buffer_t * | UartGetTxBuffer (const struct uart_t *Uart) |
| Name: UartGetTxBuffer Returns the current TX buffer. More... | |
| static void | UartStartBasicRx (const struct uart_t *Uart, uint8_t *DataDest, uint16_t DataSize, uart_rx_callback_t Callback, void *CallbackData) |
| Name: UartStartBasicRx Receive data using DMA transfer in basic mode. Using primary DMA descriptor only. More... | |
| static void | UartStartPingPongRx (const struct uart_t *Uart, uint8_t *PrimDataDest, uint16_t PrimDataSize, uint8_t *AltDataDest, uint16_t AltDataSize, uart_rx_callback_t Callback, void *CallbackData) |
| Name: UartStartPingPongRx Receive data using DMA transfer in PingPong mode. Will alternate between primary and alternate DMA descriptor. More... | |
| static void | UartRefreshPingPongRx (const struct uart_t *Uart, uint8_t *DataDest, uint16_t DataSize, bool Stop) |
| Name: UartRefreshPingPongRx Refresh of receive data using DMA transfer in PingPong mode. Will alternate between primary and alternate DMA descriptor. More... | |
| static const struct data_buffer_t * | UartGetRxBuffer (const struct uart_t *Uart) |
| Name: UartGetRxBuffer Returns the current RX buffer. More... | |
| static void | UartResetFifo (const struct uart_t *Uart, bool Tx, bool Rx) |
| Name: UartResetFifo Resets FIFO buffer for Tx or Rx or both. NB: Resetting Rx FIFO stops receiving. More... | |
| static void | UartCancelRx (const struct uart_t *Uart) |
| Name: UartCancelRx Shuts down DMA, flushes FIFO and disables RX interrupts for the UART. More... | |
| static bool | UartIsBusyRx (const struct uart_t *Uart) |
| Name: UartIsBusyRx Returns busy status of the UART RX path. More... | |
| static void | UartCancelTx (const struct uart_t *Uart) |
| Name: UartCancelTx Shuts down DMA, flushes FIFO and disables TX interrupts for the UART. More... | |
| static bool | UartIsBusyTx (const struct uart_t *Uart) |
| Name: UartIsBusyTx Returns busy status of the UART TX path. More... | |
| static void | UartSetBaudrate (const struct uart_t *Uart, uint32_t Baudrate) |
| Name: UartSetBaudrate Sets new baudrate to the UART Note that in many situation Rx timeout settings must be adjusted simultaneously (use UartSetRxTimeouts function) More... | |
| static void | UartSetRxTimeouts (const struct uart_t *Uart, uint32_t RxStartTimeoutUs, uint32_t RxStopTimeoutUs) |
| Name: UartSetRxTimeouts Sets timeout values for the UART Calling code can use value UART_RX_TIMEOUT_DEFAULT as default value. More... | |
| static void | UartSendBreak (const struct uart_t *Uart, uart_break_callback_t Callback, void *CallbackData) |
| Sends break (sets TX to logic 0 for a time of 1 byte transmission) More... | |
| static void | UartSetRts (const struct uart_t *Uart, bool Active) |
| Manually drives RTS pin. HW flow control must be off to use this function. More... | |
Abstract UART driver header.
This UART driver provides common interface to various UART block(s). Functionality included:
| typedef void(* uart_rx_callback_t) (const struct uart_t *Uart, void *CallbackData, enum uart_rx_status_t RxStatus) |
| typedef void(* uart_tx_callback_t) (const struct uart_t *Uart, void *CallbackData) |
| typedef void(* uart_break_callback_t) (const struct uart_t *Uart, void *CallbackData) |
| typedef void(* uart_init_t) (const struct uart_t *Uart) |
| enum uart_flow_control_t |
| enum uart_parity_t |
| enum uart_stops_t |
| enum uart_rx_status_t |
Status of finished Rx operation
| anonymous enum |
| enum uart_wordlen_t |
|
inlinestatic |
Name: UartInit
Initializes Uart.
| Uart | UART parameters to be used. |
Definition at line 247 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartDisable
Disables UART.
| Uart | UART parameters to be used. |
Definition at line 260 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartDmaBytesReceived
Will return number of received bytes for current DMA transfer.
| Uart | UART parameters to be used. |
Definition at line 273 of file uart.h.
References data_buffer_t::Pos, uart_state_t::RxBuffer, uart_state_t::RxBufIndex, and uart_t::State.
|
inlinestatic |
Name: UartStartBasicTx
Transmit data using DMA transfer in basic mode. Using primary DMA descriptor only.
| Uart | UART parameters to be used. |
| DataSrc | Source address for DMA transfer |
| DataSize | Number of DMA transfer bytes. Range: 1 through 255 |
| Callback | User-defined function to be called at completion |
| CallbackData | User-defined data for the completion callback |
Definition at line 292 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartStartPingPongTx
Transmit data using DMA transfer in PingPong mode. Will alternate between primary and alternate DMA descriptor.
| Uart | UART parameters to be used. |
| PrimDataSrc | Source address for DMA transfer using primary descriptor |
| PrimDataSize | Number of DMA transfer bytes using primary descriptor. Range: 1 through 1024 |
| AltDataSrc | Source address for DMA transfer using alternate descriptor |
| AltDataSize | Number of DMA transfer bytes using alternate descriptor. Range: 1 through 1024 |
| Callback | User-defined function to be called at completion |
| CallbackData | User-defined data for the completion callback |
Definition at line 314 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartRefreshPingPongTx
Refresh transmit of data using DMA transfer in PingPong mode.
| Uart | UART parameters to be used. |
| DataSrc | Source address for DMA transfer. NULL to leave descriptor as is. |
| DataSize | Number of DMA transfer bytes. Range: 1 through 1024 |
| Stop | Indicate that DMA transfer shall stop after using this descriptor. |
Definition at line 335 of file uart.h.
References uart_state_t::Uart.
|
static |
Name: UartGetTxBuffer
Returns the current TX buffer.
| Uart | UART parameters to be used. |
Definition at line 350 of file uart.h.
References uart_t::State, uart_state_t::TxBuffer, and uart_state_t::TxBufIndex.
|
inlinestatic |
Name: UartStartBasicRx
Receive data using DMA transfer in basic mode. Using primary DMA descriptor only.
| Uart | UART parameters to be used. |
| DataDest | Destination address for DMA transfer |
| DataSize | Number of DMA transfer bytes. Range: 1 through 1024 |
| Callback | User-defined function to be called at completion or timeout |
| CallbackData | User-defined data for the completion callback |
Definition at line 369 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartStartPingPongRx
Receive data using DMA transfer in PingPong mode. Will alternate between primary and alternate DMA descriptor.
| Uart | UART parameters to be used. |
| PrimDataDest | Destination address for DMA transfer using primary descriptor |
| PrimDataSize | Number of DMA transfer bytes using primary descriptor. Range: 1 through 1024 |
| AltDataDest | Destination address for DMA transfer using alternate descriptor |
| AltDataSize | Number of DMA transfer bytes using alternate descriptor. Range: 1 through 1024 |
| Callback | User-defined function to be called at completion or timeout |
| CallbackData | User-defined data for the completion callback |
Definition at line 391 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartRefreshPingPongRx
Refresh of receive data using DMA transfer in PingPong mode. Will alternate between primary and alternate DMA descriptor.
| Uart | UART parameters to be used. |
| DataDest | Destination address for DMA transfer. NULL to leave descriptor as is. |
| DataSize | Number of DMA transfer bytes using primary descriptor. Range: 1 through 1024 |
| Stop | Indicate that DMA transfer shall stop after using this descriptor. |
Definition at line 413 of file uart.h.
References uart_state_t::Uart.
|
static |
Name: UartGetRxBuffer
Returns the current RX buffer.
| Uart | UART parameters to be used. |
Definition at line 428 of file uart.h.
References uart_state_t::RxBuffer, uart_state_t::RxBufIndex, and uart_t::State.
|
inlinestatic |
Name: UartResetFifo
Resets FIFO buffer for Tx or Rx or both.
NB: Resetting Rx FIFO stops receiving.
| Uart | UART parameters to be used. |
| Tx | Set to TRUE to reset Tx FIFO. |
| Rx | Set to TRUE to reset Rx FIFO. |
Definition at line 445 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartCancelRx
Shuts down DMA, flushes FIFO and disables RX interrupts for the UART.
| Uart | UART parameters to be used. |
Definition at line 458 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartIsBusyRx
Returns busy status of the UART RX path.
| Uart | UART parameters to be used. |
Definition at line 471 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartCancelTx
Shuts down DMA, flushes FIFO and disables TX interrupts for the UART.
| Uart | UART parameters to be used. |
Definition at line 483 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartIsBusyTx
Returns busy status of the UART TX path.
| Uart | UART parameters to be used. |
Definition at line 496 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Name: UartSetBaudrate
Sets new baudrate to the UART Note that in many situation Rx timeout settings must be adjusted simultaneously (use UartSetRxTimeouts function)
| Uart | UART parameters to be used. |
| Baudrate | New baudrate in bps. |
Definition at line 512 of file uart.h.
References uart_state_t::Baudrate, uart_t::State, and uart_state_t::Uart.
|
inlinestatic |
Name: UartSetRxTimeouts
Sets timeout values for the UART Calling code can use value UART_RX_TIMEOUT_DEFAULT as default value.
| Uart | UART parameters to be used. |
| RxStartTimeoutUs | Max time the driver will wait for the first symbol in the message. UART_RX_TIMEOUT_DEFAULT can be used to set the timeout to default. UART_RX_TIMEOUT_INFINITE can be used to disable the timeout. |
| RxStopTimeoutUs | Max time the driver will wait for the next symbol in the message UART_RX_TIMEOUT_DEFAULT can be used to set the timeout to default. UART_RX_TIMEOUT_INFINITE can be used to disable the timeout. |
Definition at line 533 of file uart.h.
References uart_state_t::RxStartTimeoutUs, uart_state_t::RxStopTimeoutUs, and uart_state_t::Uart.
|
inlinestatic |
Sends break (sets TX to logic 0 for a time of 1 byte transmission)
| Uart | UART parameters to be used. |
| Callback | Function to be called after the break signal is sent. |
| CallbackData | Pointer to the user data to be supplied as callback parameter. |
Definition at line 547 of file uart.h.
References uart_state_t::Uart.
|
inlinestatic |
Manually drives RTS pin. HW flow control must be off to use this function.
| Uart | UART parameters to be used. |
| Active | TRUE: set RTS active (logic 0) FALSE: set RTS passive (logical 1) |
Definition at line 562 of file uart.h.
References uart_state_t::Uart.