|
Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
Go to the source code of this file.
Data Structures | |
| struct | UART_Dev_State_t |
| A structure to represent UART device state. More... | |
| struct | UART_Dev_LineInitData_t |
| A structure to represent UART initialization information. More... | |
| struct | UART_Device_t |
| A structure to represent UART device driver. More... | |
Macros | |
| #define | UART_BUFF_SIZE 256 |
Typedefs | |
| typedef const struct UART_Device_t | UART_Device_Type |
| typedef void(* | uart_cb_func_t) (UART_Device_Type *dev) |
| typedef const struct UART_Device_t | UART_Device_t |
| A structure to represent UART device driver. More... | |
Enumerations | |
| enum | UART_devBaudRate_t { UART_DEV_BAUDRATE_300, UART_DEV_BAUDRATE_600, UART_DEV_BAUDRATE_1200, UART_DEV_BAUDRATE_2400, UART_DEV_BAUDRATE_4800, UART_DEV_BAUDRATE_9600, UART_DEV_BAUDRATE_19200, UART_DEV_BAUDRATE_38400, UART_DEV_BAUDRATE_57600, UART_DEV_BAUDRATE_115200, UART_DEV_BAUDRATE_230400, UART_DEV_BAUDRATE_MAX = UART_DEV_BAUDRATE_230400 } |
| Enumeration for UART baud rate. More... | |
| enum | UART_Dev_Parity_t { UART_DEV_PARITY_BIT_EVEN, UART_DEV_PARITY_BIT_ODD } |
| Enumeration for UART parity bit. More... | |
Functions | |
| int32_t | UART_devInit (UART_Device_t *dev, UART_devBaudRate_t rate, UART_Dev_LineInitData_t *init) |
| Initialize UART device. More... | |
| UART_Device_t * | UART_devRequest (const char *name) |
| Request an UART device. More... | |
| int32_t | UART_devDataReceived (UART_Device_t *dev) |
| Get the number of bytes received. More... | |
| int32_t | UART_devDataPendingTX (UART_Device_t *dev) |
| Check the number of bytes pending on TX. More... | |
| int32_t | UART_devSendByte (UART_Device_t *dev, uint8_t *data, uint32_t len) |
| Send data to UART device. More... | |
| int32_t | UART_devReceiveByte (UART_Device_t *dev, uint8_t *data, uint32_t len) |
| Receive data to UART device. More... | |
| int32_t | UART_devCheckError (UART_Device_t *dev) |
| Check UART device for error. More... | |
| int32_t | UART_devResetDevice (UART_Device_t *dev) |
| Reset UART device. More... | |
| int32_t | UART_devClearBuffer (UART_Device_t *dev) |
| Clear data buffer in UART device driver. More... | |
| int32_t | UART_devRegisterCallback (UART_Device_t *dev, uint32_t size, void *cb) |
| Register a call back function to UART device driver. More... | |
This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.
| #define UART_BUFF_SIZE 256 |
| typedef void(* uart_cb_func_t) (UART_Device_Type *dev) |
| typedef const struct UART_Device_t UART_Device_t |
A structure to represent UART device driver.
| typedef const struct UART_Device_t UART_Device_Type |
| enum UART_Dev_Parity_t |
| enum UART_devBaudRate_t |
Enumeration for UART baud rate.
| int32_t UART_devCheckError | ( | UART_Device_t * | dev | ) |
Check UART device for error.
| dev | Pointer to UART Device structure |
| int32_t UART_devClearBuffer | ( | UART_Device_t * | dev | ) |
Clear data buffer in UART device driver.
| dev | Pointer to UART Device structure |
| int32_t UART_devDataPendingTX | ( | UART_Device_t * | dev | ) |
Check the number of bytes pending on TX.
| dev | Pointer to UART Device structure. |
| int32_t UART_devDataReceived | ( | UART_Device_t * | dev | ) |
Get the number of bytes received.
| dev | Pointer to UART Device structure. |
| int32_t UART_devInit | ( | UART_Device_t * | dev, |
| UART_devBaudRate_t | rate, | ||
| UART_Dev_LineInitData_t * | init | ||
| ) |
Initialize UART device.
| dev | Pointer to UART Device structure |
| rate | Baud Rate |
| init | Pointer to initial data structure |
| int32_t UART_devReceiveByte | ( | UART_Device_t * | dev, |
| uint8_t * | data, | ||
| uint32_t | len | ||
| ) |
Receive data to UART device.
| dev | Pointer to UART Device structure. |
| data | Pointer to the data memory to store the received data. |
| len | The size of the data memory. |
| int32_t UART_devRegisterCallback | ( | UART_Device_t * | dev, |
| uint32_t | size, | ||
| void * | cb | ||
| ) |
Register a call back function to UART device driver.
| dev | Pointer to UART Device structure |
| size | The size of the data block received to trigger the callback. |
| cb | The pointer to the call back function. |
| UART_Device_t* UART_devRequest | ( | const char * | name | ) |
Request an UART device.
| name | Name string of the UART device. |
| int32_t UART_devResetDevice | ( | UART_Device_t * | dev | ) |
Reset UART device.
| dev | Pointer to UART Device structure |
| int32_t UART_devSendByte | ( | UART_Device_t * | dev, |
| uint8_t * | data, | ||
| uint32_t | len | ||
| ) |
Send data to UART device.
| dev | Pointer to UART Device structure. |
| data | Pointer to the data memory to be sent. |
| len | The size of the data memory. |
1.8.9.1