aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/Incomplete
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2010-09-30 06:23:38 +0000
committerDean Camera <[email protected]>2010-09-30 06:23:38 +0000
commit158afe910947739b1df00000628c1e758bdf0812 (patch)
treedaf6fc80de05c9ed748599bc01c24b1578455dc2 /Demos/Device/Incomplete
parenta509729b2d92b03a3d33ab0e1e1950ff65a96a09 (diff)
downloadqmk_firmware-158afe910947739b1df00000628c1e758bdf0812.tar.gz
qmk_firmware-158afe910947739b1df00000628c1e758bdf0812.zip
Reverted Endpoint/Pipe non-sequential configuration hack, placed restriction on the configuration order instead to ensure maximum reliability.
Altered all low level device and host mode demos to ensure that endpoints and pipes are configured in ascending order properly. Rewrote all low level host mode demos' configuration descriptor parser code to ensure that pipes are enumerated in ascending order, and to ensure maximum compatibility with devices. Incremented all device mode demo's device descriptor revision numbers to ensure that any descriptor changes are re-fetched on machines which have enumerated previous versions.
Diffstat (limited to 'Demos/Device/Incomplete')
-rw-r--r--Demos/Device/Incomplete/Sideshow/Descriptors.c2
-rw-r--r--Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c2
-rw-r--r--Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h6
-rw-r--r--Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/Demos/Device/Incomplete/Sideshow/Descriptors.c b/Demos/Device/Incomplete/Sideshow/Descriptors.c
index 4e3983c224..6860ac4592 100644
--- a/Demos/Device/Incomplete/Sideshow/Descriptors.c
+++ b/Demos/Device/Incomplete/Sideshow/Descriptors.c
@@ -43,7 +43,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
VendorID: 0x03EB,
ProductID: 0x2040,
- ReleaseNumber: 0x0001,
+ ReleaseNumber: VERSION_BCD(00.01),
ManufacturerStrIndex: 0x01,
ProductStrIndex: 0x02,
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c b/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
index 0cb7852ab7..aac16909de 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
+++ b/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.c
@@ -68,7 +68,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.VendorID = 0x03EB,
.ProductID = 0x2065,
- .ReleaseNumber = 0x0000,
+ .ReleaseNumber = VERSION_BCD(00.01),
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h b/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
index 975ca10f74..fefb6b555d 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
+++ b/Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
@@ -43,15 +43,15 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
+ /** Endpoint number of the TMC notification IN endpoint. */
+ #define TMC_NOTIFICATION_EPNUM 2
+
/** Endpoint number of the TMC device-to-host data IN endpoint. */
#define TMC_IN_EPNUM 3
/** Endpoint number of the TMC host-to-device data OUT endpoint. */
#define TMC_OUT_EPNUM 4
- /** Endpoint number of the TMC notification IN endpoint. */
- #define TMC_NOTIFICATION_EPNUM 2
-
/** Size in bytes of the TMC data endpoints. */
#define TMC_IO_EPSIZE 64
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
index 55e17bcc6a..7949a7ebd0 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
+++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
@@ -121,12 +121,12 @@ void EVENT_USB_Device_ConfigurationChanged(void)
bool ConfigSuccess = true;
/* Setup TMC In, Out and Notification Endpoints */
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
+ TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
- ConfigSuccess &= Endpoint_ConfigureEndpoint(TMC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
- TMC_IO_EPSIZE, ENDPOINT_BANK_SINGLE);
/* Indicate endpoint configuration success or failure */
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);