Platform drivers for Mbed.
Dependents: EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more
uart.cpp File Reference
Implementation of UART Mbed platform driver interfaces. More...
Go to the source code of this file.
Functions | |
int32_t | uart_read (struct uart_desc *desc, uint8_t *data, uint32_t bytes_number) |
Read data from UART device. | |
int32_t | uart_write (struct uart_desc *desc, const uint8_t *data, uint32_t bytes_number) |
Write data to UART device. | |
int32_t | uart_read_nonblocking (struct uart_desc *desc, uint8_t *data, uint32_t bytes_number) |
Submit reading buffer to the UART driver. | |
int32_t | uart_write_nonblocking (struct uart_desc *desc, const uint8_t *data, uint32_t bytes_number) |
Submit writting buffer to the UART driver. | |
int32_t | uart_init (struct uart_desc **desc, struct uart_init_param *param) |
Initialize the UART communication peripheral. | |
int32_t | uart_remove (struct uart_desc *desc) |
Free the resources allocated by uart_init(). | |
uint32_t | uart_get_errors (struct uart_desc *desc) |
Get number of UART errors. |
Detailed Description
Implementation of UART Mbed platform driver interfaces.
Copyright (c) 2021 Analog Devices, Inc. All rights reserved.
This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.
Definition in file uart.cpp.
Function Documentation
uint32_t uart_get_errors | ( | struct uart_desc * | desc ) |
int32_t uart_init | ( | struct uart_desc ** | desc, |
struct uart_init_param * | param | ||
) |
int32_t uart_read | ( | struct uart_desc * | desc, |
uint8_t * | data, | ||
uint32_t | bytes_number | ||
) |
int32_t uart_read_nonblocking | ( | struct uart_desc * | desc, |
uint8_t * | data, | ||
uint32_t | bytes_number | ||
) |
Submit reading buffer to the UART driver.
Buffer is used until bytes_number bytes are read.
- Parameters:
-
desc,: Descriptor of the UART device data,: Buffer where data will be read bytes_number,: Number of bytes to be read.
- Returns:
- SUCCESS in case of success, FAILURE otherwise.
int32_t uart_remove | ( | struct uart_desc * | desc ) |
Free the resources allocated by uart_init().
- Parameters:
-
desc - The UART descriptor.
- Returns:
- SUCCESS in case of success, FAILURE otherwise.
int32_t uart_write | ( | struct uart_desc * | desc, |
const uint8_t * | data, | ||
uint32_t | bytes_number | ||
) |
int32_t uart_write_nonblocking | ( | struct uart_desc * | desc, |
const uint8_t * | data, | ||
uint32_t | bytes_number | ||
) |
Submit writting buffer to the UART driver.
Data from the buffer is sent over the UART, the function returns imediatly.
- Parameters:
-
desc,: Descriptor of the UART device data,: Buffer where data will be written bytes_number,: Number of bytes to be written.
- Returns:
- SUCCESS in case of success, FAILURE otherwise.
Generated on Wed Jul 13 2022 14:37:51 by 1.7.2