Rev 4592 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4592 | Rev 5051 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | ; in: ebx -> device_data from USB layer, edi -> collection |
32 | ; in: ebx -> device_data from USB layer, edi -> collection |
33 | ; out: eax = device-specific data or NULL on error |
33 | ; out: eax = device-specific data or NULL on error |
34 | proc mouse_driver_add_device |
34 | proc mouse_driver_add_device |
35 | ; Just allocate memory; no initialization needed. |
35 | ; Just allocate memory; no initialization needed. |
36 | movi eax, sizeof.mouse_device_data |
36 | movi eax, sizeof.mouse_device_data |
37 | call Kmalloc |
37 | invoke Kmalloc |
38 | ret |
38 | ret |
39 | endp |
39 | endp |
Line 40... | Line 40... | ||
40 | 40 | ||
41 | ; This procedure is called when HID layer detects disconnect of a previously |
41 | ; This procedure is called when HID layer detects disconnect of a previously |
42 | ; connected mouse. |
42 | ; connected mouse. |
43 | ; in: edi -> mouse_device_data (pointer returned from mouse_driver_add_device) |
43 | ; in: edi -> mouse_device_data (pointer returned from mouse_driver_add_device) |
44 | proc mouse_driver_disconnect |
44 | proc mouse_driver_disconnect |
45 | ; Free the allocated memory. |
45 | ; Free the allocated memory. |
46 | mov eax, edi |
46 | mov eax, edi |
47 | call Kfree |
47 | invoke Kfree |
48 | ret |
48 | ret |
Line 49... | Line 49... | ||
49 | endp |
49 | endp |
50 | 50 | ||
Line 151... | Line 151... | ||
151 | ; This procedure is called when HID layer ends processing a new input packet |
151 | ; This procedure is called when HID layer ends processing a new input packet |
152 | ; from a mouse. |
152 | ; from a mouse. |
153 | ; in: edi -> mouse_device_data (pointer returned from mouse_driver_add_device) |
153 | ; in: edi -> mouse_device_data (pointer returned from mouse_driver_add_device) |
154 | proc mouse_driver_end_packet |
154 | proc mouse_driver_end_packet |
155 | ; Call the kernel, passing collected state. |
155 | ; Call the kernel, passing collected state. |
156 | stdcall SetMouseData, \ |
156 | invoke SetMouseData, \ |
157 | [edi+mouse_device_data.buttons], \ |
157 | [edi+mouse_device_data.buttons], \ |
158 | [edi+mouse_device_data.dx], \ |
158 | [edi+mouse_device_data.dx], \ |
159 | [edi+mouse_device_data.dy], \ |
159 | [edi+mouse_device_data.dy], \ |
160 | [edi+mouse_device_data.wheel], \ |
160 | [edi+mouse_device_data.wheel], \ |
161 | [edi+mouse_device_data.hwheel] |
161 | [edi+mouse_device_data.hwheel] |