![]() |
EVE 1.0
|
Abstract UART driver header. More...
#include <core/clk.h>
#include <core/pm.h>
#include <core/uwork.h>
#include <dev/data-buffer.h>
#include <hal/nrf_uarte.h>
#include <lib/assert.h>
Go to the source code of this file.
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.
Definition in file uart.h.