Changeset 7c169ce in mainline for uspace/drv/usbkbd/main.c
- Timestamp:
- 2011-01-21T13:01:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2b1548
- Parents:
- 6336b6e (diff), a1d12f4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbkbd/main.c
r6336b6e r7c169ce 42 42 #include "descdump.h" 43 43 #include "conv.h" 44 #include "layout.h" 44 45 45 46 #define BUFFER_SIZE 32 … … 125 126 static unsigned lock_keys; 126 127 128 #define NUM_LAYOUTS 3 129 130 static layout_op_t *layout[NUM_LAYOUTS] = { 131 &us_qwerty_op, 132 &us_dvorak_op, 133 &cz_op 134 }; 135 127 136 // TODO: put to device? 128 //static int active_layout = 0;137 static int active_layout = 0; 129 138 130 139 static void kbd_push_ev(int type, unsigned int key) … … 206 215 ev.mods = mods; 207 216 208 //ev.c = layout[active_layout]->parse_ev(&ev);217 ev.c = layout[active_layout]->parse_ev(&ev); 209 218 210 219 printf("Sending key %d to the console\n", ev.key); 211 220 assert(console_callback_phone != -1); 212 async_msg_4(console_callback_phone, KBD_EVENT, ev.type, ev.key, ev.mods, 0);221 async_msg_4(console_callback_phone, KBD_EVENT, ev.type, ev.key, ev.mods, ev.c); 213 222 } 214 223 /* … … 405 414 //usb_hid_parse_report(kbd_dev->parser, buffer, actual_size, callbacks, 406 415 // NULL); 407 //printf("Calling usb_hid_boot_keyboard_input_report() with size %d\n",408 //actual_size);409 //dump_buffer("bufffer: ", buffer, actual_size);416 printf("Calling usb_hid_boot_keyboard_input_report() with size %d\n", 417 actual_size); 418 //dump_buffer("bufffer: ", buffer, actual_size); 410 419 int rc = usb_hid_boot_keyboard_input_report(buffer, actual_size, callbacks, 411 420 NULL); … … 457 466 */ 458 467 if (actual_size == 0) { 459 printf("Keyboar returned NAK\n");468 printf("Keyboard returned NAK\n"); 460 469 continue; 461 470 } … … 465 474 */ 466 475 printf("Calling usbkbd_process_interrupt_in()\n"); 467 // actual_size is not set, workaround... 468 usbkbd_process_interrupt_in(kbd_dev, buffer, /*actual_size*/8); 476 usbkbd_process_interrupt_in(kbd_dev, buffer, actual_size); 469 477 } 470 478
Note:
See TracChangeset
for help on using the changeset viewer.