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

Changeset 4971812 in mainline for uspace/app/virtusbkbd/virtusbkbd.c


Ignore:
Timestamp:
2010-10-10T21:20:02Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial
Children:
0e41957
Parents:
6c1315b
Message:

Standard requests in virtual USB device

The virtual USB device framework can handle some standard requests
alone. Again, this is more about bones than about meat. Meat will
come later.

Update `vuk' app to provide standard device descriptor.

File:
1 edited

Legend:

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

    r6c1315b r4971812  
    4646
    4747#include <usb/hcd.h>
     48#include <usb/device.h>
    4849#include <usbvirt/device.h>
    4950#include <usbvirt/hub.h>
     
    6970}
    7071
     72static usb_standard_device_descriptor_t std_descriptor = {
     73        .length = sizeof(usb_standard_device_descriptor_t),
     74        .descriptor_type = 1,
     75        .usb_spec_version = 0x110,
     76        .device_class = 0x03,
     77        .device_subclass = 0,
     78        .device_protocol = 0,
     79        .max_packet_size = 64,
     80        .configuration_count = 1
     81};
     82
    7183/** Keyboard callbacks.
    7284 * We abuse the fact that static variables are zero-filled.
     
    8193static usbvirt_device_t keyboard_dev = {
    8294        .ops = &keyboard_ops,
     95        .standard_descriptor = &std_descriptor,
    8396        .device_id_ = USBVIRT_DEV_KEYBOARD_ID
    8497};
Note: See TracChangeset for help on using the changeset viewer.