LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OHCI.h File Reference

Go to the source code of this file.

Data Structures

struct  st_HC_HCCA
 
struct  st_HC_ED
 
struct  PHCD_EndpointDescriptor
 
struct  st_HC_GTD
 
struct  PHCD_GeneralTransferDescriptor
 
struct  st_HCD_IsoTransferDescriptor
 
struct  OHCI_HOST_DATA_Type
 

Macros

#define MAX_ED   HCD_MAX_ENDPOINT
 
#define MAX_GTD   (MAX_ED + 3)
 
#define MAX_STATIC_ED   3 /* Serve as list head, fixed, not configurable */
 
#define MAX_ITD   0
 
#define CONTROL_BULK_SERVICE_RATIO   3 /* Control Bulk transfer ratio 0 = 1:1 - 1 = 2:1 - 2 = 3:1 - 3 = 4:1 */
 
#define INTERRUPT_ROUTING   0 /* Host interrupt routing 0 = IRQ - 1 = SMI */
 
#define REMOTE_WAKEUP_CONNECTED   NO /* Remote wakeup connected */
 
#define REMOTE_WAKEUP_ENABLE   NO /* Remote wakeup enable */
 
#define SCHEDULING_OVRERRUN_INTERRUPT   NO
 
#define SOF_INTERRUPT   NO
 
#define RESUME_DETECT_INTERRUPT   NO
 
#define UNRECOVERABLE_ERROR_INTERRUPT   NO
 
#define FRAMENUMBER_OVERFLOW_INTERRUPT   NO
 
#define OWNERSHIP_CHANGE_INTERRUPT   NO
 
#define FRAME_INTERVAL   0x2EDF /* Reset default value */
 
#define HC_FMINTERVAL_DEFAULT   ((((6 * (FRAME_INTERVAL - 210)) / 7) << 16) | FRAME_INTERVAL)
 
#define PERIODIC_START   0x00002A27UL /* 10% off from FRAME_INTERVAL */
 
#define PORT_POWER_SWITCHING   NO
 
#define PER_PORT_POWER_SWITCHING   NO
 
#define PER_PORT_OVER_CURRENT_REPORT   NO
 
#define OVER_CURRENT_PROTECTION   NO
 
#define INTERRUPT_1ms_LIST_HEAD   0
 
#define INTERRUPT_2ms_LIST_HEAD   1
 
#define INTERRUPT_4ms_LIST_HEAD   3
 
#define INTERRUPT_8ms_LIST_HEAD   7
 
#define INTERRUPT_16ms_LIST_HEAD   15
 
#define INTERRUPT_32ms_LIST_HEAD   31
 
#define ISO_LIST_HEAD   (MAX_STATIC_ED - 3)
 
#define CONTROL_LIST_HEAD   (MAX_STATIC_ED - 2)
 
#define BULK_LIST_HEAD   (MAX_STATIC_ED - 1)
 
#define TD_MAX_XFER_LENGTH   0x2000
 
#define TD_NoInterruptOnComplete   (7)
 
#define HC_REVISION   0x000000FFUL
 
#define HC_FM_REMAIN   0x00003FFFUL /* Frame remaining */
 
#define HC_FM_NUMBER   0x0000FFFFUL /* Frame Number */
 
#define HC_CONTROL_ControlBulkServiceRatio   0x00000003UL /* Control/Bulk ratio */
 
#define HC_CONTROL_PeriodListEnable   0x00000004UL /* Periodic List Enable */
 
#define HC_CONTROL_IsochronousEnable   0x00000008UL /* Isochronous Enable */
 
#define HC_CONTROL_ControlListEnable   0x00000010UL /* Control List Enable */
 
#define HC_CONTROL_BulkListEnable   0x00000020UL /* Bulk List Enable */
 
#define HC_CONTROL_HostControllerFunctionalState   0x000000C0UL /* Host Controller Functional State */
 
#define HC_CONTROL_InterruptRouting   0x00000100UL /* Interrupt Routing */
 
#define HC_CONTROL_RemoteWakeupConnected   0x00000200UL /* Remote Wakeup Connected */
 
