Subversion Repositories Kolibri OS

Rev

Rev 567 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 567 Rev 572
Line 11... Line 11...
11
 
11
 
Line 12... Line 12...
12
API_VERSION     equ 0  ;debug
12
API_VERSION     equ 0  ;debug
13
 
13
 
-
 
14
include '../proc32.inc'
Line 14... Line 15...
14
include '../proc32.inc'
15
include '../imports.inc'
15
include '../imports.inc'
16
include 'urb.inc'
16
 
17
 
17
struc UHCI
18
struc UHCI
Line 369... Line 370...
369
           mov ecx, [edi+TD.addr]
370
           mov ecx, [edi+TD.addr]
370
           mov [eax+edx], ecx
371
           mov [eax+edx], ecx
371
           ret
372
           ret
372
endp
373
endp
Line -... Line 374...
-
 
374
 
-
 
375
 
-
 
376
align 4
-
 
377
proc usb_get_descriptor stdcall, dev:dword, type:dword, index:dword,\
-
 
378
                                 buf:dword, size:dword
-
 
379
 
-
 
380
           locals
-
 
381
             count        dd ?
-
 
382
           endl
-
 
383
 
-
 
384
           mov esi, [buf]
-
 
385
           mov ecx, [size]
-
 
386
           xor eax, eax
-
 
387
           cld
-
 
388
           rep stosb
-
 
389
 
-
 
390
           mov [count], 3
-
 
391
@@:
-
 
392
           mov eax, [type]
-
 
393
           shl eax, 8
-
 
394
           add eax, [index]
-
 
395
           stdcall usb_control_msg, [dev],pipe,USB_REQ_GET_DESCRIPTOR,\
-
 
396
                                    USB_DIR_IN, eax,0,[buf], [size],\
-
 
397
                                    USB_CTRL_GET_TIMEOUT
-
 
398
           test eax, eax
-
 
399
           jz .next
-
 
400
           cmp eax, -1
-
 
401
           je .next
-
 
402
           jmp. ok
-
 
403
.next:
-
 
404
           dec [count]
-
 
405
           jnz @B
-
 
406
           mov eax, -1
-
 
407
.ok:
-
 
408
           ret
-
 
409
endp
373
 
410
 
374
DEVICE_ID    equ  0x24D2     ;  pci device id
411
DEVICE_ID    equ  0x24D2     ;  pci device id
375
VENDOR_ID    equ  0x8086     ;  device vendor id
412
VENDOR_ID    equ  0x8086     ;  device vendor id
Line 376... Line 413...
376
QEMU_USB     equ  0x7020
413
QEMU_USB     equ  0x7020