21#ifndef __xwcd_ds_uart_controller_h__
22#define __xwcd_ds_uart_controller_h__
101#define XWDS_UART_RXQ_SIZE XWCDCFG_ds_UART_RXQ_SIZE
355 return ((50U == baudrate) || (75U == baudrate) || (110U == baudrate) ||
356 (134U == baudrate) || (150U == baudrate) || (200U == baudrate) ||
357 (300U == baudrate) || (600U == baudrate) || (1200U == baudrate) ||
358 (1800U == baudrate) || (2400U == baudrate) || (4800U == baudrate) ||
359 (9600U == baudrate) || (19200U == baudrate) || (38400U == baudrate) ||
360 (57600U == baudrate) || (115200U == baudrate) ||
361 (230400U == baudrate) || (460800U == baudrate) ||
362 (576000U == baudrate) || (921600U == baudrate) ||
363 (1000000U == baudrate) || (1152000U == baudrate) ||
364 (1500000U == baudrate) || (2000000U == baudrate) ||
365 (2500000U == baudrate) || (3000000U == baudrate) ||
366 (3500000U == baudrate) || (4000000U == baudrate));
xwer_t xwds_uartc_grab(struct xwds_uartc *uartc)
增加对象的引用计数
static bool xwds_uart_tst_baudrate(xwu32_t baudrate)
测试UART波特率是否合法
xwer_t xwds_uartc_tx(struct xwds_uartc *uartc, const xwu8_t *data, xwsz_t *size, xwtm_t to)
XWDS API:同步发送
void xwds_uartc_drvcb_rxq_pub(struct xwds_uartc *uartc, xwsq_t tail)
XWDS Driver Callback:发布数据到接收队列
xwds_uart_bits_em
UART字长枚举
xwds_uart_parity_em
UART奇偶校验枚举
xwer_t xwds_uartc_cfg(struct xwds_uartc *uartc, const struct xwds_uart_cfg *cfg)
XWDS API:配置UART
#define XWDS_UART_RXQ_SIZE
void xwds_uartc_destruct(struct xwds_uartc *uartc)
XWDS API:UART控制器对象的析构函数
xwer_t xwds_uartc_rx(struct xwds_uartc *uartc, xwu8_t *buf, xwsz_t *size, xwtm_t to)
XWDS API:从接收队列中获取数据
void xwds_uartc_construct(struct xwds_uartc *uartc)
XWDS API:UART控制器的构造函数
xwer_t xwds_uartc_eq(struct xwds_uartc *uartc, const xwu8_t *data, xwsz_t *size, xwds_uartc_eqcb_f cb)
XWDS API:异步发送
xwds_uart_hardwareflowcontrol_em
UART硬件流控枚举
xwer_t xwds_uartc_put(struct xwds_uartc *uartc)
减少对象的引用计数
xwds_uart_stopbits_em
UART停止位枚举
xwer_t xwds_uartc_putc(struct xwds_uartc *uartc, const xwu8_t byte, xwtm_t to)
XWDS API:直接发送一个字节(非DMA模式)
void(* xwds_uartc_eqcb_f)(struct xwds_uartc *, xwer_t)
异步发送的回调函数类型
xwds_uart_mode_em
UART模式枚举
xwsq_t xwds_uartc_drvcb_rxq_fill(struct xwds_uartc *uartc, xwu8_t bytes[], xwsz_t size)
XWDS Driver Callback:从UART硬件接收数据到缓冲区
void xwds_uartc_drvcb_rxq_flush(struct xwds_uartc *uartc)
XWDS Driver Callback:清空接收队列
xwer_t xwds_uartc_try_rx(struct xwds_uartc *uartc, xwu8_t *buf, xwsz_t *size)
XWDS API:尝试从接收队列中获取数据
#define __xwcc_alignl1cache
xws64_t xwtm_t
XWOS系统时间 (有符号)
struct xwds_uart_cfg::@26 bus
xwer_t(* eq)(struct xwds_uartc *, const xwu8_t *, xwsz_t *, xwds_uartc_eqcb_f)
xwer_t(* cfg)(struct xwds_uartc *, const struct xwds_uart_cfg *)
xwer_t(* tx)(struct xwds_uartc *, const xwu8_t *, xwsz_t *, xwtm_t)
xwer_t(* putc)(struct xwds_uartc *, const xwu8_t)
const struct xwds_resource_dma * txdmarsc
const struct xwds_resource_dma * rxdmarsc
struct xwds_uartc::@27 rxq
const struct xwds_uart_cfg * cfg