Rev 4423 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4423 | Rev 5201 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | ; ============================================================================= |
4 | ; ============================================================================= |
5 | ; ================================= Constants ================================= |
5 | ; ================================= Constants ================================= |
6 | ; ============================================================================= |
6 | ; ============================================================================= |
7 | ; Version of all structures related to host controllers. |
7 | ; Version of all structures related to host controllers. |
8 | ; Must be the same in kernel and *hci-drivers. |
8 | ; Must be the same in kernel and *hci-drivers. |
9 | USBHC_VERSION = 1 |
9 | USBHC_VERSION = 2 |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | ; USB device must have at least 100ms of stable power before initializing can |
11 | ; USB device must have at least 100ms of stable power before initializing can |
12 | ; proceed; one timer tick is 10ms, so enforce delay in 10 ticks |
12 | ; proceed; one timer tick is 10ms, so enforce delay in 10 ticks |
13 | USB_CONNECT_DELAY = 10 |
13 | USB_CONNECT_DELAY = 10 |
Line 44... | Line 44... | ||
44 | USB_STATUS_BUFOVERRUN = 12 ; overflow of internal controller buffer |
44 | USB_STATUS_BUFOVERRUN = 12 ; overflow of internal controller buffer |
45 | USB_STATUS_BUFUNDERRUN = 13 ; underflow of internal controller buffer |
45 | USB_STATUS_BUFUNDERRUN = 13 ; underflow of internal controller buffer |
46 | USB_STATUS_CLOSED = 16 ; pipe closed |
46 | USB_STATUS_CLOSED = 16 ; pipe closed |
47 | ; either explicitly with USBClosePipe |
47 | ; either explicitly with USBClosePipe |
48 | ; or implicitly due to device disconnect |
48 | ; or implicitly due to device disconnect |
- | 49 | USB_STATUS_CANCELLED = 17 ; transfer cancelled with USBAbortPipe |
|
Line 49... | Line 50... | ||
49 | 50 | ||
50 | ; Possible speeds of USB devices |
51 | ; Possible speeds of USB devices |
51 | USB_SPEED_FS = 0 ; full-speed |
52 | USB_SPEED_FS = 0 ; full-speed |
52 | USB_SPEED_LS = 1 ; low-speed |
53 | USB_SPEED_LS = 1 ; low-speed |
Line 61... | Line 62... | ||
61 | ; to device disconnect, so it must remain valid until return from disconnect |
62 | ; to device disconnect, so it must remain valid until return from disconnect |
62 | ; callback provided by the driver |
63 | ; callback provided by the driver |
63 | USB_FLAG_EXTRA_WAIT = 4 |
64 | USB_FLAG_EXTRA_WAIT = 4 |
64 | ; The pipe was in wait list, while another event occured; |
65 | ; The pipe was in wait list, while another event occured; |
65 | ; when the first wait will be done, reinsert the pipe to wait list |
66 | ; when the first wait will be done, reinsert the pipe to wait list |
- | 67 | USB_FLAG_DISABLED = 8 |
|
- | 68 | ; The pipe is temporarily disabled so that it is not visible to hardware |
|
- | 69 | ; but still remains in software list. Used for usb_abort_pipe. |
|
66 | USB_FLAG_CLOSED_BIT = 0 ; USB_FLAG_CLOSED = 1 shl USB_FLAG_CLOSED_BIT |
70 | USB_FLAG_CLOSED_BIT = 0 ; USB_FLAG_CLOSED = 1 shl USB_FLAG_CLOSED_BIT |
Line 67... | Line 71... | ||
67 | 71 | ||
68 | ; ============================================================================= |
72 | ; ============================================================================= |
69 | ; ================================ Structures ================================= |
73 | ; ================================ Structures ================================= |
Line 134... | Line 138... | ||
134 | ; ecx -> last descriptor for the transfer |
138 | ; ecx -> last descriptor for the transfer |
135 | NewDevice dd ? |
139 | NewDevice dd ? |
136 | ; Initiate configuration of a new device (create pseudo-pipe describing that |
140 | ; Initiate configuration of a new device (create pseudo-pipe describing that |
137 | ; device and call usb_new_device). |
141 | ; device and call usb_new_device). |
138 | ; esi -> usb_controller, eax = speed (one of USB_SPEED_* constants). |
142 | ; esi -> usb_controller, eax = speed (one of USB_SPEED_* constants). |
- | 143 | DisablePipe dd ? |
|
- | 144 | ; This procedure temporarily removes the given pipe from hardware queue. |
|
- | 145 | ; esi -> usb_controller, ebx -> usb_pipe |
|
- | 146 | EnablePipe dd ? |
|
- | 147 | ; This procedure reinserts the given pipe to hardware queue |
|
- | 148 | ; after DisablePipe, with clearing transfer queue. |
|
- | 149 | ; esi -> usb_controller, ebx -> usb_pipe |
|
- | 150 | ; edx -> current descriptor, eax -> new last descriptor |
|
139 | ends |
151 | ends |
Line 140... | Line 152... | ||
140 | 152 | ||
141 | ; pointers to kernel API functions that are called from *HCI-drivers |
153 | ; pointers to kernel API functions that are called from *HCI-drivers |
142 | struct usbhc_func |
154 | struct usbhc_func |
Line 305... | Line 317... | ||
305 | ; Next endpoint in the processing list. |
317 | ; Next endpoint in the processing list. |
306 | ; See also PrevVirt field and the description before NextVirt field. |
318 | ; See also PrevVirt field and the description before NextVirt field. |
307 | PrevVirt dd ? |
319 | PrevVirt dd ? |
308 | ; Previous endpoint in the processing list. |
320 | ; Previous endpoint in the processing list. |
309 | ; See also NextVirt field and the description before NextVirt field. |
321 | ; See also NextVirt field and the description before NextVirt field. |
- | 322 | BaseList dd ? |
|
- | 323 | ; Pointer to head of the processing list. |
|
310 | ; |
324 | ; |
311 | ; Every pipe has the associated transfer queue, that is, the double-linked |
325 | ; Every pipe has the associated transfer queue, that is, the double-linked |
312 | ; list of Transfer Descriptors aka TD. For Control, Bulk and Interrupt |
326 | ; list of Transfer Descriptors aka TD. For Control, Bulk and Interrupt |
313 | ; endpoints this list consists of usb_gtd structures |
327 | ; endpoints this list consists of usb_gtd structures |
314 | ; (GTD = General Transfer Descriptors), for Isochronous endpoints |
328 | ; (GTD = General Transfer Descriptors), for Isochronous endpoints |
Line 425... | Line 439... | ||
425 | ; Port on the TTHub, zero-based. |
439 | ; Port on the TTHub, zero-based. |
426 | DeviceDescrSize db ? |
440 | DeviceDescrSize db ? |
427 | ; Size of device descriptor. |
441 | ; Size of device descriptor. |
428 | Speed db ? |
442 | Speed db ? |
429 | ; Device speed, one of USB_SPEED_*. |
443 | ; Device speed, one of USB_SPEED_*. |
- | 444 | Timer dd ? |
|
- | 445 | ; Handle of timer that handles request timeout. |
|
430 | NumInterfaces dd ? |
446 | NumInterfaces dd ? |
431 | ; Number of interfaces. |
447 | ; Number of interfaces. |
432 | ConfigDataSize dd ? |
448 | ConfigDataSize dd ? |
433 | ; Total size of data associated with the configuration descriptor |
449 | ; Total size of data associated with the configuration descriptor |
434 | ; (including the configuration descriptor itself). |
450 | ; (including the configuration descriptor itself). |