Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 11658b64 in mainline for uspace/app/virtusbkbd/virtusbkbd.c


Ignore:
Timestamp:
2010-12-16T11:54:53Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
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.
Message:

Merged vojtechhorky/ - libusbvirt clean-up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/virtusbkbd/virtusbkbd.c

    ra9b6bec r11658b64  
    7676}
    7777
    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 }
    8578
    8679/** Compares current and last status of pressed keys.
     
    138131}
    139132
     133static 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};
    140154
    141155/** Keyboard callbacks.
     
    143157 */
    144158static 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,
    147160        .on_data = on_incoming_data,
    148161        .on_data_request = on_request_for_data
     
    257270       
    258271        printf("%s: Simulating keyboard events...\n", NAME);
     272        fibril_sleep(10);
    259273        while (1) {
    260274                kb_process_events(&status, keyboard_events, keyboard_events_count,
Note: See TracChangeset for help on using the changeset viewer.