#define HC_CONTROL_RemoteWakeupEnable   0x00000400UL /* Remote Wakeup Enable */
 
#define HC_HOST_RESET   0x00000000UL /* Reset state */
 
#define HC_HOST_RESUME   0X00000001UL /* Resume state */
 
#define HC_HOST_OPERATIONAL   0x00000002UL /* Operational state */
 
#define HC_HOST_SUSPEND   0x00000003UL /* Suspend state */
 
#define HC_COMMAND_STATUS_HostControllerReset   0x00000001UL /* Host Controller Reset */
 
#define HC_COMMAND_STATUS_ControlListFilled   0x00000002UL /* Control List Filled */
 
#define HC_COMMAND_STATUS_BulkListFilled   0x00000004UL /* Bulk List Filled */
 
#define HC_INTERRUPT_SchedulingOverrun   0x00000001UL /* Scheduling Overrun */
 
#define HC_INTERRUPT_WritebackDoneHead   0x00000002UL /* Writeback DoneHead */
 
#define HC_INTERRUPT_StartofFrame   0x00000004UL /* Start of Frame */
 
#define HC_INTERRUPT_ResumeDetected   0x00000008UL /* Resume Detect */
 
#define HC_INTERRUPT_UnrecoverableError   0x00000010UL /* Unrecoverable error */
 
#define HC_INTERRUPT_FrameNumberOverflow   0x00000020UL /* Frame Number Overflow */
 
#define HC_INTERRUPT_RootHubStatusChange   0x00000040UL /* Root Hub Status Change */
 
#define HC_INTERRUPT_OwnershipChange   0x40000000UL /* Ownership Change */
 
#define HC_INTERRUPT_MasterInterruptEnable   0x80000000UL /* Master Interrupt Enable */
 
#define HC_INTERRUPT_ALL   0xC000007FUL /* All interrupts */
 
#define HC_RH_DESCRIPTORA_NumberDownstreamPorts   0x000000FFUL /* Number of downstream ports */
 
#define HC_RH_DESCRIPTORA_PowerSwitchingMode   0x00000100UL /* Power Switching Mode */
 
#define HC_RH_DESCRIPTORA_NoPowerSwitching   0x00000200UL /* No Power Switching */
 
#define HC_RH_DESCRIPTORA_OverCurrentProtectionMode   0x00000800UL /* OverCurrent Protection Mode */
 
#define HC_RH_DESCRIPTORA_NoOverCurrentProtection   0x00001000UL /* No OverCurrent Protection */
 
#define HC_RH_DESCRIPTORA_PowerOnToPowerGoodTime   0xFF000000UL /* Power On To Power Good Time */
 
#define HC_RH_DESCRIPTORB_PortPowerControlMask   0xFFFF0000UL /* Port Power Control Mask */
 
#define HC_RH_DESCRIPTORB_DeviceRemovable   0x0000FFFFUL /* Device Removable */
 
#define HC_RH_STATUS_LocalPowerStatus   0x00000001UL /* R: Local Power Status - W: Clear Global Power */
 
#define HC_RH_STATUS_LocalPowerStatusChange   0x00010000UL /* R: Local Power Status Change - W: Set Global Power */
 
#define HC_RH_STATUS_DeviceRemoteWakeupEnable   0x00008000UL /* W: Set Remote Wakeup Enable */
 
#define HC_RH_PORT_STATUS_CurrentConnectStatus   0x00000001UL /* R: Current Connect Status - W: Clear Port Enable */
 
#define HC_RH_PORT_STATUS_PowerEnableStatus   0x00000002UL /* R: Port Enable Status - W: Set Port Enable */
 
#define HC_RH_PORT_STATUS_PortSuspendStatus   0x00000004UL /* R: Port Suspend Status - W: Set Port Suspend */
 
#define HC_RH_PORT_STATUS_PortOverCurrentIndicator   0x00000008UL /* R: Port OverCurrent Indicator- W: Clear Suspend Status */
 
#define HC_RH_PORT_STATUS_PortResetStatus   0x00000010UL /* R: Port Reset Status - W: Set Port Reset */
 
#define HC_RH_PORT_STATUS_PortPowerStatus   0x00000100UL /* R: Port Power Status - W: Set Port Power */
 
