This module performs serial input/output functionalities via UART.
void sio2host_deinit |
( |
void |
| ) |
|
DeInitializes the Serial IO Module.
void sio2host_disable |
( |
void |
| ) |
|
Disables the Serial IO Module.
- Returns
- void
void sio2host_enable |
( |
void |
| ) |
|
Enables the Serial IO Module.
- Returns
- void
uint8_t sio2host_getchar |
( |
void |
| ) |
|
This function performs a blocking character receive functionality.
- Returns
- returns the data which is received
int sio2host_getchar_nowait |
( |
void |
| ) |
|
This function performs a non-blocking character receive functionality.
- Returns
- '-1' if no data is recieved or returns the data if a character is received
void sio2host_init |
( |
void |
| ) |
|
Initializes the Serial IO Module.
- Returns
- STATUS_OK for successful initialization and FAILURE incase the IO is not initialized
void sio2host_putchar |
( |
uint8_t |
| ) |
|
This function prints the character to the host.
- Returns
- void
uint8_t sio2host_rx |
( |
uint8_t * |
data, |
|
|
uint8_t |
max_length |
|
) |
| |
Receives data from UART.
- Parameters
-
data | pointer to the buffer where the received data is to be stored |
max_length | maximum length of data to be received |
- Returns
- actual number of bytes received
uint8_t sio2host_tx |
( |
uint8_t * |
data, |
|
|
uint8_t |
length |
|
) |
| |
Transmits data via UART.
- Parameters
-
data | Pointer to the buffer where the data to be transmitted is present |
length | Number of bytes to be transmitted |
- Returns
- Number of bytes actually transmitted