diff options
Diffstat (limited to 'examples/gadget-midi.c')
-rw-r--r-- | examples/gadget-midi.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/examples/gadget-midi.c b/examples/gadget-midi.c index 44699f3..1004063 100644 --- a/examples/gadget-midi.c +++ b/examples/gadget-midi.c @@ -16,6 +16,7 @@ #include <errno.h> #include <stdio.h> +#include <linux/usb/ch9.h> #include <usbg/usbg.h> #define VENDOR 0x1d6b @@ -30,24 +31,24 @@ int main() { int usbg_ret; usbg_gadget_attrs g_attrs = { - 0x0200, /* bcdUSB */ - 0x00, /* Defined at interface level */ - 0x00, /* subclass */ - 0x00, /* device protocol */ - 0x0040, /* Max allowed packet size */ - VENDOR, - PRODUCT, - 0x0001, /* Verson of device */ + .bcdUSB = 0x0200, + .bDeviceClass = USB_CLASS_PER_INTERFACE, + .bDeviceSubClass = 0x00, + .bDeviceProtocol = 0x00, + .bMaxPacketSize0 = 0x0040, /* Max allowed ep0 packet size */ + .idVendor = VENDOR, + .idProduct = PRODUCT, + .bcdDevice = 0x0001, /* Verson of device */ }; usbg_gadget_strs g_strs = { - "0123456789", /* Serial number */ - "Foo Inc.", /* Manufacturer */ - "Bar Gadget" /* Product string */ + .str_ser = "0123456789", /* Serial number */ + .str_mnf = "Foo Inc.", /* Manufacturer */ + .str_prd = "Bar Gadget" /* Product string */ }; usbg_config_strs c_strs = { - "1xMIDI" + .configuration = "1xMIDI" }; usbg_function_attrs f_attrs = { |