USB Device Middleware Library 2.10
cy_stc_usb_dev_cdc_config_t Struct Reference

Description

CDC class configuration structure.

Data Fields

uint8_t * buffer [CY_USB_DEV_CDC_COMPORT_NUMBER]
 The pointers to the buffers to store received data by COM port 0 and 1 appropriately. More...
 
uint32_t bufferSize [CY_USB_DEV_CDC_COMPORT_NUMBER]
 Size of provided buffers to for the COM port 0 and 1 appropriately. More...
 

Field Documentation

◆ buffer

uint8_t* cy_stc_usb_dev_cdc_config_t::buffer[CY_USB_DEV_CDC_COMPORT_NUMBER]

The pointers to the buffers to store received data by COM port 0 and 1 appropriately.

The buffer is mandatory to for Cy_USB_Dev_CDC_GetData and Cy_USB_Dev_CDC_GetChar function operation. If these functions will not be used by the application pass NULL as a pointer.
Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).

◆ bufferSize

uint32_t cy_stc_usb_dev_cdc_config_t::bufferSize[CY_USB_DEV_CDC_COMPORT_NUMBER]

Size of provided buffers to for the COM port 0 and 1 appropriately.

The buffer size must be equal to the maximum packet size of CDC Data interface IN endpoint that belongs to the COM port. Pass zero size if the pointer to the buffer is NULL.