Subversion Repositories Kolibri OS

Rev

Rev 416 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 416 Rev 417
Line 162... Line 162...
162
CONNECTION_SIZE equ 7*4
162
CONNECTION_SIZE equ 7*4
Line 163... Line 163...
163
 
163
 
Line 164... Line 164...
164
UART_VERSION  equ 0x12345678        ;debug
164
UART_VERSION  equ 0x12345678        ;debug
-
 
165
 
-
 
166
proc init_uart_service stdcall, state:dword
-
 
167
 
-
 
168
           cmp [state], 1
165
 
169
           jne .stop
166
init_uart_service:
170
 
167
           mov eax, UART_SIZE
171
           mov eax, UART_SIZE
168
           call malloc
172
           call malloc
Line 239... Line 243...
239
           call uart_reset.internal   ;eax= uart
243
           call uart_reset.internal   ;eax= uart
240
 
244
 
Line 241... Line 245...
241
           stdcall attach_int_handler, COM_1_IRQ, com_1_isr
245
           stdcall attach_int_handler, COM_1_IRQ, com_1_isr
242
           stdcall reg_service, sz_uart_srv, uart_proc
246
           stdcall reg_service, sz_uart_srv, uart_proc
-
 
247
           mov [eax+SRV.entry], init_uart_service
243
           ret
248
           ret
244
.fail:
249
.fail:
-
 
250
.stop:
245
           xor eax, eax
251
           xor eax, eax
246
           ret
252
           ret
-
 
253
endp
-
 
254
 
Line 247... Line 255...
247
 
255
 
248
handle     equ  IOCTL.handle
256
handle     equ  IOCTL.handle
249
io_code    equ  IOCTL.io_code
257
io_code    equ  IOCTL.io_code
250
input      equ  IOCTL.input
258
input      equ  IOCTL.input