RZT Flexible Software Package Documentation  Release v2.2.0

 
USB HCDC Interface

Detailed Description

Interface for USB HCDC functions.

Summary

The USB HCDC interface provides USB HCDC functionality.

Data Structures

struct  usb_hcdc_encapsulated_t
 
struct  usb_hcdc_abstractstate_t
 
struct  usb_hcdc_countrysetting_t
 
union  usb_hcdc_commfeature_t
 
struct  usb_hcdc_linecoding_t
 
struct  usb_hcdc_controllinestate_t
 
struct  usb_hcdc_serialstate_t
 
struct  usb_hcdc_breakduration_t
 
struct  usb_hcdc_device_info_t
 
struct  usb_hcdc_api_t
 
struct  usb_hcdc_instance_t
 

Enumerations

enum  usb_hcdc_data_bit_t
 
enum  usb_hcdc_stop_bit_t
 
enum  usb_hcdc_parity_bit_t
 
enum  usb_hcdc_line_speed_t
 
enum  usb_hcdc_feature_selector_t
 

Data Structure Documentation

◆ usb_hcdc_encapsulated_t

struct usb_hcdc_encapsulated_t

Encapsulated data

Data Fields
uint8_t * p_data Protocol dependent data.
uint16_t wlength Data length in bytes.

◆ usb_hcdc_abstractstate_t

struct usb_hcdc_abstractstate_t

Abstract Control Model (ACM) settings bitmap

Data Fields
uint16_t bis: 1 Idle enable.
uint16_t bdms: 1 Data multiplexing enable.
uint16_t rsv: 14 Reserved.

◆ usb_hcdc_countrysetting_t

struct usb_hcdc_countrysetting_t

Country code data

Data Fields
uint16_t country_code Country code.

◆ usb_hcdc_commfeature_t

union usb_hcdc_commfeature_t

Feature setting data

Data Fields
usb_hcdc_abstractstate_t abstract_state ACM settings bitmap.
usb_hcdc_countrysetting_t country_setting Country code.

◆ usb_hcdc_linecoding_t

struct usb_hcdc_linecoding_t

Virtual UART configuration (line coding)

Data Fields
usb_hcdc_line_speed_t dwdte_rate Data terminal rate in bits per second.
usb_hcdc_stop_bit_t bchar_format Stop bits.
usb_hcdc_parity_bit_t bparity_type Parity.
usb_hcdc_data_bit_t bdata_bits Data bits.
uint8_t rsv Reserved.

◆ usb_hcdc_controllinestate_t

struct usb_hcdc_controllinestate_t

Virtual UART control signal bitmap

Data Fields
uint16_t bdtr: 1 DTR.
uint16_t brts: 1 RTS.
uint16_t rsv: 14 Reserved.

◆ usb_hcdc_serialstate_t

struct usb_hcdc_serialstate_t

Virtual UART state bitmap

Data Fields
uint16_t brx_carrier: 1 DCD signal.
uint16_t btx_carrier: 1 DSR signal.
uint16_t bbreak: 1 Break detection status.
uint16_t bring_signal: 1 Ring signal.
uint16_t bframing: 1 Framing error.
uint16_t bparity: 1 Parity error.
uint16_t bover_run: 1 Over Run error.
uint16_t rsv: 9 Reserved.

◆ usb_hcdc_breakduration_t

struct usb_hcdc_breakduration_t

Break duration data

Data Fields
uint16_t wtime_ms Duration of Break.

◆ usb_hcdc_device_info_t

struct usb_hcdc_device_info_t

Break duration data

Data Fields
uint16_t vendor_id Vendor ID.
uint16_t product_id Product ID.
uint8_t subclass Subclass code.

◆ usb_hcdc_api_t

struct usb_hcdc_api_t

USB HCDC functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* controlDataRead )(usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size, uint8_t device_address)
 
fsp_err_t(* deviceRegister )(usb_ctrl_t *const p_api_ctrl, uint16_t vendor_id, uint16_t product_id)
 
fsp_err_t(* infoGet )(usb_ctrl_t *const p_api_ctrl, usb_hcdc_device_info_t *p_info, uint8_t device_address)
 

Field Documentation

◆ controlDataRead

fsp_err_t(* usb_hcdc_api_t::controlDataRead) (usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size, uint8_t device_address)

Read Control Data (CDC Interrupt IN data)

Parameters
[in]p_api_ctrlPointer to control structure.
[in]p_bufPointer to area that stores read data.
[in]sizeRead request size.
[in]device_addressDevice address.

◆ deviceRegister

fsp_err_t(* usb_hcdc_api_t::deviceRegister) (usb_ctrl_t *const p_api_ctrl, uint16_t vendor_id, uint16_t product_id)

Register the specified vendor class device in the device table.

Parameters
[in]p_api_ctrlPointer to control structure.
[in]vendor_idVendor ID.
[in]product_idProduct ID.

◆ infoGet

fsp_err_t(* usb_hcdc_api_t::infoGet) (usb_ctrl_t *const p_api_ctrl, usb_hcdc_device_info_t *p_info, uint8_t device_address)

Get connected device information.

Parameters
[in]p_api_ctrlPointer to control structure.
[in]p_infoPointer to store CDC device information.
[in]device_addressDevice address.

◆ usb_hcdc_instance_t

struct usb_hcdc_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
usb_ctrl_t * p_ctrl Pointer to the control structure for this instance.
usb_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
usb_hcdc_api_t const * p_api Pointer to the API structure for this instance.

Enumeration Type Documentation

◆ usb_hcdc_data_bit_t

Virtual UART data length

Enumerator
USB_HCDC_DATA_BIT_7 

7 bits

USB_HCDC_DATA_BIT_8 

8 bits

◆ usb_hcdc_stop_bit_t

Virtual UART stop bit length

Enumerator
USB_HCDC_STOP_BIT_1 

1 bit

USB_HCDC_STOP_BIT_15 

1.5 bits

USB_HCDC_STOP_BIT_2 

2 bits

◆ usb_hcdc_parity_bit_t

Virtual UART parity bit setting

Enumerator
USB_HCDC_PARITY_BIT_NONE 

No parity bit.

USB_HCDC_PARITY_BIT_ODD 

Odd parity.

USB_HCDC_PARITY_BIT_EVEN 

Even parity.

◆ usb_hcdc_line_speed_t

Virtual UART bitrate

◆ usb_hcdc_feature_selector_t

Feature Selector