#define HC_RH_PORT_STATUS_LowSpeedDeviceAttached   0x00000200UL /* R: Low Speed Device Attached - W: Clear Port Power */
 
#define HC_RH_PORT_STATUS_ConnectStatusChange   0x00010000UL /* Connect Status Change */
 
#define HC_RH_PORT_STATUS_PortEnableStatusChange   0x00020000UL /* Port Enable Status Change */
 
#define HC_RH_PORT_STATUS_PortSuspendStatusChange   0x00040000UL /* Port Suspend Status Change */
 
#define HC_RH_PORT_STATUS_OverCurrentIndicatorChange   0x00080000UL /* OverCurrent Indicator Change */
 
#define HC_RH_PORT_STATUS_PortResetStatusChange   0x00100000UL /* Port Reset Status Change */
 
#define OHCI_REG(x)   LPC_USB
 

Functions

struct st_HC_HCCA ATTR_ALIGNED (256) HC_HCCA
 
struct st_HC_ED ATTR_ALIGNED (16) HC_ED
 
struct st_HCD_IsoTransferDescriptor ATTR_ALIGNED (32) HCD_IsoTransferDescriptor
 
static INLINE HCD_STATUS OHciHostInit (uint8_t HostID)
 
static INLINE HCD_STATUS OHciHostReset (uint8_t HostID)
 
static INLINE HCD_STATUS OHciHostSuspend (uint8_t HostID)
 
static INLINE HCD_STATUS OHciHostOperational (uint8_t HostID)
 
static INLINE HCD_STATUS OHciRhPortPowerOn (uint8_t HostID, uint8_t uPortNumber)
 
static INLINE HCD_STATUS OHciRhPortPowerOff (uint8_t HostID, uint8_t uPortNumber)
 
static INLINE HCD_STATUS OHciRhPortSuspend (uint8_t HostID, uint8_t uPortNumber)
 
static INLINE HCD_STATUS OHciRhPortResume (uint8_t HostID, uint8_t uPortNumber)
 
static INLINE uint32_t Align16 (uint32_t Value)
 
static INLINE
PHCD_EndpointDescriptor 
HcdED (uint8_t idx)
 
static INLINE
PHCD_GeneralTransferDescriptor 
HcdGTD (uint8_t idx)
 
static INLINE
PHCD_IsoTransferDescriptor 
HcdITD (uint8_t idx)
 
static INLINE Bool IsIsoEndpoint (uint8_t EdIdx)
 
static INLINE Bool IsInterruptEndpoint (uint8_t EdIdx)
 
static void PipehandleCreate (uint32_t *pPipeHandle, uint8_t HostID, uint8_t idx)
 
static HCD_STATUS PipehandleParse (uint32_t Pipehandle, uint8_t *HostID, uint8_t *EdIdx)
 
static INLINE void BuildPeriodicStaticEdTree (uint8_t HostID)
 
static INLINE HCD_STATUS AllocEd (uint8_t DeviceAddr, HCD_USB_SPEED DeviceSpeed, uint8_t EndpointNumber, HCD_TRANSFER_TYPE TransferType, HCD_TRANSFER_DIR TransferDir, uint16_t MaxPacketSize, uint8_t Interval, uint32_t *pEdIdx)
 
static INLINE HCD_STATUS AllocGtdForEd (uint8_t EdIdx)
 
static INLINE HCD_STATUS AllocItdForEd (uint8_t EdIdx)
 
static INLINE HCD_STATUS FreeED (uint8_t EdIdx)
 
static INLINE HCD_STATUS FreeGtd (PHCD_GeneralTransferDescriptor pGtd)
 
static INLINE HCD_STATUS FreeItd (PHCD_IsoTransferDescriptor pItd)
 
static INLINE HCD_STATUS InsertEndpoint (uint8_t HostID, uint32_t EdIdx, uint8_t ListIndex)
 
static INLINE HCD_STATUS RemoveEndpoint (uint8_t HostID, uint32_t EdIdx)
 
static HCD_STATUS QueueOneGTD (uint32_t EdIdx, uint8_t *const CurrentBufferPointer, uint32_t xferLen, uint8_t DirectionPID, uint8_t DataToggle, uint8_t IOC)
 
