Changeset 11658b64 in mainline for uspace/app/virtusbkbd/virtusbkbd.c
- Timestamp:
- 2010-12-16T11:54:53Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 557c7d0, 5863a95, 82122f3, a8b7dfd, f2962621
- Parents:
- a9b6bec (diff), 70e5ad5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/virtusbkbd/virtusbkbd.c
ra9b6bec r11658b64 76 76 } 77 77 78 static int on_class_request(struct usbvirt_device *dev,79 usb_device_request_setup_packet_t *request, uint8_t *data)80 {81 printf("%s: class request (%d)\n", NAME, (int) request->request);82 83 return EOK;84 }85 78 86 79 /** Compares current and last status of pressed keys. … … 138 131 } 139 132 133 static usbvirt_control_transfer_handler_t endpoint_zero_handlers[] = { 134 { 135 .request_type = USBVIRT_MAKE_CONTROL_REQUEST_TYPE( 136 USB_DIRECTION_IN, 137 USBVIRT_REQUEST_TYPE_STANDARD, 138 USBVIRT_REQUEST_RECIPIENT_DEVICE), 139 .request = USB_DEVREQ_GET_DESCRIPTOR, 140 .name = "GetDescriptor", 141 .callback = stdreq_on_get_descriptor 142 }, 143 { 144 .request_type = USBVIRT_MAKE_CONTROL_REQUEST_TYPE( 145 USB_DIRECTION_IN, 146 USBVIRT_REQUEST_TYPE_CLASS, 147 USBVIRT_REQUEST_RECIPIENT_DEVICE), 148 .request = USB_DEVREQ_GET_DESCRIPTOR, 149 .name = "GetDescriptor", 150 .callback = stdreq_on_get_descriptor 151 }, 152 USBVIRT_CONTROL_TRANSFER_HANDLER_LAST 153 }; 140 154 141 155 /** Keyboard callbacks. … … 143 157 */ 144 158 static usbvirt_device_ops_t keyboard_ops = { 145 .standard_request_ops = &standard_request_ops, 146 .on_class_device_request = on_class_request, 159 .control_transfer_handlers = endpoint_zero_handlers, 147 160 .on_data = on_incoming_data, 148 161 .on_data_request = on_request_for_data … … 257 270 258 271 printf("%s: Simulating keyboard events...\n", NAME); 272 fibril_sleep(10); 259 273 while (1) { 260 274 kb_process_events(&status, keyboard_events, keyboard_events_count,
Note:
See TracChangeset
for help on using the changeset viewer.