126 #ifdef USE_USB_OTG_HS 127 static uint8_t *USBD_cdc_GetOtherCfgDesc (uint8_t speed, uint16_t *length);
139 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 140 #if defined ( __ICCARM__ ) 141 #pragma data_alignment=4 146 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 147 #if defined ( __ICCARM__ ) 148 #pragma data_alignment=4 153 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 154 #if defined ( __ICCARM__ ) 155 #pragma data_alignment=4 162 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 163 #if defined ( __ICCARM__ ) 164 #pragma data_alignment=4 176 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 177 #if defined ( __ICCARM__ ) 178 #pragma data_alignment=4 187 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 188 #if defined ( __ICCARM__ ) 189 #pragma data_alignment=4 214 #ifdef USE_USB_OTG_HS 215 USBD_cdc_GetOtherCfgDesc,
219 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 220 #if defined ( __ICCARM__ ) 221 #pragma data_alignment=4 286 #ifdef USE_USB_OTG_HS 324 #ifdef USE_USB_OTG_HS 325 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 326 #if defined ( __ICCARM__ ) 327 #pragma data_alignment=4 518 uint8_t
const *pbuf=usbd_cdc_CfgDesc + 9;
573 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 574 pbuf = usbd_cdc_Desc;
588 (uint8_t *)&usbd_cdc_AltSet,
595 usbd_cdc_AltSet = (uint8_t)(req->
wValue);
647 uint16_t USB_Tx_length;
672 uint32_t space_avail;
729 uint16_t USB_Tx_length;
759 static uint32_t FrameCount = 0;
783 *length =
sizeof (usbd_cdc_CfgDesc);
784 return usbd_cdc_CfgDesc;
794 #ifdef USE_USB_OTG_HS 795 static uint8_t *USBD_cdc_GetOtherCfgDesc (uint8_t speed, uint16_t *length)
797 *length =
sizeof (usbd_cdc_OtherCfgDesc);
798 return usbd_cdc_OtherCfgDesc;
#define DEVICE_SUBCLASS_CDC
#define USB_REQ_TYPE_STANDARD
static uint32_t last_tx_packet_size(void *pdev, uint8_t epnum)
header file for the usbd_req.c file
uint16_t(* pIf_DeInit)(void)
#define CDC_DESCRIPTOR_TYPE
USBD_Status USBD_CtlSendData(USB_OTG_CORE_HANDLE *pdev, const uint8_t *pbuf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
#define USB_REQ_TYPE_CLASS
#define USB_REQ_SET_INTERFACE
#define USB_REQ_GET_INTERFACE
static unsigned ring_space_contig(unsigned size, unsigned head, unsigned tail)
static uint8_t usbd_cdc_Setup(void *pdev, USB_SETUP_REQ *req)
usbd_cdc_Setup Handle the CDC specific requests
USBD_Class_cb_TypeDef const USBD_CDC_cb
uint32_t DCD_EP_Tx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len)
Transmit data over USB.
static unsigned ring_wrap(unsigned size, unsigned idx)
static uint8_t usbd_cdc_SOF(void *pdev)
usbd_audio_SOF Start Of Frame event management
static void schedule_cdc_out(void *pdev)
uint32_t USB_Rx_total_bytes
uint32_t USB_Rx_buff_size
#define CDC_IN_FRAME_INTERVAL
static uint8_t * USBD_cdc_GetCfgDesc(uint8_t speed, uint16_t *length)
USBD_cdc_GetCfgDesc Return configuration descriptor.
static uint32_t last_rx_data_size(void *pdev, uint8_t epnum)
header file for the usbd_cdc_core.c file.
uint32_t USB_Tx_total_bytes
uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
Configure an EP.
#define CDC_DATA_OUT_PACKET_SIZE
#define USB_CONFIGURATION_DESCRIPTOR_TYPE
uint32_t DCD_EP_Close(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
called when an EP is disabled
static unsigned ring_space_wrapped(unsigned size, unsigned head, unsigned tail)
static uint8_t usbd_cdc_DeInit(void *pdev, uint8_t cfgidx)
usbd_cdc_Init DeInitialize the CDC layer
#define CDC_DATA_MAX_PACKET_SIZE
#define USB_CDC_CONFIG_DESC_SIZ
uint16_t(* pIf_Ctrl)(uint32_t Cmd, uint8_t *Buf, uint32_t Len)
CDC_IF_Prop_TypeDef APP_FOPS
static uint8_t usbd_cdc_DataIn(void *pdev, uint8_t epnum)
usbd_audio_DataIn Data sent on non-control IN endpoint
USBD_Status USBD_CtlPrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlPrepareRx receive data on the ctl pipe.
#define USB_SIZ_DEVICE_DESC
#define USB_INTERFACE_DESCRIPTOR_TYPE
void DCD_SetEPStatus(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum, uint32_t Status)
Set the EP Status.
#define USB_REQ_GET_DESCRIPTOR
static uint8_t usbd_cdc_EP0_RxReady(void *pdev)
usbd_cdc_EP0_RxReady Data received on control endpoint
__ALIGN_BEGIN uint8_t const usbd_cdc_CfgDesc [USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END
#define USB_OTG_EP_TX_NAK
static int try_start_rx(void *pdev)
#define USB_OTG_EP_TX_VALID
#define CDC_DATA_IN_PACKET_SIZE
void USBD_CtlError(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_CtlError Handle USB low level Error.
uint32_t USB_Rx_buff_tail
const uint8_t USBD_DeviceDesc[USB_SIZ_DEVICE_DESC]
static uint8_t usbd_cdc_Init(void *pdev, uint8_t cfgidx)
usbd_cdc_Init Initilaize the CDC interface
uint32_t USB_Tx_buff_tail
#define CDC_CMD_PACKET_SZE
static uint8_t usbd_cdc_DataOut(void *pdev, uint8_t epnum)
usbd_cdc_DataOut Data received on non-control Out endpoint
static void schedule_cdc_in(void *pdev)
#define USB_ENDPOINT_DESCRIPTOR_TYPE
uint32_t USB_Rx_buff_head
#define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION
static unsigned ring_data_contig(unsigned size, unsigned head, unsigned tail)
#define USB_REQ_TYPE_MASK
uint16_t(* pIf_Init)(void)
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
header file for the usbd_desc.c file
uint32_t USB_Tx_buff_head