Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
|
|
3.0.0 |
Functions | |
int | uart_poll_in (const struct device *dev, unsigned char *p_char) |
Poll the device for input. More... | |
int | uart_poll_in_u16 (const struct device *dev, uint16_t *p_u16) |
Poll the device for wide data input. More... | |
void | uart_poll_out (const struct device *dev, unsigned char out_char) |
Output a character in polled mode. More... | |
void | uart_poll_out_u16 (const struct device *dev, uint16_t out_u16) |
Output wide data in polled mode. More... | |
#include <include/drivers/uart.h>
Poll the device for input.
dev | UART device instance. |
p_char | Pointer to character. |
0 | If a character arrived. |
-1 | If no character was available to read (i.e. the UART input buffer was empty). |
-ENOSYS | If the operation is not implemented. |
-EBUSY | If async reception was enabled using uart_rx_enable |
#include <include/drivers/uart.h>
Poll the device for wide data input.
dev | UART device instance. |
p_u16 | Pointer to 16-bit data. |
0 | If data arrived. |
-1 | If no data was available to read (i.e., the UART input buffer was empty). |
-ENOTSUP | If API is not enabled. |
-ENOSYS | If the function is not implemented. |
-EBUSY | If async reception was enabled using uart_rx_enable |
#include <include/drivers/uart.h>
Output a character in polled mode.
This routine checks if the transmitter is empty. When the transmitter is empty, it writes a character to the data register.
To send a character when hardware flow control is enabled, the handshake signal CTS must be asserted.
dev | UART device instance. |
out_char | Character to send. |
#include <include/drivers/uart.h>
Output wide data in polled mode.
This routine checks if the transmitter is empty. When the transmitter is empty, it writes a datum to the data register.
To send a datum when hardware flow control is enabled, the handshake signal CTS must be asserted.
dev | UART device instance. |
out_u16 | Wide data to send. |