Changes in / [24d5432:3742068] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/kbddev.c

    r24d5432 r3742068  
    6363static const size_t BOOTP_BUFFER_SIZE = 8;
    6464static const size_t BOOTP_BUFFER_OUT_SIZE = 1;
    65 static const uint8_t BOOTP_ERROR_ROLLOVER = 1;
    6665static const uint8_t IDLE_RATE = 0;
    6766
     
    320319    const uint8_t *key_codes)
    321320{
     321        // TODO: phantom state!!
     322       
    322323        unsigned int key;
    323324        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         }
    339325       
    340326        // TODO: quite dummy right now, think of better implementation
     
    355341                        key = usbhid_parse_scancode(kbd_dev->keycodes[j]);
    356342                        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);
    358344                } else {
    359345                        // found, nothing happens
     
    375361                        // not found, i.e. new key pressed
    376362                        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,
    378364                            key_codes[i]);
    379365                        usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key);
     
    386372//              if (key_codes[i] != 0) {
    387373//                      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,
    389375//                          key_codes[i]);
    390376//                      usbhid_kbd_push_ev(kbd_dev, KEY_PRESS, key);
Note: See TracChangeset for help on using the changeset viewer.