Subversion Repositories Kolibri OS

Rev

Rev 5363 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5363 Rev 7552
Line 11... Line 11...
11
;;          Version 2, June 1991                                ;;
11
;;          Version 2, June 1991                                ;;
12
;;                                                              ;;
12
;;                                                              ;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 14... Line 14...
14
 
14
 
-
 
15
format PE DLL native 0.05
Line 15... Line 16...
15
format PE DLL native 0.05
16
entry START
Line 16... Line 17...
16
 
17
 
17
DEBUG = 1
18
DEBUG = 1
Line 475... Line 476...
475
        
476
        
476
  .ftdi_usb_reset:
477
  .ftdi_usb_reset:
477
        DEBUGF 2,'K : FTDI Reseting PID: %d Dev handler 0x0x%x\n', [edi],\
478
        DEBUGF 2,'K : FTDI Reseting PID: %d Dev handler 0x0x%x\n', [edi],\
478
                                                                        [edi+4]
479
                                                                        [edi+4]
479
        mov     dword[ConfPacket], (FTDI_DEVICE_OUT_REQTYPE) \
480
        mov     dword[ConfPacket], (FTDI_DEVICE_OUT_REQTYPE) \
480
                                 + (SIO_RESET_REQUEST shl 8) \+
481
                                 + (SIO_RESET_REQUEST shl 8) \
481
                                   (SIO_RESET_SIO shl 16)
482
                                 + (SIO_RESET_SIO shl 16)
Line 482... Line 483...
482
        jmp     .ftdi_out_control_transfer_noinp  
483
        jmp     .ftdi_out_control_transfer_noinp  
483
        
484
        
484
  .ftdi_purge_rx_buf:
485
  .ftdi_purge_rx_buf:
Line 547... Line 548...
547
 
548
 
548
  .ftdi_read_pins:
549
  .ftdi_read_pins:
549
        DEBUGF 2, 'K : FTDI Read pins PID: %d Dev handler 0x0x%x\n', [edi],\
550
        DEBUGF 2, 'K : FTDI Read pins PID: %d Dev handler 0x0x%x\n', [edi],\
550
                                                                     [edi+4]
551
                                                                     [edi+4]
551
        mov     ebx, [edi+4] 
552
        mov     ebx, [edi+4] 
552
        mov     dword[ConfPacket], (FTDI_DEVICE_IN_REQTYPE) /
553
        mov     dword[ConfPacket], (FTDI_DEVICE_IN_REQTYPE) \
553
                                 + (SIO_READ_PINS_REQUEST shl 8) + (0 shl 16)
554
                                 + (SIO_READ_PINS_REQUEST shl 8) + (0 shl 16)
554
        mov     ecx, [ebx + ftdi_context.index]
555
        mov     ecx, [ebx + ftdi_context.index]
555
        mov     word[ConfPacket+4], cx
556
        mov     word[ConfPacket+4], cx
556
        mov     word[ConfPacket+6], 1
557
        mov     word[ConfPacket+6], 1
557
        lea     esi, [ConfPacket]
558
        lea     esi, [ConfPacket]
558
        lea     edi, [EventData]
559
        lea     edi, [EventData]
559
        mov     ecx, esi
560
        mov     ecx, esi
560
        add     ecx, 8
561
        add     ecx, 8
561
        mov     word[ConfPacket+8], 0
562
        mov     word[ConfPacket+8], 0
562
        invoke  USBControlTransferAsync, [ebx + ftdi_context.nullP],  esi, ecx, /
563
        invoke  USBControlTransferAsync, [ebx + ftdi_context.nullP],  esi, ecx, \
563
                                            1, control_callback, edi, 0
564
                                            1, control_callback, edi, 0
564
        mov     eax, [EventData]
565
        mov     eax, [EventData]
565
        mov     ebx, [EventData+4]
566
        mov     ebx, [EventData+4]
566
        invoke  WaitEvent
567
        invoke  WaitEvent
Line 762... Line 763...
762
        mov     ebx, [EventData+4]
763
        mov     ebx, [EventData+4]
763
        invoke  WaitEvent
764
        invoke  WaitEvent
764
        jmp     .endswitch
765
        jmp     .endswitch
Line 765... Line 766...
765
                
766
                
766
  .ftdi_get_list:
767
  .ftdi_get_list:
767
        DEBUGF 2, 'K : FTDI devices\' list request\n'  
768
        DEBUGF 2, 'K : FTDI devices list request\n'  
768
        mov     edi, [edi+output]
769
        mov     edi, [edi+output]
769
        xor     ecx, ecx
770
        xor     ecx, ecx
770
        call    linkedlist_gethead
771
        call    linkedlist_gethead
771
        test    eax, eax
772
        test    eax, eax