Changeset 338d54a7 in mainline for uspace/drv/hid
- Timestamp:
- 2018-03-10T22:55:07Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 850fd32
- Parents:
- 5ef16903
- Location:
- uspace/drv/hid
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/atkbd/atkbd.c
r5ef16903 r338d54a7 302 302 const sysarg_t method = IPC_GET_IMETHOD(*icall); 303 303 at_kbd_t *kbd = ddf_dev_data_get(ddf_fun_get_dev(fun)); 304 async_sess_t *sess; 304 305 305 306 switch (method) { 306 case KBDEV_SET_IND: {307 case KBDEV_SET_IND: 307 308 async_answer_0(icallid, ENOTSUP); 308 309 break; 309 }310 310 /* 311 311 * This might be ugly but async_callback_receive_start makes no 312 312 * difference for incorrect call and malloc failure. 313 313 */ 314 case IPC_M_CONNECT_TO_ME: { 315 async_sess_t *sess = 316 async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 314 case IPC_M_CONNECT_TO_ME: 315 sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 317 316 318 317 /* Probably ENOMEM error, try again. */ … … 334 333 335 334 break; 336 }337 335 default: 338 336 ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method); -
uspace/drv/hid/ps2mouse/ps2mouse.c
r5ef16903 r338d54a7 408 408 const sysarg_t method = IPC_GET_IMETHOD(*icall); 409 409 ps2_mouse_t *mouse = ddf_dev_data_get(ddf_fun_get_dev(fun)); 410 async_sess_t *sess; 410 411 411 412 switch (method) { 412 413 /* This might be ugly but async_callback_receive_start makes no 413 414 * difference for incorrect call and malloc failure. */ 414 case IPC_M_CONNECT_TO_ME: { 415 async_sess_t *sess = 416 async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 415 case IPC_M_CONNECT_TO_ME: 416 sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 417 417 /* Probably ENOMEM error, try again. */ 418 418 if (sess == NULL) { … … 431 431 } 432 432 break; 433 }434 433 default: 435 434 ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method); -
uspace/drv/hid/usbhid/kbd/kbddev.c
r5ef16903 r338d54a7 165 165 const sysarg_t method = IPC_GET_IMETHOD(*icall); 166 166 usb_kbd_t *kbd_dev = ddf_fun_data_get(fun); 167 async_sess_t *sess; 167 168 168 169 switch (method) { … … 174 175 /* This might be ugly but async_callback_receive_start makes no 175 176 * difference for incorrect call and malloc failure. */ 176 case IPC_M_CONNECT_TO_ME: { 177 async_sess_t *sess = 178 async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 177 case IPC_M_CONNECT_TO_ME: 178 sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 179 179 /* Probably ENOMEM error, try again. */ 180 180 if (sess == NULL) { … … 194 194 } 195 195 break; 196 }197 196 default: 198 197 usb_log_error("%s: Unknown method: %d.", -
uspace/drv/hid/xtkbd/xtkbd.c
r5ef16903 r338d54a7 338 338 const sysarg_t method = IPC_GET_IMETHOD(*icall); 339 339 xt_kbd_t *kbd = ddf_dev_data_get(ddf_fun_get_dev(fun)); 340 unsigned mods; 341 async_sess_t *sess; 340 342 341 343 switch (method) { 342 case KBDEV_SET_IND: {344 case KBDEV_SET_IND: 343 345 /* 344 346 * XT keyboards do not support setting mods, 345 347 * assume AT keyboard with Scan Code Set 1. 346 348 */ 347 const unsignedmods = IPC_GET_ARG1(*icall);349 mods = IPC_GET_ARG1(*icall); 348 350 const uint8_t status = 0 | 349 351 ((mods & KM_CAPS_LOCK) ? LI_CAPS : 0) | … … 362 364 async_answer_0(icallid, rc); 363 365 break; 364 }365 366 /* 366 367 * This might be ugly but async_callback_receive_start makes no 367 368 * difference for incorrect call and malloc failure. 368 369 */ 369 case IPC_M_CONNECT_TO_ME: { 370 async_sess_t *sess = 371 async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 370 case IPC_M_CONNECT_TO_ME: 371 sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall); 372 372 373 373 /* Probably ENOMEM error, try again. */ … … 389 389 390 390 break; 391 }392 391 default: 393 392 ddf_msg(LVL_ERROR, "Unknown method: %d.", (int)method);
Note:
See TracChangeset
for help on using the changeset viewer.