Collaboration diagram for Implementation of UDI CDC:

Routines to control serial line

static uint8_t udi_cdc_setup_to_port (void)
 Returns the port number corresponding at current setup request. More...
 
static void udi_cdc_line_coding_received (void)
 Sends line coding to application. More...
 
static void udi_cdc_ctrl_state_change (uint8_t port, bool b_set, le16_t bit_mask)
 Records new state. More...
 
static void udi_cdc_ctrl_state_notify (uint8_t port, udd_ep_id_t ep)
 Check and eventually notify the USB host of new state. More...
 
static void udi_cdc_serial_state_msg_sent (udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
 Ack sent of serial state message Callback called after serial state message sent. More...
 

Routines to process data transfer

static bool udi_cdc_rx_start (uint8_t port)
 Enable the reception of data from the USB host. More...
 
static void udi_cdc_data_received (udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
 Update rx buffer management with a new data Callback called after data reception on USB line. More...
 
static void udi_cdc_data_sent (udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
 Ack sent of tx buffer Callback called after data transfer on USB line. More...
 
static void udi_cdc_tx_send (uint8_t port)
 Send buffer on line or wait a SOF event. More...
 

Detailed Description

Class internal implementation

Function Documentation

◆ udi_cdc_ctrl_state_change()

static void udi_cdc_ctrl_state_change ( uint8_t  port,
bool  b_set,
le16_t  bit_mask 
)
static

Records new state.

Parameters
portCommunication port number to manage
b_setState is enabled if true, else disabled
bit_maskField to process (see CDC_SERIAL_STATE_ defines)

Definition at line 481 of file udi_cdc.c.

◆ udi_cdc_ctrl_state_notify()

static void udi_cdc_ctrl_state_notify ( uint8_t  port,
udd_ep_id_t  ep 
)
static

Check and eventually notify the USB host of new state.

Parameters
portCommunication port number to manage
epPort communication endpoint

Definition at line 515 of file udi_cdc.c.

◆ udi_cdc_data_received()

static void udi_cdc_data_received ( udd_ep_status_t  status,
iram_size_t  n,
udd_ep_id_t  ep 
)
static

Update rx buffer management with a new data Callback called after data reception on USB line.

Parameters
statusUDD_EP_TRANSFER_OK, if transfer finish
statusUDD_EP_TRANSFER_ABORT, if transfer aborted
nnumber of data received

Definition at line 627 of file udi_cdc.c.

◆ udi_cdc_data_sent()

static void udi_cdc_data_sent ( udd_ep_status_t  status,
iram_size_t  n,
udd_ep_id_t  ep 
)
static

Ack sent of tx buffer Callback called after data transfer on USB line.

Parameters
statusUDD_EP_TRANSFER_OK, if transfer finished
statusUDD_EP_TRANSFER_ABORT, if transfer aborted
nnumber of data transfered

Definition at line 663 of file udi_cdc.c.

◆ udi_cdc_line_coding_received()

static void udi_cdc_line_coding_received ( void  )
static

Sends line coding to application.

Called after SETUP request when line coding data is received.

Definition at line 473 of file udi_cdc.c.

◆ udi_cdc_rx_start()

static bool udi_cdc_rx_start ( uint8_t  port)
static

Enable the reception of data from the USB host.

The value udi_cdc_rx_trans_sel indicate the RX buffer to fill.

Parameters
portCommunication port number to manage
Returns
1 if function was successfully done, otherwise 0.

Definition at line 577 of file udi_cdc.c.

◆ udi_cdc_serial_state_msg_sent()

static void udi_cdc_serial_state_msg_sent ( udd_ep_status_t  status,
iram_size_t  n,
udd_ep_id_t  ep 
)
static

Ack sent of serial state message Callback called after serial state message sent.

Parameters
statusUDD_EP_TRANSFER_OK, if transfer finished
statusUDD_EP_TRANSFER_ABORT, if transfer aborted
nnumber of data transfered

Definition at line 537 of file udi_cdc.c.

◆ udi_cdc_setup_to_port()

static uint8_t udi_cdc_setup_to_port ( void  )
static

Returns the port number corresponding at current setup request.

Returns
port number

Definition at line 455 of file udi_cdc.c.

◆ udi_cdc_tx_send()

static void udi_cdc_tx_send ( uint8_t  port)
static

Send buffer on line or wait a SOF event.

Parameters
portCommunication port number to manage

Definition at line 695 of file udi_cdc.c.



inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:18:01