![]() |
no-OS
|
Header file of UART interface. More...
Classes | |
| struct | no_os_uart_init_param |
| Structure holding the parameters for UART initialization. More... | |
| struct | no_os_uart_desc |
| Stucture holding the UART descriptor. More... | |
| struct | no_os_uart_platform_ops |
| Structure holding UART function pointers that point to the platform specific function. More... | |
Macros | |
| #define | UART_MAX_NUMBER 10 |
Enumerations | |
| enum | no_os_uart_size { NO_OS_UART_CS_5 , NO_OS_UART_CS_6 , NO_OS_UART_CS_7 , NO_OS_UART_CS_8 , NO_OS_UART_CS_9 } |
| UART character size (number of data bits) options. More... | |
| enum | no_os_uart_parity { NO_OS_UART_PAR_NO , NO_OS_UART_PAR_MARK , NO_OS_UART_PAR_SPACE , NO_OS_UART_PAR_ODD , NO_OS_UART_PAR_EVEN } |
| UART parity options. More... | |
| enum | no_os_uart_stop { NO_OS_UART_STOP_1_BIT , NO_OS_UART_STOP_2_BIT } |
| UART number of stop bits options. More... | |
Functions | |
| int32_t | no_os_uart_read (struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number) |
| Read data from UART. | |
| int32_t | no_os_uart_write (struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number) |
| Write to UART. | |
| int32_t | no_os_uart_read_nonblocking (struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number) |
| Read data from UART non-blocking. | |
| int32_t | no_os_uart_write_nonblocking (struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number) |
| Write to UART non-blocking. | |
| int32_t | no_os_uart_init (struct no_os_uart_desc **desc, const struct no_os_uart_init_param *param) |
| Initialize the UART communication peripheral. | |
| int32_t | no_os_uart_remove (struct no_os_uart_desc *desc) |
| Free the resources allocated by no_os_uart_init(). | |
| uint32_t | no_os_uart_get_errors (struct no_os_uart_desc *desc) |
| Check if errors occurred on UART. | |
| void | no_os_uart_stdio (struct no_os_uart_desc *desc) |
Header file of UART interface.
Copyright 2019(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| #define UART_MAX_NUMBER 10 |
| enum no_os_uart_parity |
| enum no_os_uart_size |
| enum no_os_uart_stop |
| uint32_t no_os_uart_get_errors | ( | struct no_os_uart_desc * | desc | ) |
Check if errors occurred on UART.
| desc | - The UART descriptor. |
Check if errors occurred on UART.
| desc | - The UART descriptor. |
| int32_t no_os_uart_init | ( | struct no_os_uart_desc ** | desc, |
| const struct no_os_uart_init_param * | param ) |
Initialize the UART communication peripheral.
| desc | - The UART descriptor. |
| param | - The structure that contains the UART parameters. |
| desc | - The UART descriptor. |
| param | - The structure that contains the UART parameters. |
| int32_t no_os_uart_read | ( | struct no_os_uart_desc * | desc, |
| uint8_t * | data, | ||
| uint32_t | bytes_number ) |
Read data from UART.
| desc | - The UART descriptor. |
| data | - The buffer with the received data. |
| bytes_number | - Number of bytes to read. |
Read data from UART.
| desc | - Instance of UART. |
| data | - Pointer to buffer containing data. |
| bytes_number | - Number of bytes to read. |
| int32_t no_os_uart_read_nonblocking | ( | struct no_os_uart_desc * | desc, |
| uint8_t * | data, | ||
| uint32_t | bytes_number ) |
Read data from UART non-blocking.
| desc | - The UART descriptor. |
| data | - The buffer with the received data. |
| bytes_number | - Number of bytes to read. |
Read data from UART non-blocking.
Buffer is used until bytes_number bytes are read.
| desc | Descriptor of the UART device |
| data | Buffer where data will be read |
| bytes_number | Number of bytes to be read. |
| int32_t no_os_uart_remove | ( | struct no_os_uart_desc * | desc | ) |
Free the resources allocated by no_os_uart_init().
| desc | - The UART descriptor. |
| desc | - The UART descriptor. |
| void no_os_uart_stdio | ( | struct no_os_uart_desc * | desc | ) |
| int32_t no_os_uart_write | ( | struct no_os_uart_desc * | desc, |
| const uint8_t * | data, | ||
| uint32_t | bytes_number ) |
Write to UART.
| desc | - The UART descriptor. |
| data | - The buffer with the transmitted data. |
| bytes_number | - Number of bytes to write. |
Write to UART.
| desc | - Instance of UART. |
| data | - Pointer to buffer containing data. |
| bytes_number | - Number of bytes to read. |
| int32_t no_os_uart_write_nonblocking | ( | struct no_os_uart_desc * | desc, |
| const uint8_t * | data, | ||
| uint32_t | bytes_number ) |
Write to UART non-blocking.
| desc | - The UART descriptor. |
| data | - The buffer with the transmitted data. |
| bytes_number | - Number of bytes to write. |
Write to UART non-blocking.
Data from the buffer is sent over the UART, the function returns imediatly.
| desc | Descriptor of the UART device |
| data | Buffer where data will be written |
| bytes_number | Number of bytes to be written. |