101 pdev->host.ConnSts = 0;
105 pdev->host.ErrCnt[
i] = 0;
106 pdev->host.XferCnt[
i] = 0;
109 pdev->host.hc[0].max_packet = 8;
112 #ifndef DUAL_ROLE_MODE_ENABLED 118 USB_OTG_CoreInitHost(pdev);
156 USB_OTG_ResetPort(pdev);
169 return (pdev->host.ConnSts);
182 return (pdev->host.PortEnabled);
206 return pdev->host.URB_State[ch_num] ;
218 return pdev->host.XferCnt[ch_num] ;
232 return pdev->host.HC_Status[ch_num] ;
244 return USB_OTG_HC_Init(pdev, hc_num);
257 pdev->host.URB_State[hc_num] =
URB_IDLE;
258 pdev->host.hc[hc_num].xfer_count = 0 ;
259 return USB_OTG_HC_StartXfer(pdev, hc_num);
Specific api's relative to the used hardware platform.
USB_OTG_STS USB_OTG_SetCurrentMode(USB_OTG_CORE_HANDLE *pdev, uint8_t mode)
USB_OTG_SetCurrentMode : Set ID line.
uint32_t HCD_IsDeviceConnected(USB_OTG_CORE_HANDLE *pdev)
HCD_IsDeviceConnected Check if the device is connected.
#define USB_OTG_MAX_TX_FIFOS
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.
uint32_t HCD_GetCurrentSpeed(USB_OTG_CORE_HANDLE *pdev)
HCD_GetCurrentSpeed Get Current device Speed.
uint32_t HCD_Init(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID)
HCD_Init Initialize the HOST portion of the driver.
uint32_t HCD_SubmitRequest(USB_OTG_CORE_HANDLE *pdev, uint8_t hc_num)
HCD_SubmitRequest This function prepare a HC and start a transfer.
HC_STATUS HCD_GetHCState(USB_OTG_CORE_HANDLE *pdev, uint8_t ch_num)
HCD_GetHCState This function returns the HC Status.
uint32_t HCD_GetXferCnt(USB_OTG_CORE_HANDLE *pdev, uint8_t ch_num)
HCD_GetXferCnt This function returns the last URBstate.
struct _USB_OTG_HPRT0_TypeDef::@88 b
uint32_t HCD_GetCurrentFrame(USB_OTG_CORE_HANDLE *pdev)
HCD_GetCurrentFrame This function returns the frame number for sof packet.
#define USB_OTG_READ_REG32(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.
Header of the Core Layer.
uint32_t HCD_HC_Init(USB_OTG_CORE_HANDLE *pdev, uint8_t hc_num)
HCD_HC_Init This function prepare a HC and start a transfer.
uint32_t HCD_IsPortEnabled(USB_OTG_CORE_HANDLE *pdev)
HCD_IsPortEnabled This function checks if port is enabled.
URB_STATE HCD_GetURB_State(USB_OTG_CORE_HANDLE *pdev, uint8_t ch_num)
HCD_GetURB_State This function returns the last URBstate.
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.
General low level driver configuration.
uint32_t HCD_ResetPort(USB_OTG_CORE_HANDLE *pdev)
HCD_ResetPort Issues the reset command to device.
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...