Changeset fa09449 in mainline for uspace/srv/kbd/generic/kbd.c
- Timestamp:
- 2009-02-15T22:31:07Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6cd9aa6
- Parents:
- 76dd25b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/kbd/generic/kbd.c
r76dd25b rfa09449 43 43 #include <stdio.h> 44 44 #include <ipc/ns.h> 45 #include <async.h> 45 46 #include <errno.h> 47 #include <libadt/fifo.h> 48 #include <kbd/kbd.h> 49 46 50 #include <arch/kbd.h> 47 51 #include <kbd.h> 48 #include <libadt/fifo.h>49 52 #include <key_buffer.h> 50 #include <async.h>51 53 #include <keys.h> 52 54 … … 59 61 static void irq_handler(ipc_callid_t iid, ipc_call_t *call) 60 62 { 61 int chr;63 kbd_event_t ev; 62 64 63 65 #ifdef MOUSE_ENABLED … … 70 72 if (cons_connected && phone2cons != -1) { 71 73 /* 72 * recode to ASCII - one interrupt can produce more than one73 * code so result is stored in fifo74 * One interrupt can produce more than one event so the result 75 * is stored in a FIFO. 74 76 */ 75 77 while (!keybuffer_empty(&keybuffer)) { 76 if (!keybuffer_pop(&keybuffer, (int *)&chr))78 if (!keybuffer_pop(&keybuffer, &ev)) 77 79 break; 78 80 79 async_msg_1(phone2cons, KBD_PUSHCHAR, chr); 81 async_msg_4(phone2cons, KBD_EVENT, ev.type, ev.key, 82 ev.mods, ev.c); 80 83 } 81 84 }
Note:
See TracChangeset
for help on using the changeset viewer.