M471M/R1/S BSP V3.01.000
The Board Support Package for M4521
Macros | Functions | Variables
USB Host CDC Driver Exported Functions
Collaboration diagram for USB Host CDC Driver Exported Functions:

Macros

#define USB_XFER_TIMEOUT   100
 

Functions

int32_t usbh_cdc_get_line_coding (CDC_DEV_T *cdev, LINE_CODING_T *line_code)
 GET_LINE_CODING request. More...
 
int32_t usbh_cdc_set_line_coding (CDC_DEV_T *cdev, LINE_CODING_T *line_code)
 SET_LINE_CODING request. More...
 
int32_t usbh_cdc_set_control_line_state (CDC_DEV_T *cdev, int active_carrier, int DTE_present)
 SET_CONTROL_LINE_STATE request. More...
 
HIDDEN_SYMBOLS int32_t usbh_cdc_start_polling_status (CDC_DEV_T *cdev, CDC_CB_FUNC *func)
 Start purge the CDC device's interrupt-in transfer pipe. More...
 
static void cdc_bulk_in_irq (UTR_T *utr)
 
int32_t usbh_cdc_start_to_receive_data (CDC_DEV_T *cdev, CDC_CB_FUNC *func)
 HIDDEN_SYMBOLS. More...
 
static void cdc_bulk_out_irq (UTR_T *utr)
 
int32_t usbh_cdc_send_data (CDC_DEV_T *cdev, uint8_t *buff, int buff_len)
 Send a block of data via CDC device's bulk-out transfer pipe. More...
 

Variables

static volatile int bulk_out_done
 

Detailed Description

Macro Definition Documentation

◆ USB_XFER_TIMEOUT

#define USB_XFER_TIMEOUT   100

Definition at line 37 of file cdc_core.c.

Function Documentation

◆ cdc_bulk_in_irq()

static void cdc_bulk_in_irq ( UTR_T *  utr)
static

Definition at line 275 of file cdc_core.c.

Here is the caller graph for this function:

◆ cdc_bulk_out_irq()

static void cdc_bulk_out_irq ( UTR_T *  utr)
static

Definition at line 370 of file cdc_core.c.

Here is the caller graph for this function:

◆ usbh_cdc_get_line_coding()

int32_t usbh_cdc_get_line_coding ( CDC_DEV_T cdev,
LINE_CODING_T line_code 
)

GET_LINE_CODING request.

Parameters
[in]cdevCDC device
[out]line_codeThe currently configured line coding.
Returns
Success or not.
Return values
0Success
OtherwiseFailed

Definition at line 49 of file cdc_core.c.

◆ usbh_cdc_send_data()

int32_t usbh_cdc_send_data ( CDC_DEV_T cdev,
uint8_t *  buff,
int  buff_len 
)

Send a block of data via CDC device's bulk-out transfer pipe.

Parameters
[in]cdevCDC device
[in]buffBuffer contains the data block to be send.
[in]buff_lenLength in byte of data to be send
Returns
Success or not.
Return values
0Success
OtherwiseFailed

Definition at line 384 of file cdc_core.c.

Here is the call graph for this function:

◆ usbh_cdc_set_control_line_state()

int32_t usbh_cdc_set_control_line_state ( CDC_DEV_T cdev,
int  active_carrier,
int  DTE_present 
)

SET_CONTROL_LINE_STATE request.

Parameters
[in]cdevCDC device
[in]active_carrierCarrier control for half duplex modems is activated or not.
[in]DTE_presentIndicates to DCE if DTE is present or not.
Returns
Success or not.
Return values
0Success
OtherwiseFailed

Definition at line 137 of file cdc_core.c.

◆ usbh_cdc_set_line_coding()

int32_t usbh_cdc_set_line_coding ( CDC_DEV_T cdev,
LINE_CODING_T line_code 
)

SET_LINE_CODING request.

Parameters
[in]cdevCDC device
[in]line_codeThe line coding configuration to be set.
Returns
Success or not.
Return values
0Success
OtherwiseFailed

Definition at line 87 of file cdc_core.c.

◆ usbh_cdc_start_polling_status()

HIDDEN_SYMBOLS int32_t usbh_cdc_start_polling_status ( CDC_DEV_T cdev,
CDC_CB_FUNC func 
)

Start purge the CDC device's interrupt-in transfer pipe.

Parameters
[in]cdevCDC device
[in]funcThe interrupt in data receiver callback function.
Returns
Success or not.
Return values
0Success
OtherwiseFailed

Definition at line 214 of file cdc_core.c.

◆ usbh_cdc_start_to_receive_data()

int32_t usbh_cdc_start_to_receive_data ( CDC_DEV_T cdev,
CDC_CB_FUNC func 
)

HIDDEN_SYMBOLS.

Make CDC device start to receive data from bulk-in transfer pipe.

Parameters
[in]cdevCDC device
[in]funcThe BULK in data receiver callback function.
Returns
Success or not.
Return values
0Success
OtherwiseFailed

Definition at line 307 of file cdc_core.c.

Here is the call graph for this function:

Variable Documentation

◆ bulk_out_done

volatile int bulk_out_done
static

Definition at line 369 of file cdc_core.c.