| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
Backend API for emulated UART. More...
Go to the source code of this file.
Typedefs | |
| typedef void(* | uart_emul_callback_tx_data_ready_t) (const struct device *dev, size_t size, void *user_data) | 
| Define the application callback function signature for uart_emul_callback_tx_data_ready_set() function.  More... | |
Functions | |
| void | uart_emul_callback_tx_data_ready_set (const struct device *dev, uart_emul_callback_tx_data_ready_t cb, void *user_data) | 
| Set the TX data ready callback.  More... | |
| uint32_t | uart_emul_put_rx_data (const struct device *dev, uint8_t *data, size_t size) | 
| Write (copy) data to RX buffer.  More... | |
| uint32_t | uart_emul_get_tx_data (const struct device *dev, uint8_t *data, size_t size) | 
| Read data from TX buffer.  More... | |
| uint32_t | uart_emul_flush_rx_data (const struct device *dev) | 
| Clear RX buffer content.  More... | |
| uint32_t | uart_emul_flush_tx_data (const struct device *dev) | 
| Clear TX buffer content.  More... | |
Backend API for emulated UART.
| typedef void(* uart_emul_callback_tx_data_ready_t) (const struct device *dev, size_t size, void *user_data) | 
Define the application callback function signature for uart_emul_callback_tx_data_ready_set() function.
| dev | UART device instance | 
| size | Number of available bytes in TX buffer | 
| user_data | Arbitrary user data | 
| void uart_emul_callback_tx_data_ready_set | ( | const struct device * | dev, | 
| uart_emul_callback_tx_data_ready_t | cb, | ||
| void * | user_data | ||
| ) | 
Set the TX data ready callback.
This sets up the callback that is called every time data was appended to the TX buffer.
| dev | The emulated UART device instance | 
| cb | Pointer to the callback function | 
| user_data | Data to pass to callback function | 
Clear RX buffer content.
| dev | The emulated UART device instance | 
Clear TX buffer content.
| dev | The emulated UART device instance | 
Read data from TX buffer.
| dev | The emulated UART device instance | 
| data | The address of the output buffer | 
| size | Number of bytes to read |