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
30 * 31:4 - Frame Pointer
33 * 0 - Terminate (Empty Pointer)
38 * \brief Physical Address of the Frame List
46 * \brief Next Entry in list
50 * 2 - Depth/Breadth Select
52 * 0 - Terminate (Last in List)
57 * \brief Control and Status Field
60 * 29 - Short Packet Detect (Input Only)
61 * 28:27 - Number of Errors Allowed
62 * 26 - Low Speed Device (Communicating with a low speed device)
63 * 25 - Isynchonious Select
64 * 24 - Interrupt on Completion (IOC)
68 * 21 - Data Buffer Error
69 * 20 - Babble Detected
71 * 18 - CRC/Timout Error
75 * 10:0 - Actual Length (Number of bytes transfered)
80 * \brief Packet Header
82 * 31:21 - Maximum Length (0=1, Max 0x4FF, 0x7FF=0)
86 * 14:8 - Device Address
87 * 7:0 - PID (Packet Identifcation) - Only 96, E1, 2D allowed
92 * \brief Pointer to the data to send
100 * \brief Next Entry in list
105 * 0 - Terminate (Last in List)
111 * \brief Next Entry in list
116 * 0 - Terminate (Last in List)
121 // === ENUMERATIONS ===
124 * \brief USB Command Register
127 * 7 - Maximum Packet Size selector (1: 64 bytes, 0: 32 bytes)
128 * 6 - Configure Flag (No Hardware Effect)
129 * 5 - Software Debug (Don't think it will be needed)
130 * 4 - Force Global Resume
131 * 3 - Enter Global Suspend Mode
132 * 2 - Global Reset (Resets all devices on the bus)
133 * 1 - Host Controller Reset (Reset just the controller)
138 * \brief USB Status Register
141 * 5 - HC Halted, set to 1 when USBCMD:RS is set to 0
142 * 4 - Host Controller Process Error (Errors related to the bus)
143 * 3 - Host System Error (Errors related to the OS/PCI Bus)
144 * 2 - Resume Detect (Set if a RESUME command is sent to the Controller)
145 * 1 - USB Error Interrupt
146 * 0 - USB Interrupts (Set if a transaction with the IOC bit set is completed)
150 * \brief USB Interrupt Enable Register
153 * 3 - Short Packet Interrupt Enable
154 * 2 - Interrupt on Complete (IOC) Enable
155 * 1 - Resume Interrupt Enable
156 * 0 - Timout / CRC Error Interrupt Enable
160 * \brief Frame Number (Index into the Frame List)
163 * 10:0 - Index (Incremented each approx 1ms)
167 * \brief Frame List Base Address
169 * 31:12 - Pysical Address >> 12
170 * 11:0 - Reserved (Set to Zero)
172 FLBASEADD = 0x08, // 32-bit
174 * \brief Start-of-frame Modify Register
177 * Sets the size of a frame
178 * Frequency = (11936+n)/12000 kHz
183 SOFMOD = 0x0C, // 8bit
185 * \brief Port Status and Controll Register (Port 1)
191 * 8 - Low Speed Device Attached
193 * 3 - Port Enable/Disable Change - Used for detecting device removal
194 * 2 - Port Enable/Disable
195 * 1 - Connect Status Change
196 * 0 - Current Connect Status
200 * \brief Port Status and Controll Register (Port 2)