From 88e2bde7d699bdb91e86b6133d0892340bafe5d1 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 11 Apr 2015 14:49:41 -0300 Subject: [PATCH] atusb/fw/usb/: fix incorrect code point for USB_CLASS_PER_INTERFACE The code of USB_CLASS_PER_INTERFACE is 0 and not 0xfe. USB_CLASS_APP_SPEC is 0xfe. Also corrected the use in dfu.c --- atusb/fw/usb/dfu.c | 6 +++--- atusb/fw/usb/usb.h | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/atusb/fw/usb/dfu.c b/atusb/fw/usb/dfu.c index 28b1a69..c84a28d 100644 --- a/atusb/fw/usb/dfu.c +++ b/atusb/fw/usb/dfu.c @@ -1,8 +1,8 @@ /* * boot/dfu.c - DFU protocol engine * - * Written 2008-2011, 2013-2014 by Werner Almesberger - * Copyright 2008-2011, 2013-2014 Werner Almesberger + * Written 2008-2011, 2013-2015 by Werner Almesberger + * Copyright 2008-2011, 2013-2015 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ const uint8_t device_descriptor[] = { 18, /* bLength */ USB_DT_DEVICE, /* bDescriptorType */ LE(0x100), /* bcdUSB */ - USB_CLASS_PER_INTERFACE,/* bDeviceClass */ + USB_CLASS_APP_SPEC, /* bDeviceClass */ 0x00, /* bDeviceSubClass (per interface) */ 0x00, /* bDeviceProtocol (per interface) */ EP0_SIZE, /* bMaxPacketSize */ diff --git a/atusb/fw/usb/usb.h b/atusb/fw/usb/usb.h index ff4dfe0..8faa1a3 100644 --- a/atusb/fw/usb/usb.h +++ b/atusb/fw/usb/usb.h @@ -1,8 +1,8 @@ /* * fw/usb//usb.h - USB hardware setup and standard device requests * - * Written 2008, 2009, 2011, 2013 by Werner Almesberger - * Copyright 2008, 2009, 2011, 2013 Werner Almesberger + * Written 2008, 2009, 2011, 2013, 2015 by Werner Almesberger + * Copyright 2008, 2009, 2011, 2013, 2015 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +51,8 @@ * Reuse libusb naming scheme (/usr/include/usb.h) */ -#define USB_CLASS_PER_INTERFACE 0xfe +#define USB_CLASS_PER_INTERFACE 0 +#define USB_CLASS_APP_SPEC 0xfe #define USB_CLASS_VENDOR_SPEC 0xff /*