Common APIs used by high level application to use this USB class.
These routines are used to transfer and control data to/from USB CDC endpoint.
See Quick start guide for USB device Communication Class Device module (UDI CDC).
◆ udi_cdc_ctrl_signal_dcd()
void udi_cdc_ctrl_signal_dcd |
( |
bool |
b_set | ) |
|
Notify a state change of DCD signal.
- Parameters
-
b_set | DCD is enabled if true, else disabled |
Definition at line 781 of file udi_cdc.c.
◆ udi_cdc_ctrl_signal_dsr()
void udi_cdc_ctrl_signal_dsr |
( |
bool |
b_set | ) |
|
Notify a state change of DSR signal.
- Parameters
-
b_set | DSR is enabled if true, else disabled |
Definition at line 786 of file udi_cdc.c.
◆ udi_cdc_get_free_tx_buffer()
Gets the number of free byte in TX buffer.
- Returns
- the number of free byte in TX buffer
Definition at line 1035 of file udi_cdc.c.
◆ udi_cdc_get_nb_received_data()
Gets the number of byte received.
- Returns
- the number of data available
Definition at line 847 of file udi_cdc.c.
◆ udi_cdc_getc()
int udi_cdc_getc |
( |
void |
| ) |
|
Waits and gets a value on CDC line.
- Returns
- value read on CDC line
Definition at line 906 of file udi_cdc.c.
◆ udi_cdc_is_rx_ready()
bool udi_cdc_is_rx_ready |
( |
void |
| ) |
|
This function checks if a character has been received on the CDC line.
- Returns
1
if a byte is ready to be read.
Definition at line 857 of file udi_cdc.c.
◆ udi_cdc_is_tx_ready()
bool udi_cdc_is_tx_ready |
( |
void |
| ) |
|
This function checks if a new character sent is possible The type int is used to support scanf redirection from compiler LIB.
- Returns
1
if a new character can be sent
Definition at line 1045 of file udi_cdc.c.
◆ udi_cdc_multi_ctrl_signal_dcd()
void udi_cdc_multi_ctrl_signal_dcd |
( |
uint8_t |
port, |
|
|
bool |
b_set |
|
) |
| |
Notify a state change of DCD signal.
- Parameters
-
port | Communication port number to manage |
b_set | DCD is enabled if true, else disabled |
Definition at line 806 of file udi_cdc.c.
◆ udi_cdc_multi_ctrl_signal_dsr()
void udi_cdc_multi_ctrl_signal_dsr |
( |
uint8_t |
port, |
|
|
bool |
b_set |
|
) |
| |
Notify a state change of DSR signal.
- Parameters
-
port | Communication port number to manage |
b_set | DSR is enabled if true, else disabled |
Definition at line 811 of file udi_cdc.c.
◆ udi_cdc_multi_get_free_tx_buffer()
iram_size_t udi_cdc_multi_get_free_tx_buffer |
( |
uint8_t |
port | ) |
|
Gets the number of free byte in TX buffer.
- Parameters
-
port | Communication port number to manage |
- Returns
- the number of free byte in TX buffer
Definition at line 1006 of file udi_cdc.c.
◆ udi_cdc_multi_get_nb_received_data()
iram_size_t udi_cdc_multi_get_nb_received_data |
( |
uint8_t |
port | ) |
|
Gets the number of byte received.
- Parameters
-
port | Communication port number to manage |
- Returns
- the number of data available
Definition at line 831 of file udi_cdc.c.
◆ udi_cdc_multi_getc()
int udi_cdc_multi_getc |
( |
uint8_t |
port | ) |
|
Waits and gets a value on CDC line.
- Parameters
-
port | Communication port number to manage |
- Returns
- value read on CDC line
Definition at line 862 of file udi_cdc.c.
◆ udi_cdc_multi_is_rx_ready()
bool udi_cdc_multi_is_rx_ready |
( |
uint8_t |
port | ) |
|
This function checks if a character has been received on the CDC line.
- Parameters
-
port | Communication port number to manage |
- Returns
1
if a byte is ready to be read.
Definition at line 852 of file udi_cdc.c.
◆ udi_cdc_multi_is_tx_ready()
bool udi_cdc_multi_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 to manage |
- Returns
1
if a new character can be sent
Definition at line 1040 of file udi_cdc.c.
◆ udi_cdc_multi_putc()
int udi_cdc_multi_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 to manage |
value | Value to put |
- Returns
1
if function was successfully done, otherwise 0
.
Definition at line 1050 of file udi_cdc.c.
◆ udi_cdc_multi_read_buf()
Reads a RAM buffer on CDC line.
- Parameters
-
port | Communication port number to manage |
buf | Values read |
size | Number of values read |
- Returns
- the number of data remaining
Definition at line 911 of file udi_cdc.c.
◆ udi_cdc_multi_signal_framing_error()
void udi_cdc_multi_signal_framing_error |
( |
uint8_t |
port | ) |
|
Notify a framing error.
- Parameters
-
port | Communication port number to manage |
Definition at line 816 of file udi_cdc.c.
◆ udi_cdc_multi_signal_overrun()
void udi_cdc_multi_signal_overrun |
( |
uint8_t |
port | ) |
|
Notify a overrun.
- Parameters
-
port | Communication port number to manage |
Definition at line 826 of file udi_cdc.c.
◆ udi_cdc_multi_signal_parity_error()
void udi_cdc_multi_signal_parity_error |
( |
uint8_t |
port | ) |
|
Notify a parity error.
- Parameters
-
port | Communication port number to manage |
Definition at line 821 of file udi_cdc.c.
◆ udi_cdc_multi_write_buf()
Writes a RAM buffer on CDC line.
- Parameters
-
port | Communication port number to manage |
buf | Values to write |
size | Number of value to write |
- Returns
- the number of data remaining
Definition at line 1091 of file udi_cdc.c.
◆ udi_cdc_putc()
int udi_cdc_putc |
( |
int |
value | ) |
|
Puts a byte on CDC line The type int is used to support printf redirection from compiler LIB.
- Parameters
-
- Returns
1
if function was successfully done, otherwise 0
.
Definition at line 1086 of file udi_cdc.c.
◆ udi_cdc_read_buf()
Reads a RAM buffer on CDC line.
- Parameters
-
buf | Values read |
size | Number of value read |
- Returns
- the number of data remaining
Definition at line 1001 of file udi_cdc.c.
◆ udi_cdc_read_no_polling()
Non polling reads of a up to 'size' data from CDC line.
- Parameters
-
port | Communication port number to manage |
buf | Buffer where to store read data |
size | Maximum number of data to read (size of buffer) |
- Returns
- the number of data effectively read
Definition at line 996 of file udi_cdc.c.
◆ udi_cdc_signal_framing_error()
void udi_cdc_signal_framing_error |
( |
void |
| ) |
|
Notify a framing error.
Definition at line 791 of file udi_cdc.c.
◆ udi_cdc_signal_overrun()
void udi_cdc_signal_overrun |
( |
void |
| ) |
|
◆ udi_cdc_signal_parity_error()
void udi_cdc_signal_parity_error |
( |
void |
| ) |
|
Notify a parity error.
Definition at line 796 of file udi_cdc.c.
◆ udi_cdc_write_buf()
Writes a RAM buffer on CDC line.
- Parameters
-
buf | Values to write |
size | Number of value to write |
- Returns
- the number of data remaining
Definition at line 1146 of file udi_cdc.c.