Changeset 21a0d8a in mainline
- Timestamp:
- 2018-08-09T18:30:45Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b13d80b
- Parents:
- 3cdd876
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/atkbd/atkbd.c
r3cdd876 r21a0d8a 48 48 #define AT_NUM_SCAN_CODE 0x77 49 49 #define AT_SCROLL_SCAN_CODE 0x7E 50 51 #define AT_KBD_ENABLE 0xF4 52 #define AT_KBD_ACK 0xFA 50 53 51 54 /* Set 2 scan codes (AT keyboard) */ … … 405 408 } 406 409 410 uint8_t code = AT_KBD_ENABLE; 411 size_t bytes; 412 rc = chardev_write(kbd->chardev, &code, 1, &bytes); 413 if (rc != EOK) { 414 ddf_msg(LVL_ERROR, "Failed to enable keyboard."); 415 fibril_destroy(kbd->polling_fibril); 416 ddf_fun_unbind(kbd->kbd_fun); 417 ddf_fun_destroy(kbd->kbd_fun); 418 return EIO; 419 } 420 rc = chardev_read(kbd->chardev, &code, 1, &bytes); 421 if (rc != EOK || code != AT_KBD_ACK) { 422 ddf_msg(LVL_ERROR, "Failed to confirm keyboard enable: %hhx.", 423 code); 424 fibril_destroy(kbd->polling_fibril); 425 ddf_fun_unbind(kbd->kbd_fun); 426 ddf_fun_destroy(kbd->kbd_fun); 427 return EIO; 428 } 429 407 430 fibril_add_ready(kbd->polling_fibril); 408 431 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.