Changeset d477734 in mainline
- Timestamp:
- 2011-03-06T17:28:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 24d5432, d2fc1c2
- Parents:
- b330cb1f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbddev.c
rb330cb1f rd477734 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; 65 66 static const uint8_t IDLE_RATE = 0; 66 67 … … 319 320 const uint8_t *key_codes) 320 321 { 321 // TODO: phantom state!!322 323 322 unsigned int key; 324 323 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 Rollover 330 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 nothing 337 return; 338 } 325 339 326 340 // TODO: quite dummy right now, think of better implementation … … 341 355 key = usbhid_parse_scancode(kbd_dev->keycodes[j]); 342 356 usbhid_kbd_push_ev(kbd_dev, KEY_RELEASE, key); 343 usb_log_debug2(" \nKey released: %d\n", key);357 usb_log_debug2("Key released: %d\n", key); 344 358 } else { 345 359 // found, nothing happens … … 361 375 // not found, i.e. new key pressed 362 376 key = usbhid_parse_scancode(key_codes[i]); 363 usb_log_debug2(" \nKey pressed: %d (keycode: %d)\n", key,377 usb_log_debug2("Key pressed: %d (keycode: %d)\n", key, 364 378 key_codes[i]); 365 379 usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key); … … 372 386 // if (key_codes[i] != 0) { 373 387 // key = usbhid_parse_scancode(key_codes[i]); 374 // usb_log_debug2(" \nKey pressed: %d (keycode: %d)\n", key,388 // usb_log_debug2("Key pressed: %d (keycode: %d)\n", key, 375 389 // key_codes[i]); 376 390 // usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key);
Note:
See TracChangeset
for help on using the changeset viewer.