|
SmartSnippets DA1459x SDK
|
Go to the documentation of this file.
47 #if dg_configUART_ADAPTER
65 #ifndef CONFIG_UART_USE_ASYNC_TRANSACTIONS
66 #define CONFIG_UART_USE_ASYNC_TRANSACTIONS (1)
77 #ifndef CONFIG_UART_USE_SYNC_TRANSACTIONS
78 #define CONFIG_UART_USE_SYNC_TRANSACTIONS (1)
81 #if (CONFIG_UART_USE_SYNC_TRANSACTIONS == 0) && (CONFIG_UART_USE_ASYNC_TRANSACTIONS == 0)
82 #error "At least one macro CONFIG_UART_USE_SYNC_TRANSACTIONS or CONFIG_UART_USE_ASYNC_TRANSACTIONS must be set"
118 AD_UART_ERROR_CONFIG_TX_SIZE = -9,
165 typedef void *ad_uart_handle_t;
239 #if (CONFIG_UART_USE_SYNC_TRANSACTIONS == 1)
255 int ad_uart_write(ad_uart_handle_t handle,
const char *wbuf,
size_t wlen);
277 int ad_uart_read(ad_uart_handle_t handle,
char *rbuf,
size_t rlen, OS_TICK_TIME timeout);
280 #if (CONFIG_UART_USE_ASYNC_TRANSACTIONS == 1)
ad_io_conf_t ctsn
Definition: ad_uart.h:140
UART controller configuration.
Definition: ad_uart.h:158
Definition: ad_uart.h:125
int ad_uart_complete_async_write(ad_uart_handle_t handle)
Finish asynchronous write.
Definition of API for the DMA Low Level Driver.
void(* ad_uart_user_cb)(void *user_data, uint16_t transferred)
Asynchronous callback function.
Definition: ad_uart.h:89
Definition: ad_uart.h:122
int ad_uart_read(ad_uart_handle_t handle, char *rbuf, size_t rlen, OS_TICK_TIME timeout)
Perform a blocking read transaction.
int ad_uart_complete_async_read(ad_uart_handle_t handle)
Finish asynchronous read.
UART configuration structure definition.
Definition: hw_uart.h:258
ad_io_conf_t rtsn
Definition: ad_uart.h:139
Definition: ad_uart.h:120
int ad_uart_write(ad_uart_handle_t handle, const char *wbuf, size_t wlen)
Perform a blocking write transaction.
UART I/O configuration.
Definition: ad_uart.h:136
void ad_uart_init(void)
Initialize UART adapter.
Definition: ad_uart.h:127
OS abstraction layer API.
Definition: ad_uart.h:121
Definition: ad_uart.h:123
int ad_uart_read_async(ad_uart_handle_t handle, char *rbuf, size_t rlen, ad_uart_user_cb cb, void *user_data)
Perform a non blocking read transaction.
const ad_uart_driver_conf_t * drv
Definition: ad_uart.h:161
Adapters shared definitions.
AD_IO_CONF_STATE
Adapters IO configuration state.
Definition: ad.h:65
Definition: ad_uart.h:109
AD_UART_RES_TYPE
UART resource types.
Definition: ad_uart.h:94
int ad_uart_write_async(ad_uart_handle_t handle, const char *wbuf, size_t wlen, ad_uart_user_cb cb, void *user_data)
Perform a non blocking write transaction.
HW_UART_ID ad_uart_get_hw_uart_id(ad_uart_handle_t handle)
Get UART controller id.
AD_UART_ERROR
UART adapter error codes.
Definition: ad_uart.h:117
int ad_uart_io_config(HW_UART_ID id, const ad_uart_io_conf_t *io, AD_IO_CONF_STATE state)
Initialize controller pins to on / off io configuration.
Definition: ad_uart.h:102
Definition: ad_uart.h:119
Definition: ad_uart.h:106
Definition: ad_uart.h:124
int ad_uart_reconfig(ad_uart_handle_t handle, const ad_uart_driver_conf_t *ad_drv)
Reconfigure UART controller.
int ad_uart_close(ad_uart_handle_t handle, bool force)
Close UART controller.
Definition of API for the UART Low Level Driver.
ad_io_conf_t tx
Definition: ad_uart.h:138
Definition: ad_uart.h:126
Adapters IO configuration.
Definition: ad.h:104
const ad_uart_io_conf_t * io
Definition: ad_uart.h:160
ad_uart_handle_t ad_uart_open(const ad_uart_controller_conf_t *ad_uart_ctrl_conf)
Open UART controller.
UART driver configuration.
Definition: ad_uart.h:148