APM:Libraries
Functions
USB_DCD_Private_Functions
Collaboration diagram for USB_DCD_Private_Functions:

Functions

void DCD_Init (USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID)
 
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. More...
 
uint32_t DCD_EP_Close (USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
 called when an EP is disabled More...
 
uint32_t DCD_EP_PrepareRx (USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
 DCD_EP_PrepareRx. More...
 
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. More...
 
uint32_t DCD_EP_Stall (USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
 Stall an endpoint. More...
 
uint32_t DCD_EP_ClrStall (USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
 Clear stall condition on endpoints. More...
 
uint32_t DCD_EP_Flush (USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
 This Function flushes the FIFOs. More...
 
void DCD_EP_SetAddress (USB_OTG_CORE_HANDLE *pdev, uint8_t address)
 This Function set USB device address. More...
 
void DCD_DevConnect (USB_OTG_CORE_HANDLE *pdev)
 Connect device (enable internal pull-up) More...
 
void DCD_DevDisconnect (USB_OTG_CORE_HANDLE *pdev)
 Disconnect device (disable internal pull-up) More...
 
uint32_t DCD_GetEPStatus (USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
 returns the EP Status More...
 
void DCD_SetEPStatus (USB_OTG_CORE_HANDLE *pdev, uint8_t epnum, uint32_t Status)
 Set the EP Status. More...
 

Detailed Description

Function Documentation

◆ DCD_DevConnect()

void DCD_DevConnect ( USB_OTG_CORE_HANDLE pdev)

Connect device (enable internal pull-up)

Parameters
pdevdevice instance
Return values
None

Definition at line 385 of file usb_dcd.c.

Here is the call graph for this function:

◆ DCD_DevDisconnect()

void DCD_DevDisconnect ( USB_OTG_CORE_HANDLE pdev)

Disconnect device (disable internal pull-up)

Parameters
pdevdevice instance
Return values
None

Definition at line 403 of file usb_dcd.c.

Referenced by usb_close().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_Close()

uint32_t DCD_EP_Close ( USB_OTG_CORE_HANDLE pdev,
uint8_t  ep_addr 
)

called when an EP is disabled

Parameters
pdevdevice instance
ep_addrendpoint address
Return values
status

Definition at line 194 of file usb_dcd.c.

Referenced by usbd_cdc_DeInit(), USBD_MSC_DeInit(), and USBD_MSC_Setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_ClrStall()

uint32_t DCD_EP_ClrStall ( USB_OTG_CORE_HANDLE pdev,
uint8_t  epnum 
)

Clear stall condition on endpoints.

Parameters
pdevdevice instance
epnumendpoint address
Return values
status

Definition at line 323 of file usb_dcd.c.

Referenced by USBD_StdEPReq().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_Flush()

uint32_t DCD_EP_Flush ( USB_OTG_CORE_HANDLE pdev,
uint8_t  epnum 
)

This Function flushes the FIFOs.

Parameters
pdevdevice instance
epnumendpoint address
Return values
status

Definition at line 350 of file usb_dcd.c.

Referenced by MSC_BOT_Init(), and USBD_MSC_Setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_Open()

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.

Parameters
pdev: Device instance
epdesc: Endpoint Descriptor
Return values
status

Definition at line 155 of file usb_dcd.c.

Referenced by usbd_cdc_Init(), USBD_MSC_Init(), USBD_MSC_Setup(), and USBD_Reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_PrepareRx()

uint32_t DCD_EP_PrepareRx ( USB_OTG_CORE_HANDLE pdev,
uint8_t  ep_addr,
uint8_t *  pbuf,
uint16_t  buf_len 
)

DCD_EP_PrepareRx.

Parameters
pdevdevice instance
ep_addrendpoint address
pbufpointer to Rx buffer
buf_lendata length
Return values
status

Definition at line 221 of file usb_dcd.c.

Referenced by MSC_BOT_Abort(), MSC_BOT_Init(), MSC_BOT_Reset(), MSC_BOT_SendCSW(), SCSI_ProcessWrite(), SCSI_Write10(), try_start_rx(), usbd_cdc_Init(), USBD_CtlContinueRx(), USBD_CtlPrepareRx(), and USBD_CtlReceiveStatus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_SetAddress()

void DCD_EP_SetAddress ( USB_OTG_CORE_HANDLE pdev,
uint8_t  address 
)

This Function set USB device address.

Parameters
pdevdevice instance
addressnew device address
Return values
status

Definition at line 372 of file usb_dcd.c.

Referenced by USBD_SetAddress().

Here is the caller graph for this function:

◆ DCD_EP_Stall()

uint32_t DCD_EP_Stall ( USB_OTG_CORE_HANDLE pdev,
uint8_t  epnum 
)

Stall an endpoint.

Parameters
pdevdevice instance
epnumendpoint address
Return values
status

Definition at line 296 of file usb_dcd.c.

Referenced by MSC_BOT_Abort(), MSC_BOT_CplClrFeature(), USBD_CtlError(), USBD_SetupStage(), and USBD_StdEPReq().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_EP_Tx()

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.

Parameters
pdevdevice instance
ep_addrendpoint address
pbufpointer to Tx buffer
buf_lendata length
Return values
status

Definition at line 261 of file usb_dcd.c.

Referenced by MSC_BOT_SendCSW(), MSC_BOT_SendData(), schedule_cdc_in(), SCSI_ProcessRead(), usbd_cdc_DataIn(), USBD_CtlContinueSendData(), USBD_CtlSendData(), and USBD_CtlSendStatus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_GetEPStatus()

uint32_t DCD_GetEPStatus ( USB_OTG_CORE_HANDLE pdev,
uint8_t  epnum 
)

returns the EP Status

Parameters
pdev: Selected device epnum : endpoint address
Return values
EP status

Definition at line 423 of file usb_dcd.c.

Here is the call graph for this function:

◆ DCD_Init()

void DCD_Init ( USB_OTG_CORE_HANDLE pdev,
USB_OTG_CORE_ID_TypeDef  coreID 
)

Definition at line 91 of file usb_dcd.c.

Referenced by USBD_Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DCD_SetEPStatus()

void DCD_SetEPStatus ( USB_OTG_CORE_HANDLE pdev,
uint8_t  epnum,
uint32_t  Status 
)

Set the EP Status.

Parameters
pdev: Selected device Status : new Status epnum : EP address
Return values
None

Definition at line 450 of file usb_dcd.c.

Referenced by try_start_rx().

Here is the call graph for this function:
Here is the caller graph for this function: