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:
gtament 2014-06-17 19:38:17 +00:00
parent 81384e65b4
commit 7dd994b4b2
2 changed files with 23 additions and 11 deletions

View File

@ -93,6 +93,12 @@ kernel_export \
LFBAddress,\
GetDisplay,\
SetScreen,\
\
RegUSBDriver,\
USBOpenPipe,\
USBNormalTransferAsync,\
USBControlTransferAsync,\
USBGetParam,\
\
NetRegDev,\
NetUnRegDev,\

View File

@ -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
format MS COFF
@ -7,10 +14,10 @@ DEBUG = 1
__DEBUG__ = 1
__DEBUG_LEVEL__ = 1
include '../proc32.inc'
include '../imports.inc'
include '../fdo.inc'
include '../struct.inc'
include '../../proc32.inc'
include '../../imports.inc'
include '../../fdo.inc'
include '../../struct.inc'
public START
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
jnz .notftdi
DEBUGF 1,'K : FTDI USB device detected\n'
movi eax, sizeof.ftdi_context
mov eax, sizeof.ftdi_context
call Kmalloc
test eax, eax
jnz @f
@ -237,9 +244,8 @@ endl
xor esi, esi
call CreateEvent
mov edi, [ioctl]
DEBUGF 1,'K : Event created %x %x\n' , eax, edx
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 edi, [edi+input]
mov dx, word[edi+4]
@ -282,11 +288,11 @@ restore out_size
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 ebx, [.calldata+4]
DEBUGF 1,'K : EventData %x %x', [.calldata], [.calldata+4]
mov ecx, [.calldata]
mov eax, [ecx]
mov ebx, [ecx+4]
xor edx, edx
call RaiseEvent
DEBUGF 1, 'K : status is %d\n', [.status+24h]