4 * - Universal Host Controller Interface
10 typedef struct sUHCI_Controller tUHCI_Controller;
11 typedef struct sUHCI_TD tUHCI_TD;
12 typedef struct sUHCI_QH tUHCI_QH;
15 struct sUHCI_Controller
18 * \brief PCI Device ID
23 * \brief IO Base Address
28 * \brief IRQ Number assigned to the device
35 * 31:4 - Frame Pointer
38 * 0 - Terminate (Empty Pointer)
43 * \brief Physical Address of the Frame List
51 * \brief Next Entry in list
55 * 2 - Depth/Breadth Select
57 * 0 - Terminate (Last in List)
62 * \brief Control and Status Field
65 * 29 - Short Packet Detect (Input Only)
66 * 28:27 - Number of Errors Allowed
67 * 26 - Low Speed Device (Communicating with a low speed device)
68 * 25 - Isynchonious Select
69 * 24 - Interrupt on Completion (IOC)
73 * 21 - Data Buffer Error
74 * 20 - Babble Detected
76 * 18 - CRC/Timout Error
80 * 10:0 - Actual Length (Number of bytes transfered)
85 * \brief Packet Header
87 * 31:21 - Maximum Length (0=1, Max 0x4FF, 0x7FF=0)
91 * 14:8 - Device Address
92 * 7:0 - PID (Packet Identifcation) - Only 96, E1, 2D allowed
97 * \brief Pointer to the data to send
105 * \brief Next Entry in list
110 * 0 - Terminate (Last in List)
116 * \brief Next Entry in list
121 * 0 - Terminate (Last in List)
126 // === ENUMERATIONS ===
129 * \brief USB Command Register
132 * 7 - Maximum Packet Size selector (1: 64 bytes, 0: 32 bytes)
133 * 6 - Configure Flag (No Hardware Effect)
134 * 5 - Software Debug (Don't think it will be needed)
135 * 4 - Force Global Resume
136 * 3 - Enter Global Suspend Mode
137 * 2 - Global Reset (Resets all devices on the bus)
138 * 1 - Host Controller Reset (Reset just the controller)
143 * \brief USB Status Register
146 * 5 - HC Halted, set to 1 when USBCMD:RS is set to 0
147 * 4 - Host Controller Process Error (Errors related to the bus)
148 * 3 - Host System Error (Errors related to the OS/PCI Bus)
149 * 2 - Resume Detect (Set if a RESUME command is sent to the Controller)
150 * 1 - USB Error Interrupt
151 * 0 - USB Interrupts (Set if a transaction with the IOC bit set is completed)
155 * \brief USB Interrupt Enable Register
158 * 3 - Short Packet Interrupt Enable
159 * 2 - Interrupt on Complete (IOC) Enable
160 * 1 - Resume Interrupt Enable
161 * 0 - Timout / CRC Error Interrupt Enable
165 * \brief Frame Number (Index into the Frame List)
168 * 10:0 - Index (Incremented each approx 1ms)
172 * \brief Frame List Base Address
174 * 31:12 - Pysical Address >> 12
175 * 11:0 - Reserved (Set to Zero)
177 FLBASEADD = 0x08, // 32-bit
179 * \brief Start-of-frame Modify Register
182 * Sets the size of a frame
183 * Frequency = (11936+n)/12000 kHz
188 SOFMOD = 0x0C, // 8bit
190 * \brief Port Status and Controll Register (Port 1)
196 * 8 - Low Speed Device Attached
198 * 3 - Port Enable/Disable Change - Used for detecting device removal
199 * 2 - Port Enable/Disable
200 * 1 - Connect Status Change
201 * 0 - Current Connect Status
205 * \brief Port Status and Controll Register (Port 2)