Changeset e7b7ebd5 in mainline for uspace/drv/usbhid/main.c
- Timestamp:
- 2011-02-24T12:47:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f840ed
- Parents:
- 92574f4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/main.c
r92574f4 re7b7ebd5 557 557 // TODO: get descriptors, parse descriptors and save endpoints 558 558 usb_endpoint_pipe_start_session(&kbd_dev->ctrl_pipe); 559 //usb_request_set_configuration(&kbd_dev->ctrl_pipe, 1);560 559 rc = usbkbd_process_descriptors(kbd_dev); 561 560 usb_endpoint_pipe_end_session(&kbd_dev->ctrl_pipe); … … 563 562 goto error_leave; 564 563 } 565 564 565 // save the size of the report 566 kbd_dev->keycode_count = BOOTP_REPORT_SIZE; 567 kbd_dev->keycodes = (uint8_t *)calloc( 568 kbd_dev->keycode_count, sizeof(uint8_t)); 569 570 if (kbd_dev->keycodes == NULL) { 571 usb_log_fatal("No memory!\n"); 572 goto error_leave; 573 } 574 575 // set configuration to the first one 576 // TODO: handle case with no configurations 577 usb_endpoint_pipe_start_session(&kbd_dev->ctrl_pipe); 578 usb_request_set_configuration(&kbd_dev->ctrl_pipe, 579 kbd_dev->conf->config_descriptor.configuration_number); 580 usb_endpoint_pipe_end_session(&kbd_dev->ctrl_pipe); 581 566 582 return kbd_dev; 567 583
Note:
See TracChangeset
for help on using the changeset viewer.