Detailed Description
Common APIs used by high level application to use this USB host class. These routines are used by memory to transfer its data to/from USB CDC endpoint.
See Quick start guide for USB host Communication Device Class module (UHI CDC).
Function Documentation
void uhi_cdc_close |
( |
uint8_t |
port |
) |
|
Close a port.
- Parameters:
-
| port | Communication port number |
Definition at line 821 of file uhi_cdc.c.
uint32_t uhi_cdc_get_nb_received |
( |
uint8_t |
port |
) |
|
This function returns the number of character available on the CDC line.
- Parameters:
-
| port | Communication port number |
- Returns:
- the number of data received
Definition at line 832 of file uhi_cdc.c.
int uhi_cdc_getc |
( |
uint8_t |
port |
) |
|
Waits and gets a value on CDC line.
- Parameters:
-
| port | Communication port number |
- Returns:
- value read on CDC line
Definition at line 848 of file uhi_cdc.c.
bool uhi_cdc_is_rx_ready |
( |
uint8_t |
port |
) |
|
This function checks if a character has been received on the CDC line.
- Parameters:
-
| port | Communication port number |
- Returns:
true
if a byte is ready to be read.
Definition at line 827 of file uhi_cdc.c.
bool uhi_cdc_is_tx_ready |
( |
uint8_t |
port |
) |
|
This function checks if a new character sent is possible The type int is used to support scanf redirection from compiler LIB.
- Parameters:
-
| port | Communication port number |
- Returns:
true
if a new character can be sent
Definition at line 942 of file uhi_cdc.c.
bool uhi_cdc_open |
( |
uint8_t |
port, |
|
|
CDCLineCoding * |
configuration | |
|
) |
| | |
Open a port of UHI CDC interface.
- Parameters:
-
| port | Communication port number |
| configuration | Pointer on port configuration |
- Returns:
true
if the port is available
Definition at line 808 of file uhi_cdc.c.
int uhi_cdc_putc |
( |
uint8_t |
port, |
|
|
int |
value | |
|
) |
| | |
Puts a byte on CDC line The type int is used to support printf redirection from compiler LIB.
- Parameters:
-
| port | Communication port number |
| value | Value to put |
- Returns:
true
if function was successfully done, otherwise false
.
Definition at line 958 of file uhi_cdc.c.
uint32_t uhi_cdc_read_buf |
( |
uint8_t |
port, |
|
|
void * |
buf, |
|
|
uint32_t |
size | |
|
) |
| | |
Reads a RAM buffer on CDC line.
- Parameters:
-
| port | Communication port number |
| buf | Values read |
| size | Number of value read |
- Returns:
- the number of data remaining
Definition at line 894 of file uhi_cdc.c.
uint32_t uhi_cdc_write_buf |
( |
uint8_t |
port, |
|
|
const void * |
buf, |
|
|
uint32_t |
size | |
|
) |
| | |
Writes a RAM buffer on CDC line.
- Parameters:
-
| port | Communication port number |
| buf | Values to write |
| size | Number of value to write |
- Returns:
- the number of data remaining
Definition at line 1003 of file uhi_cdc.c.