162 if ((ep_addr & 0x80) == 0x80)
164 ep = &pdev->
dev.
in_ep[ep_addr & 0x7F];
170 ep->
num = ep_addr & 0x7F;
172 ep->
is_in = (0x80 & ep_addr) != 0;
198 if ((ep_addr&0x80) == 0x80)
200 ep = &pdev->
dev.
in_ep[ep_addr & 0x7F];
206 ep->
num = ep_addr & 0x7F;
207 ep->
is_in = (0x80 & ep_addr) != 0;
235 ep->
num = ep_addr & 0x7F;
268 ep = &pdev->
dev.
in_ep[ep_addr & 0x7F];
272 ep->
num = ep_addr & 0x7F;
299 if ((0x80 & epnum) == 0x80)
301 ep = &pdev->
dev.
in_ep[epnum & 0x7F];
309 ep->
num = epnum & 0x7F;
310 ep->
is_in = ((epnum & 0x80) == 0x80);
326 if ((0x80 & epnum) == 0x80)
328 ep = &pdev->
dev.
in_ep[epnum & 0x7F];
336 ep->
num = epnum & 0x7F;
337 ep->
is_in = ((epnum & 0x80) == 0x80);
353 if ((epnum & 0x80) == 0x80)
428 if ((0x80 & epnum) == 0x80)
430 ep = &pdev->
dev.
in_ep[epnum & 0x7F];
454 if ((0x80 & epnum) == 0x80)
456 ep = &pdev->
dev.
in_ep[epnum & 0x7F];
USB_OTG_STS USB_OTG_FlushTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t num)
USB_OTG_FlushTxFifo : Flush a Tx FIFO.
uint32_t DCD_GetEPStatus(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
returns the EP Status
USB_OTG_STS USB_OTG_EPSetStall(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
USB_OTG_EPSetStall : Set the EP STALL.
uint32_t DCD_EP_Flush(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
This Function flushes the FIFOs.
Specific api's relative to the used hardware platform.
USB_OTG_STS USB_OTG_EnableGlobalInt(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_EnableGlobalInt Enables the controller's Global Int in the AHB Config reg.
USB_OTG_STS USB_OTG_SelectCore(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID)
USB_OTG_SelectCore Initialize core registers address.
void DCD_DevConnect(USB_OTG_CORE_HANDLE *pdev)
Connect device (enable internal pull-up)
USB_OTG_STS USB_OTG_EPActivate(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
USB_OTG_EPActivate : Activates an EP.
void DCD_Init(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID)
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.
USB_OTG_STS USB_OTG_DisableGlobalInt(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_DisableGlobalInt Enables the controller's Global Int in the AHB Config reg.
void DCD_DevDisconnect(USB_OTG_CORE_HANDLE *pdev)
Disconnect device (disable internal pull-up)
#define USB_OTG_MAX_EP0_SIZE
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.
uint32_t DCD_EP_Close(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
called when an EP is disabled
USB_OTG_EP in_ep[USB_OTG_MAX_TX_FIFOS]
USB_OTG_STS USB_OTG_EPStartXfer(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
USB_OTG_EPStartXfer : Handle the setup for data xfer for an EP and starts the xfer.
#define USB_OTG_WRITE_REG32(reg, value)
USB_OTG_STS USB_OTG_EP0StartXfer(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
USB_OTG_EP0StartXfer : Handle the setup for a data xfer for EP0 and starts the xfer.
struct _USB_OTG_DCFG_TypeDef::@65 b
#define USB_OTG_READ_REG32(reg)
struct _USB_OTG_DCTL_TypeDef::@66 b
void USB_OTG_BSP_mDelay(const uint32_t msec)
USB_OTG_STS USB_OTG_EPDeactivate(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
USB_OTG_EPDeactivate : Deactivates an EP.
void DCD_SetEPStatus(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum, uint32_t Status)
Set the EP Status.
USB_OTG_STS USB_OTG_FlushRxFifo(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_FlushRxFifo : Flush a Rx FIFO.
USB_OTG_STS USB_OTG_SetCurrentMode(USB_OTG_CORE_HANDLE *pdev, uint8_t mode)
USB_OTG_SetCurrentMode : Set ID line.
USB_OTG_STS USB_OTG_EPClearStall(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
Clear the EP STALL.
uint32_t USB_OTG_GetEPStatus(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep)
returns the EP Status
uint32_t DCD_EP_Stall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Stall an endpoint.
USB_OTG_EP out_ep[USB_OTG_MAX_TX_FIFOS]
USB_OTG_STS USB_OTG_CoreInitDev(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_CoreInitDev : Initializes the USB_OTG controller registers for device mode.
void USB_OTG_SetEPStatus(USB_OTG_CORE_HANDLE *pdev, USB_OTG_EP *ep, uint32_t Status)
Set the EP Status.
Peripheral Driver Header file.
void DCD_EP_SetAddress(USB_OTG_CORE_HANDLE *pdev, uint8_t address)
This Function set USB device address.
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
USB_OTG_STS USB_OTG_CoreInit(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_CoreInit Initializes the USB_OTG controller registers and prepares the core device mode or ho...
#define USB_OTG_MODIFY_REG32(reg, clear_mask, set_mask)
uint32_t DCD_EP_ClrStall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Clear stall condition on endpoints.