forked from KolibriOS/kolibrios
Fixed controll_callback. Added GPL header to the driver. Added USB functions in imports.inc
git-svn-id: svn://kolibrios.org@4980 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
81384e65b4
commit
7dd994b4b2
@ -93,6 +93,12 @@ kernel_export \
|
|||||||
LFBAddress,\
|
LFBAddress,\
|
||||||
GetDisplay,\
|
GetDisplay,\
|
||||||
SetScreen,\
|
SetScreen,\
|
||||||
|
\
|
||||||
|
RegUSBDriver,\
|
||||||
|
USBOpenPipe,\
|
||||||
|
USBNormalTransferAsync,\
|
||||||
|
USBControlTransferAsync,\
|
||||||
|
USBGetParam,\
|
||||||
\
|
\
|
||||||
NetRegDev,\
|
NetRegDev,\
|
||||||
NetUnRegDev,\
|
NetUnRegDev,\
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; ;;
|
||||||
|
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
|
||||||
|
;; Distributed under terms of the GNU General Public License ;;
|
||||||
|
;; ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
; standard driver stuff
|
; standard driver stuff
|
||||||
format MS COFF
|
format MS COFF
|
||||||
|
|
||||||
@ -7,10 +14,10 @@ DEBUG = 1
|
|||||||
__DEBUG__ = 1
|
__DEBUG__ = 1
|
||||||
__DEBUG_LEVEL__ = 1
|
__DEBUG_LEVEL__ = 1
|
||||||
|
|
||||||
include '../proc32.inc'
|
include '../../proc32.inc'
|
||||||
include '../imports.inc'
|
include '../../imports.inc'
|
||||||
include '../fdo.inc'
|
include '../../fdo.inc'
|
||||||
include '../struct.inc'
|
include '../../struct.inc'
|
||||||
|
|
||||||
public START
|
public START
|
||||||
public version
|
public version
|
||||||
@ -171,7 +178,7 @@ proc AddDevice stdcall uses ebx, .config_pipe:DWORD, .config_descr:DWORD, .inter
|
|||||||
cmp word[eax+usb_descr.idVendor], 0x0403
|
cmp word[eax+usb_descr.idVendor], 0x0403
|
||||||
jnz .notftdi
|
jnz .notftdi
|
||||||
DEBUGF 1,'K : FTDI USB device detected\n'
|
DEBUGF 1,'K : FTDI USB device detected\n'
|
||||||
movi eax, sizeof.ftdi_context
|
mov eax, sizeof.ftdi_context
|
||||||
call Kmalloc
|
call Kmalloc
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz @f
|
jnz @f
|
||||||
@ -237,9 +244,8 @@ endl
|
|||||||
xor esi, esi
|
xor esi, esi
|
||||||
call CreateEvent
|
call CreateEvent
|
||||||
mov edi, [ioctl]
|
mov edi, [ioctl]
|
||||||
DEBUGF 1,'K : Event created %x %x\n' , eax, edx
|
|
||||||
mov [EventData], eax
|
mov [EventData], eax
|
||||||
mov [EventData+4], edx
|
mov [EventData+4], edx
|
||||||
mov dword[ConfPacket], (FTDI_DEVICE_IN_REQTYPE) + (SIO_SET_BITMODE_REQUEST shl 8) + (0x0000 shl 16)
|
mov dword[ConfPacket], (FTDI_DEVICE_IN_REQTYPE) + (SIO_SET_BITMODE_REQUEST shl 8) + (0x0000 shl 16)
|
||||||
mov edi, [edi+input]
|
mov edi, [edi+input]
|
||||||
mov dx, word[edi+4]
|
mov dx, word[edi+4]
|
||||||
@ -282,11 +288,11 @@ restore out_size
|
|||||||
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc control_callback stdcall uses ebx, .pipe:DWORD, .status:DWORD, .buffer:DWORD, .length:DWORD, .calldata:DWORD
|
proc control_callback stdcall uses ebx, edi, .pipe:DWORD, .status:DWORD, .buffer:DWORD, .length:DWORD, .calldata:DWORD
|
||||||
|
|
||||||
mov eax, [.calldata]
|
mov ecx, [.calldata]
|
||||||
mov ebx, [.calldata+4]
|
mov eax, [ecx]
|
||||||
DEBUGF 1,'K : EventData %x %x', [.calldata], [.calldata+4]
|
mov ebx, [ecx+4]
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
call RaiseEvent
|
call RaiseEvent
|
||||||
DEBUGF 1, 'K : status is %d\n', [.status+24h]
|
DEBUGF 1, 'K : status is %d\n', [.status+24h]
|
||||||
|
Loading…
Reference in New Issue
Block a user