forked from KolibriOS/kolibrios
Small fix in ftdi_get_list. Added memset in ftdi_read_data
git-svn-id: svn://kolibrios.org@5037 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2fe5245774
commit
88cafe6b95
@ -6,7 +6,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
head dd 0
|
head dd 0
|
||||||
size dd 0
|
|
||||||
|
|
||||||
linkedlist_add:
|
linkedlist_add:
|
||||||
push ebx
|
push ebx
|
||||||
|
@ -22,10 +22,10 @@ __DEBUG_LEVEL__ = 1
|
|||||||
node equ ftdi_context
|
node equ ftdi_context
|
||||||
node.next equ ftdi_context.next_context
|
node.next equ ftdi_context.next_context
|
||||||
|
|
||||||
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
|
||||||
@ -611,6 +611,11 @@ endl
|
|||||||
jmp .eventdestroy
|
jmp .eventdestroy
|
||||||
@@:
|
@@:
|
||||||
mov edi, eax
|
mov edi, eax
|
||||||
|
push edi eax
|
||||||
|
mov ecx, [esi+8]
|
||||||
|
xor eax, eax
|
||||||
|
rep stosb
|
||||||
|
pop eax edi
|
||||||
mov dword[ConfPacket], eax ; Store in ConfPAcket ptr to allocated memory
|
mov dword[ConfPacket], eax ; Store in ConfPAcket ptr to allocated memory
|
||||||
;---Dirty hack end
|
;---Dirty hack end
|
||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
@ -637,7 +642,6 @@ endl
|
|||||||
cmp [EventData+8], -1
|
cmp [EventData+8], -1
|
||||||
jz .error
|
jz .error
|
||||||
add ecx, [EventData+8]
|
add ecx, [EventData+8]
|
||||||
DEBUGF 1, 'K : In buffer %x\n', [edi]
|
|
||||||
jmp .read_loop
|
jmp .read_loop
|
||||||
;---Dirty hack begin
|
;---Dirty hack begin
|
||||||
.read_end:
|
.read_end:
|
||||||
@ -687,13 +691,13 @@ endl
|
|||||||
jmp .endswitch
|
jmp .endswitch
|
||||||
|
|
||||||
.ftdi_get_list:
|
.ftdi_get_list:
|
||||||
|
mov edi, [edi+output]
|
||||||
|
xor ecx, ecx
|
||||||
call linkedlist_gethead
|
call linkedlist_gethead
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .endswitch
|
jz .emptylist
|
||||||
mov edi, [edi+output]
|
|
||||||
push edi
|
push edi
|
||||||
add edi, 4
|
add edi, 4
|
||||||
xor ecx, ecx
|
|
||||||
.nextdev:
|
.nextdev:
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp [eax + ftdi_context.lockPID], 0
|
cmp [eax + ftdi_context.lockPID], 0
|
||||||
@ -711,6 +715,7 @@ endl
|
|||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .nextdev
|
jnz .nextdev
|
||||||
pop edi
|
pop edi
|
||||||
|
.emptylist:
|
||||||
mov [edi], ecx
|
mov [edi], ecx
|
||||||
jmp .endswitch
|
jmp .endswitch
|
||||||
|
|
||||||
@ -718,7 +723,6 @@ endl
|
|||||||
mov esi, [edi+input]
|
mov esi, [edi+input]
|
||||||
mov ebx, [esi+4]
|
mov ebx, [esi+4]
|
||||||
mov eax, [ebx + ftdi_context.lockPID]
|
mov eax, [ebx + ftdi_context.lockPID]
|
||||||
DEBUGF 1, 'K : to PID %x from PID %x\n', [esi], eax
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .lockedby
|
jnz .lockedby
|
||||||
mov eax, [esi]
|
mov eax, [esi]
|
||||||
@ -733,7 +737,6 @@ endl
|
|||||||
mov edi, [edi+output]
|
mov edi, [edi+output]
|
||||||
mov ebx, [esi+4]
|
mov ebx, [esi+4]
|
||||||
mov eax, [ebx + ftdi_context.lockPID]
|
mov eax, [ebx + ftdi_context.lockPID]
|
||||||
DEBUGF 1, 'K : to PID %x from PID %x\n', [esi], eax
|
|
||||||
cmp eax, [esi]
|
cmp eax, [esi]
|
||||||
jnz .unlockimp
|
jnz .unlockimp
|
||||||
mov [ebx + ftdi_context.lockPID], 0
|
mov [ebx + ftdi_context.lockPID], 0
|
||||||
|
Loading…
Reference in New Issue
Block a user