static struct pbl_uart_sf32lb_state sym##_sf32lb_state; \
__VA_OPT__( \
.uart =
PBL_UART_INIT(sym, _name,
nullptr, &pbl_uart_sf32lb_ops, _baudrate), \
.state = &sym##_sf32lb_state, \
.base = (_base), \
.irq = (_irq), \
.clk = _clk, \
.rx_dma = PBL_UART_SF32LB_FIRST_(__VA_ARGS__ __VA_OPT__(, ) nullptr), \
.rx_buf = PBL_UART_SF32LB_FIRST_(__VA_OPT__(sym##_rx_buf, ) nullptr), \
}; \
0)
#define PBL_DEVICE_INSTANCE(sym, type, class_type, member)
Start the definition of a registered instance, followed by its initializer.
Definition device.h:243
#define PBL_PINCTRL(_default, _sleep, _reg)
Initializer for a struct pbl_pinctrl.
Definition pinctrl.h:132
SF32LB serial port.
Definition sf32lb.h:48
#define PBL_UART_SF32LB_RX_BUF_SIZE
Size of the receive buffer of a port with a receive DMA channel, in bytes.
Definition sf32lb.h:38
void pbl_uart_sf32lb_irq_handler(const struct pbl_uart_sf32lb *uart)
USART interrupt handler, connected by PBL_UART_SF32LB_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 PBL_DCACHE_LINE_SIZE
Data cache line size in bytes, 1 without a data cache.
Definition cache.h:40
#define PBL_ALIGNED(bytes)
Align the symbol or type.
Definition compiler.h:87
Define a serial port on an SF32LB USART.