UART driver for the nRF54L UARTE peripheral.
More...
UART driver for the nRF54L UARTE peripheral.
Bytes are sent one at a time through EasyDMA. Reception runs through EasyDMA into the two halves of a receive buffer in turn, each ending when its half is full or the line idles: only then does EasyDMA write out the bytes it holds. Odd parity and flow control are not supported.
TX is an output, idle high. RX is an input with its wiring flags, e.g. a pull, connected when reception first starts. An instance connects its interrupt itself, with priority CONFIG_UART_NRF54L_IRQ_PRIO:
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:158
#define PBL_UART_NRF54L_DEFINE(sym, _name, _base, _irq, _baudrate, _tx, _rx)
Define a serial port on an nRF54L UARTE instance.
Definition nrf54l.h:73
◆ pbl_uart_nrf54l
| Data Fields |
|
uintptr_t |
base |
Registers. |
|
pbl_irq_t |
irq |
Interrupt line. |
|
struct pbl_gpio |
rx |
RX pin. |
|
struct pbl_uart_nrf54l_state * |
state |
Driver runtime state. |
|
struct pbl_gpio |
tx |
TX pin. |
|
struct pbl_uart |
uart |
Serial port. |
◆ PBL_UART_NRF54L_DEFINE
| #define PBL_UART_NRF54L_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_base, |
|
|
|
_irq, |
|
|
|
_baudrate, |
|
|
|
_tx, |
|
|
|
_rx |
|
) |
| |
Value:
static struct pbl_uart_nrf54l_state sym##_nrf54l_state; \
.uart =
PBL_UART_INIT(sym, _name,
nullptr, &pbl_uart_nrf54l_ops, _baudrate), \
.state = &sym##_nrf54l_state, \
.base = (_base), \
.irq = (_irq), \
.tx = _tx, \
.rx = _rx, \
}; \
0)
nRF54L serial port.
Definition nrf54l.h:43
void pbl_uart_nrf54l_irq_handler(const struct pbl_uart_nrf54l *uart)
UARTE interrupt handler, connected by PBL_UART_NRF54L_DEFINE().
A serial port.
Definition uart.h:135
#define PBL_UART_STATE_DEFINE(sym)
Define the class state of port sym, for the PBL_UART_*_DEFINE() macro of a driver.
Definition uart.h:151
#define PBL_UART_INIT(sym, _name, _parent, _ops, _baudrate)
Initializer for the struct pbl_uart of port sym.
Definition uart.h:164
Define a serial port on an nRF54L UARTE instance.
- Parameters
-
| sym | Symbol of the port. |
| _name | Name. |
| _base | Registers. |
| _irq | Interrupt line. |
| _baudrate | Initial baud rate, in bits per second. |
| _tx | TX pin, from PBL_GPIO(). |
| _rx | RX pin, from PBL_GPIO(). |
◆ PBL_UART_NRF54L_RX_BUF_SIZE
| #define PBL_UART_NRF54L_RX_BUF_SIZE 256U |
Size of the receive buffer, in bytes.
◆ pbl_uart_nrf54l_irq_handler()