Changes in / [24d5432:3742068] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbddev.c
r24d5432 r3742068 63 63 static const size_t BOOTP_BUFFER_SIZE = 8; 64 64 static const size_t BOOTP_BUFFER_OUT_SIZE = 1; 65 static const uint8_t BOOTP_ERROR_ROLLOVER = 1;66 65 static const uint8_t IDLE_RATE = 0; 67 66 … … 320 319 const uint8_t *key_codes) 321 320 { 321 // TODO: phantom state!! 322 322 323 unsigned int key; 323 324 unsigned int i, j; 324 325 /*326 * First of all, check if the kbd have reported phantom state.327 */328 i = 0;329 // all fields should report Error Rollover330 while (i < kbd_dev->keycode_count &&331 key_codes[i] == BOOTP_ERROR_ROLLOVER) {332 ++i;333 }334 if (i == kbd_dev->keycode_count) {335 usb_log_debug("Phantom state occured.\n");336 // phantom state, do nothing337 return;338 }339 325 340 326 // TODO: quite dummy right now, think of better implementation … … 355 341 key = usbhid_parse_scancode(kbd_dev->keycodes[j]); 356 342 usbhid_kbd_push_ev(kbd_dev, KEY_RELEASE, key); 357 usb_log_debug2(" Key released: %d\n", key);343 usb_log_debug2("\nKey released: %d\n", key); 358 344 } else { 359 345 // found, nothing happens … … 375 361 // not found, i.e. new key pressed 376 362 key = usbhid_parse_scancode(key_codes[i]); 377 usb_log_debug2(" Key pressed: %d (keycode: %d)\n", key,363 usb_log_debug2("\nKey pressed: %d (keycode: %d)\n", key, 378 364 key_codes[i]); 379 365 usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key); … … 386 372 // if (key_codes[i] != 0) { 387 373 // key = usbhid_parse_scancode(key_codes[i]); 388 // usb_log_debug2(" Key pressed: %d (keycode: %d)\n", key,374 // usb_log_debug2("\nKey pressed: %d (keycode: %d)\n", key, 389 375 // key_codes[i]); 390 376 // usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key);
Note:
See TracChangeset
for help on using the changeset viewer.