Rev 4979 | Rev 4984 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4979 | Rev 4980 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
- | 2 | ;; ;; |
|
- | 3 | ;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
|
- | 4 | ;; Distributed under terms of the GNU General Public License ;; |
|
- | 5 | ;; ;; |
|
- | 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
- | 7 | ||
1 | ; standard driver stuff |
8 | ; standard driver stuff |
2 | format MS COFF |
9 | format MS COFF |
Line 3... | Line 10... | ||
3 | 10 | ||
Line 4... | Line 11... | ||
4 | DEBUG = 1 |
11 | DEBUG = 1 |
5 | 12 | ||
6 | ; this is for DEBUGF macro from 'fdo.inc' |
13 | ; this is for DEBUGF macro from 'fdo.inc' |
Line 7... | Line 14... | ||
7 | __DEBUG__ = 1 |
14 | __DEBUG__ = 1 |
8 | __DEBUG_LEVEL__ = 1 |
15 | __DEBUG_LEVEL__ = 1 |
9 | 16 | ||
10 | include '../proc32.inc' |
17 | include '../../proc32.inc' |
Line 11... | Line 18... | ||
11 | include '../imports.inc' |
18 | include '../../imports.inc' |
12 | include '../fdo.inc' |
19 | include '../../fdo.inc' |
Line 13... | Line 20... | ||
13 | include '../struct.inc' |
20 | include '../../struct.inc' |
Line 169... | Line 176... | ||
169 | stdcall USBGetParam, [.config_pipe], 0 |
176 | stdcall USBGetParam, [.config_pipe], 0 |
170 | DEBUGF 1,'K : Device detected Vendor: %x\n', [eax+usb_descr.idVendor] |
177 | DEBUGF 1,'K : Device detected Vendor: %x\n', [eax+usb_descr.idVendor] |
171 | cmp word[eax+usb_descr.idVendor], 0x0403 |
178 | cmp word[eax+usb_descr.idVendor], 0x0403 |
172 | jnz .notftdi |
179 | jnz .notftdi |
173 | DEBUGF 1,'K : FTDI USB device detected\n' |
180 | DEBUGF 1,'K : FTDI USB device detected\n' |
174 | movi eax, sizeof.ftdi_context |
181 | mov eax, sizeof.ftdi_context |
175 | call Kmalloc |
182 | call Kmalloc |
176 | test eax, eax |
183 | test eax, eax |
177 | jnz @f |
184 | jnz @f |
178 | mov esi, nomemory_msg |
185 | mov esi, nomemory_msg |
179 | call SysMsgBoardStr |
186 | call SysMsgBoardStr |
Line 235... | Line 242... | ||
235 | DEBUGF 1,'K : FTDI Seting bitmode\n' |
242 | DEBUGF 1,'K : FTDI Seting bitmode\n' |
236 | xor ecx, ecx |
243 | xor ecx, ecx |
237 | xor esi, esi |
244 | xor esi, esi |
238 | call CreateEvent |
245 | call CreateEvent |
239 | mov edi, [ioctl] |
246 | mov edi, [ioctl] |
240 | DEBUGF 1,'K : Event created %x %x\n' , eax, edx |
- | |
241 | mov [EventData], eax |
247 | mov [EventData], eax |
242 | mov [EventData+4], edx |
248 | mov [EventData+4], edx |
243 | mov dword[ConfPacket], (FTDI_DEVICE_IN_REQTYPE) + (SIO_SET_BITMODE_REQUEST shl 8) + (0x0000 shl 16) |
249 | mov dword[ConfPacket], (FTDI_DEVICE_IN_REQTYPE) + (SIO_SET_BITMODE_REQUEST shl 8) + (0x0000 shl 16) |
244 | mov edi, [edi+input] |
250 | mov edi, [edi+input] |
245 | mov dx, word[edi+4] |
251 | mov dx, word[edi+4] |
Line 280... | Line 286... | ||
280 | restore output |
286 | restore output |
281 | restore out_size |
287 | restore out_size |
Line 282... | Line 288... | ||
282 | 288 | ||
283 | 289 | ||
Line 284... | Line 290... | ||
284 | align 4 |
290 | align 4 |
285 | proc control_callback stdcall uses ebx, .pipe:DWORD, .status:DWORD, .buffer:DWORD, .length:DWORD, .calldata:DWORD |
291 | proc control_callback stdcall uses ebx, edi, .pipe:DWORD, .status:DWORD, .buffer:DWORD, .length:DWORD, .calldata:DWORD |
286 | 292 | ||
287 | mov eax, [.calldata] |
293 | mov ecx, [.calldata] |
288 | mov ebx, [.calldata+4] |
294 | mov eax, [ecx] |
289 | DEBUGF 1,'K : EventData %x %x', [.calldata], [.calldata+4] |
295 | mov ebx, [ecx+4] |
290 | xor edx, edx |
296 | xor edx, edx |
291 | call RaiseEvent |
297 | call RaiseEvent |