static HCD_STATUS QueueGTDs (uint32_t EdIdx, uint8_t *dataBuff, uint32_t xferLen, uint8_t Direction)
 
static HCD_STATUS WaitForTransferComplete (uint8_t EdIdx)
 

Variables

__O uint32_t HccaIntTable [32]
 
__I uint16_t HccaFrameNumber
 
__I uint16_t HccaPad1
 
__I uint32_t HccaDoneHead
 
__I uint8_t HccaReserved [116]
 
uint32_t FunctionAddr
 
uint32_t EndpointNumber
 
uint32_t Direction
 
uint32_t Speed
 
uint32_t Skip
 
uint32_t Format
 
uint32_t MaxPackageSize
 
uint32_t TailP
 
union {
   __IO uint32_t   HeadTD
 
   struct {
      uint32_t   Halted: 1
 
      uint32_t   ToggleCarry: 1
 
   } 
 
HeadP
 
uint32_t NextED
 
struct st_HC_EDPHC_ED
 
uint32_t BufferRounding
 
uint32_t DirectionPID
 
uint32_t DelayInterrupt
 
__IO uint32_t DataToggle
 
__IO uint32_t ErrorCount
 
__IO uint32_t ConditionCode
 
__IO uint8_t * CurrentBufferPointer
 
__IO uint32_t NextTD
 
uint8_t * BufferEnd
 
struct st_HC_GTDPHC_GTD
 
uint32_t StartingFrame
 
uint32_t FrameCount
 
uint32_t BufferPage0
 
__IO uint16_t OffsetPSW [8]
 
uint32_t inUse
 
uint16_t EdIdx
 
uint16_t reserved3
 
uint32_t reserved2 [6]
 
struct
st_HCD_IsoTransferDescriptor
PHCD_IsoTransferDescriptor
 
OHCI_HOST_DATA_Type ohci_data [MAX_USB_CORE]
 

Macro Definition Documentation

#define BULK_LIST_HEAD   (MAX_STATIC_ED - 1)

Definition at line 86 of file OHCI.h.

#define CONTROL_BULK_SERVICE_RATIO   3 /* Control Bulk transfer ratio 0 = 1:1 - 1 = 2:1 - 2 = 3:1 - 3 = 4:1 */

Definition at line 54 of file OHCI.h.

#define CONTROL_LIST_HEAD   (MAX_STATIC_ED - 2)

Definition at line 85 of file OHCI.h.

#define FRAME_INTERVAL   0x2EDF /* Reset default value */

Definition at line 68 of file OHCI.h.

#define FRAMENUMBER_OVERFLOW_INTERRUPT   NO

Definition at line 64 of file OHCI.h.

#define HC_COMMAND_STATUS_BulkListFilled   0x00000004UL /* Bulk List Filled */

Definition at line 114 of file OHCI.h.

#define HC_COMMAND_STATUS_ControlListFilled   0x00000002UL /* Control List Filled */

Definition at line 113 of file OHCI.h.

#define HC_COMMAND_STATUS_HostControllerReset   0x00000001UL /* Host Controller Reset */

Definition at line 112 of file OHCI.h.

#define HC_CONTROL_BulkListEnable   0x00000020UL /* Bulk List Enable */

Definition at line 101 of file OHCI.h.

#define HC_CONTROL_ControlBulkServiceRatio   0x00000003UL /* Control/Bulk ratio */

Definition at line 97 of file OHCI.h.

#define HC_CONTROL_ControlListEnable   0x00000010UL /* Control List Enable */

Definition at line 100 of file OHCI.h.

#define HC_CONTROL_HostControllerFunctionalState   0x000000C0UL /* Host Controller Functional State */

Definition at line 102 of file OHCI.h.

#define HC_CONTROL_InterruptRouting   0x00000100UL /* Interrupt Routing */

Definition at line 103 of file OHCI.h.

#define HC_CONTROL_IsochronousEnable   0x00000008UL /* Isochronous Enable */

Definition at line 99 of file OHCI.h.

#define HC_CONTROL_PeriodListEnable   0x00000004UL /* Periodic List Enable */

Definition at line 98 of file OHCI.h.

#define HC_CONTROL_RemoteWakeupConnected   0x00000200UL /* Remote Wakeup Connected */

Definition at line 104 of file OHCI.h.

#define HC_CONTROL_RemoteWakeupEnable   0x00000400UL /* Remote Wakeup Enable */

Definition at line 105 of file OHCI.h.

#define HC_FM_NUMBER   0x0000FFFFUL /* Frame Number */

Definition at line 95 of file OHCI.h.

#define HC_FM_REMAIN   0x00003FFFUL /* Frame remaining */

Definition at line 93 of file OHCI.h.

#define HC_FMINTERVAL_DEFAULT   ((((6 * (FRAME_INTERVAL - 210)) / 7) << 16) | FRAME_INTERVAL)

Definition at line 69 of file OHCI.h.

#define HC_HOST_OPERATIONAL   0x00000002UL /* Operational state */

Definition at line 109 of file OHCI.h.

#define HC_HOST_RESET   0x00000000UL /* Reset state */

Definition at line 107 of file OHCI.h.

#define HC_HOST_RESUME   0X00000001UL /* Resume state */

Definition at line 108 of file OHCI.h.

#define HC_HOST_SUSPEND   0x00000003UL /* Suspend state */

Definition at line 110 of file OHCI.h.

#define HC_INTERRUPT_ALL   0xC000007FUL /* All interrupts */

Definition at line 125 of file OHCI.h.

#define HC_INTERRUPT_FrameNumberOverflow   0x00000020UL /* Frame Number Overflow */

Definition at line 121 of file OHCI.h.

#define HC_INTERRUPT_MasterInterruptEnable   0x80000000UL /* Master Interrupt Enable */

Definition at line 124 of file OHCI.h.

#define HC_INTERRUPT_OwnershipChange   0x40000000UL /* Ownership Change */

Definition at line 123 of file OHCI.h.

#define HC_INTERRUPT_ResumeDetected   0x00000008UL /* Resume Detect */

Definition at line 119 of file OHCI.h.

#define HC_INTERRUPT_RootHubStatusChange   0x00000040UL /* Root Hub Status Change */

Definition at line 122 of file OHCI.h.

#define HC_INTERRUPT_SchedulingOverrun   0x00000001UL /* Scheduling Overrun */

Definition at line 116 of file OHCI.h.

#define HC_INTERRUPT_StartofFrame   0x00000004UL /* Start of Frame */

Definition at line 118 of file OHCI.h.

#define HC_INTERRUPT_UnrecoverableError   0x00000010UL /* Unrecoverable error */

Definition at line 120 of file OHCI.h.

#define HC_INTERRUPT_WritebackDoneHead   0x00000002UL /* Writeback DoneHead */

Definition at line 117 of file OHCI.h.

#define HC_REVISION   0x000000FFUL

Definition at line 91 of file OHCI.h.

#define HC_RH_DESCRIPTORA_NoOverCurrentProtection   0x00001000UL /* No OverCurrent Protection */

Definition at line 131 of file OHCI.h.

#define HC_RH_DESCRIPTORA_NoPowerSwitching   0x00000200UL /* No Power Switching */

Definition at line 129 of file OHCI.h.

#define HC_RH_DESCRIPTORA_NumberDownstreamPorts   0x000000FFUL /* Number of downstream ports */

Definition at line 127 of file OHCI.h.

#define HC_RH_DESCRIPTORA_OverCurrentProtectionMode   0x00000800UL /* OverCurrent Protection Mode */

Definition at line 130 of file OHCI.h.

#define HC_RH_DESCRIPTORA_PowerOnToPowerGoodTime   0xFF000000UL /* Power On To Power Good Time */

Definition at line 132 of file OHCI.h.

#define HC_RH_DESCRIPTORA_PowerSwitchingMode   0x00000100UL /* Power Switching Mode */

Definition at line 128 of file OHCI.h.

#define HC_RH_DESCRIPTORB_DeviceRemovable   0x0000FFFFUL /* Device Removable */

Definition at line 135 of file OHCI.h.

#define HC_RH_DESCRIPTORB_PortPowerControlMask   0xFFFF0000UL /* Port Power Control Mask */

Definition at line 134 of file OHCI.h.

#define HC_RH_PORT_STATUS_ConnectStatusChange   0x00010000UL /* Connect Status Change */

Definition at line 149 of file OHCI.h.

#define HC_RH_PORT_STATUS_CurrentConnectStatus   0x00000001UL /* R: Current Connect Status - W: Clear Port Enable */

Definition at line 141 of file OHCI.h.

#define HC_RH_PORT_STATUS_LowSpeedDeviceAttached   0x00000200UL /* R: Low Speed Device Attached - W: Clear Port Power */

Definition at line 147 of file OHCI.h.

#define HC_RH_PORT_STATUS_OverCurrentIndicatorChange   0x00080000UL /* OverCurrent Indicator Change */

Definition at line 152 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortEnableStatusChange   0x00020000UL /* Port Enable Status Change */

Definition at line 150 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortOverCurrentIndicator   0x00000008UL /* R: Port OverCurrent Indicator- W: Clear Suspend Status */

Definition at line 144 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortPowerStatus   0x00000100UL /* R: Port Power Status - W: Set Port Power */

Definition at line 146 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortResetStatus   0x00000010UL /* R: Port Reset Status - W: Set Port Reset */

Definition at line 145 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortResetStatusChange   0x00100000UL /* Port Reset Status Change */

Definition at line 153 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortSuspendStatus   0x00000004UL /* R: Port Suspend Status - W: Set Port Suspend */

Definition at line 143 of file OHCI.h.

#define HC_RH_PORT_STATUS_PortSuspendStatusChange   0x00040000UL /* Port Suspend Status Change */

Definition at line 151 of file OHCI.h.

#define HC_RH_PORT_STATUS_PowerEnableStatus   0x00000002UL /* R: Port Enable Status - W: Set Port Enable */

Definition at line 142 of file OHCI.h.

#define HC_RH_STATUS_DeviceRemoteWakeupEnable   0x00008000UL /* W: Set Remote Wakeup Enable */

Definition at line 139 of file OHCI.h.

#define HC_RH_STATUS_LocalPowerStatus   0x00000001UL /* R: Local Power Status - W: Clear Global Power */

Definition at line 137 of file OHCI.h.

#define HC_RH_STATUS_LocalPowerStatusChange   0x00010000UL /* R: Local Power Status Change - W: Set Global Power */

Definition at line 138 of file OHCI.h.

#define INTERRUPT_16ms_LIST_HEAD   15

Definition at line 82 of file OHCI.h.

#define INTERRUPT_1ms_LIST_HEAD   0

Definition at line 78 of file OHCI.h.

#define INTERRUPT_2ms_LIST_HEAD   1

Definition at line 79 of file OHCI.h.

#define INTERRUPT_32ms_LIST_HEAD   31

Definition at line 83 of file OHCI.h.

#define INTERRUPT_4ms_LIST_HEAD   3

Definition at line 80 of file OHCI.h.

#define INTERRUPT_8ms_LIST_HEAD   7

Definition at line 81 of file OHCI.h.

#define INTERRUPT_ROUTING   0 /* Host interrupt routing 0 = IRQ - 1 = SMI */

Definition at line 55 of file OHCI.h.

#define ISO_LIST_HEAD   (MAX_STATIC_ED - 3)

Definition at line 84 of file OHCI.h.

#define MAX_ED   HCD_MAX_ENDPOINT

Definition at line 44 of file OHCI.h.

#define MAX_GTD   (MAX_ED + 3)

Definition at line 45 of file OHCI.h.

#define MAX_ITD   0

Definition at line 51 of file OHCI.h.

#define MAX_STATIC_ED   3 /* Serve as list head, fixed, not configurable */

Definition at line 46 of file OHCI.h.

#define OHCI_REG (   x)    LPC_USB

Definition at line 293 of file OHCI.h.

#define OVER_CURRENT_PROTECTION   NO

Definition at line 76 of file OHCI.h.

#define OWNERSHIP_CHANGE_INTERRUPT   NO

Definition at line 66 of file OHCI.h.

#define PER_PORT_OVER_CURRENT_REPORT   NO

Definition at line 75 of file OHCI.h.

#define PER_PORT_POWER_SWITCHING   NO

Definition at line 74 of file OHCI.h.

#define PERIODIC_START   0x00002A27UL /* 10% off from FRAME_INTERVAL */

Definition at line 71 of file OHCI.h.

#define PORT_POWER_SWITCHING   NO

Definition at line 73 of file OHCI.h.

#define REMOTE_WAKEUP_CONNECTED   NO /* Remote wakeup connected */

Definition at line 56 of file OHCI.h.

#define REMOTE_WAKEUP_ENABLE   NO /* Remote wakeup enable */

Definition at line 57 of file OHCI.h.

#define RESUME_DETECT_INTERRUPT   NO

Definition at line 62 of file OHCI.h.

#define SCHEDULING_OVRERRUN_INTERRUPT   NO

Definition at line 59 of file OHCI.h.

#define SOF_INTERRUPT   NO

Definition at line 61 of file OHCI.h.

#define TD_MAX_XFER_LENGTH   0x2000

Definition at line 87 of file OHCI.h.

#define TD_NoInterruptOnComplete   (7)

Definition at line 89 of file OHCI.h.

#define UNRECOVERABLE_ERROR_INTERRUPT   NO

Definition at line 63 of file OHCI.h.

Function Documentation

static INLINE uint32_t Align16 ( uint32_t  Value)
static
static INLINE HCD_STATUS AllocEd ( uint8_t  DeviceAddr,
HCD_USB_SPEED  DeviceSpeed,
uint8_t  EndpointNumber,
HCD_TRANSFER_TYPE  TransferType,
HCD_TRANSFER_DIR  TransferDir,
uint16_t  MaxPacketSize,
uint8_t  Interval,
uint32_t pEdIdx 
)
static
static INLINE HCD_STATUS AllocGtdForEd ( uint8_t  EdIdx)
static
static INLINE HCD_STATUS AllocItdForEd ( uint8_t  EdIdx)
static
struct st_HC_HCCA ATTR_ALIGNED ( 256  )
struct st_HC_GTD ATTR_ALIGNED ( 16  )
struct st_HCD_IsoTransferDescriptor ATTR_ALIGNED ( 32  )
static INLINE void BuildPeriodicStaticEdTree ( uint8_t  HostID)
static
static INLINE HCD_STATUS FreeED ( uint8_t  EdIdx)
static
static INLINE HCD_STATUS FreeGtd ( PHCD_GeneralTransferDescriptor  pGtd)
static
static INLINE HCD_STATUS FreeItd ( PHCD_IsoTransferDescriptor  pItd)
static
static INLINE PHCD_EndpointDescriptor HcdED ( uint8_t  idx)
static
static INLINE PHCD_GeneralTransferDescriptor HcdGTD ( uint8_t  idx)
static
static INLINE PHCD_IsoTransferDescriptor HcdITD ( uint8_t  idx)
static
static INLINE HCD_STATUS InsertEndpoint ( uint8_t  HostID,
uint32_t  EdIdx,
uint8_t  ListIndex 
)
static
static INLINE Bool IsInterruptEndpoint ( uint8_t  EdIdx)
static
static INLINE Bool IsIsoEndpoint ( uint8_t  EdIdx)
static
static INLINE HCD_STATUS OHciHostInit ( uint8_t  HostID)
static
static INLINE HCD_STATUS OHciHostOperational ( uint8_t  HostID)
static
static INLINE HCD_STATUS OHciHostReset ( uint8_t  HostID)
static
static INLINE HCD_STATUS OHciHostSuspend ( uint8_t  HostID)
static
static INLINE HCD_STATUS OHciRhPortPowerOff ( uint8_t  HostID,
uint8_t  uPortNumber 
)
static
static INLINE HCD_STATUS OHciRhPortPowerOn ( uint8_t  HostID,
uint8_t  uPortNumber 
)
static
static INLINE HCD_STATUS OHciRhPortResume ( uint8_t  HostID,
uint8_t  uPortNumber 
)
static
static INLINE HCD_STATUS OHciRhPortSuspend ( uint8_t  HostID,
uint8_t  uPortNumber 
)
static
static void PipehandleCreate ( uint32_t pPipeHandle,
uint8_t  HostID,
uint8_t  idx 
)
static
static HCD_STATUS PipehandleParse ( uint32_t  Pipehandle,
uint8_t *  HostID,
uint8_t *  EdIdx 
)
static
static HCD_STATUS QueueGTDs ( uint32_t  EdIdx,
uint8_t *  dataBuff,
uint32_t  xferLen,
uint8_t  Direction 
)
static
static HCD_STATUS QueueOneGTD ( uint32_t  EdIdx,
uint8_t *const  CurrentBufferPointer,
uint32_t  xferLen,
uint8_t  DirectionPID,
uint8_t  DataToggle,
uint8_t  IOC 
)
static
static INLINE HCD_STATUS RemoveEndpoint ( uint8_t  HostID,
uint32_t  EdIdx 
)
static
static HCD_STATUS WaitForTransferComplete ( uint8_t  EdIdx)
static

Variable Documentation

uint32_t BufferEnd

Definition at line 248 of file OHCI.h.

uint32_t BufferPage0

Definition at line 293 of file OHCI.h.

uint32_t BufferRounding

Definition at line 232 of file OHCI.h.

__IO uint32_t ConditionCode

Definition at line 237 of file OHCI.h.

__IO uint8_t* CurrentBufferPointer

Definition at line 242 of file OHCI.h.

__IO uint32_t DataToggle

Definition at line 235 of file OHCI.h.

uint32_t DelayInterrupt

Definition at line 234 of file OHCI.h.

uint32_t Direction

Definition at line 195 of file OHCI.h.

uint32_t DirectionPID

Definition at line 233 of file OHCI.h.

uint16_t EdIdx

Definition at line 311 of file OHCI.h.

uint32_t EndpointNumber

Definition at line 194 of file OHCI.h.

__IO uint32_t ErrorCount

Definition at line 236 of file OHCI.h.

uint32_t Format

Definition at line 198 of file OHCI.h.

uint32_t FrameCount

Definition at line 286 of file OHCI.h.

uint32_t FunctionAddr

Definition at line 193 of file OHCI.h.

uint32_t Halted

Definition at line 210 of file OHCI.h.

__I uint32_t HccaDoneHead

Definition at line 165 of file OHCI.h.

__I uint16_t HccaFrameNumber

Definition at line 163 of file OHCI.h.

__O uint32_t HccaIntTable[32]

Definition at line 162 of file OHCI.h.

__I uint16_t HccaPad1

Definition at line 164 of file OHCI.h.

__I uint8_t HccaReserved[116]

Definition at line 166 of file OHCI.h.

union { ... } HeadP
__IO uint32_t HeadTD

Definition at line 208 of file OHCI.h.

uint32_t inUse

Definition at line 306 of file OHCI.h.

uint32_t MaxPackageSize

Definition at line 199 of file OHCI.h.

uint32_t NextED

Definition at line 218 of file OHCI.h.

__IO uint32_t NextTD

Definition at line 245 of file OHCI.h.

__IO uint16_t OffsetPSW[8]

Definition at line 302 of file OHCI.h.

OHCI_HOST_DATA_Type ohci_data[MAX_USB_CORE]
struct st_HC_ED * PHC_ED

Definition at line 191 of file OHCI.h.

struct st_HC_GTD * PHC_GTD

Definition at line 229 of file OHCI.h.

struct st_HCD_IsoTransferDescriptor * PHCD_IsoTransferDescriptor

Definition at line 281 of file OHCI.h.

uint32_t reserved2[6]

Definition at line 315 of file OHCI.h.

uint16_t reserved3

Definition at line 312 of file OHCI.h.

uint32_t Skip

Definition at line 197 of file OHCI.h.

uint32_t Speed

Definition at line 196 of file OHCI.h.

uint32_t StartingFrame

Definition at line 283 of file OHCI.h.

uint32_t TailP

Definition at line 204 of file OHCI.h.

uint32_t ToggleCarry

Definition at line 211 of file OHCI.h.