Rev 3520 | Rev 3826 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3520 | Rev 3745 | ||
---|---|---|---|
Line 695... | Line 695... | ||
695 | .return0: |
695 | .return0: |
696 | xor eax, eax |
696 | xor eax, eax |
697 | ret |
697 | ret |
698 | endp |
698 | endp |
Line -... | Line 699... | ||
- | 699 | ||
- | 700 | ; Part of API for drivers, see documentation for USBGetParam. |
|
- | 701 | proc usb_get_param |
|
- | 702 | virtual at esp |
|
- | 703 | dd ? ; return address |
|
- | 704 | .pipe dd ? |
|
- | 705 | .param dd ? |
|
- | 706 | end virtual |
|
- | 707 | mov edx, [.param] |
|
- | 708 | mov ecx, [.pipe] |
|
- | 709 | mov eax, [ecx+usb_pipe.DeviceData] |
|
- | 710 | test edx, edx |
|
- | 711 | jz .get_device_descriptor |
|
- | 712 | dec edx |
|
- | 713 | jz .get_config_descriptor |
|
- | 714 | dec edx |
|
- | 715 | jz .get_speed |
|
- | 716 | or eax, -1 |
|
- | 717 | ret 8 |
|
- | 718 | .get_device_descriptor: |
|
- | 719 | add eax, usb_device_data.DeviceDescriptor |
|
- | 720 | ret 8 |
|
- | 721 | .get_config_descriptor: |
|
- | 722 | movzx ecx, [eax+usb_device_data.DeviceDescrSize] |
|
- | 723 | lea eax, [eax+ecx+usb_device_data.DeviceDescriptor] |
|
- | 724 | ret 8 |
|
- | 725 | .get_speed: |
|
- | 726 | movzx eax, [eax+usb_device_data.Speed] |
|
- | 727 | ret 8 |
|
- | 728 | endp |
|
699 | 729 | ||
700 | ; Initialize software part of usb_gtd. Called from controller-specific code |
730 | ; Initialize software part of usb_gtd. Called from controller-specific code |
701 | ; somewhere in AllocTransfer with eax -> next (inactive) usb_gtd, |
731 | ; somewhere in AllocTransfer with eax -> next (inactive) usb_gtd, |
702 | ; ebx -> usb_pipe, ebp frame from call to AllocTransfer with [.td] -> |
732 | ; ebx -> usb_pipe, ebp frame from call to AllocTransfer with [.td] -> |
703 | ; current (initializing) usb_gtd. |
733 | ; current (initializing) usb_gtd. |