projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0d8679c
)
Extend USB_GetDeviceConfigDescriptor() routine to require the configuration number...
author
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 19 Jun 2009 03:37:47 +0000
(
03:37
+0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 19 Jun 2009 03:37:47 +0000
(
03:37
+0000)
17 files changed:
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/Class/Host/CDC.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
LUFA/ManPages/MigrationInformation.txt
patch
|
blob
|
blame
|
history
Projects/MissileLauncher/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Projects/MissileLauncher/MissileLauncher.c
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
b/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
index
0c1c820
..
8d66ebc
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
+++ b/
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
@@
-37,7
+37,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlErrorDuringConfigRead;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlErrorDuringConfigRead;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-48,7
+48,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
index
baf02a2
..
57d7ec0
100644
(file)
--- a/
Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
@@
-52,7
+52,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-63,7
+63,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
index
29fa60b
..
2a6e152
100644
(file)
--- a/
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
@@
-53,7
+53,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-64,7
+64,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
index
e586ea5
..
a22420d
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
@@
-51,7
+51,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-62,7
+62,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
index
4aa09e1
..
98a9e37
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
+++ b/
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
@@
-82,6
+82,7
@@
\r
/* Function Prototypes: */
\r
void Keyboard_HID_Task(void);
\r
\r
/* Function Prototypes: */
\r
void Keyboard_HID_Task(void);
\r
+ void SetupHardware(void);
\r
\r
void EVENT_USB_HostError(const uint8_t ErrorCode);
\r
void EVENT_USB_DeviceAttached(void);
\r
\r
void EVENT_USB_HostError(const uint8_t ErrorCode);
\r
void EVENT_USB_DeviceAttached(void);
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
index
4ee3b99
..
d48026d
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
@@
-51,7
+51,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-62,7
+62,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
index
c951c79
..
d15a453
100644
(file)
--- a/
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
@@
-52,7
+52,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-63,7
+63,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
index
0f6ab59
..
f594eb8
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
@@
-51,7
+51,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-62,7
+62,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
b/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
index
5d9d3f0
..
04247ef
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
@@
-51,7
+51,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint16_t ConfigDescriptorSize;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-62,7
+62,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
index
1084969
..
86a96b3
100644
(file)
--- a/
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
@@
-52,7
+52,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-63,7
+63,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/LUFA/Drivers/USB/Class/Host/CDC.c
b/LUFA/Drivers/USB/Class/Host/CDC.c
index
3a572f1
..
aef5b35
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/CDC.c
+++ b/
LUFA/Drivers/USB/Class/Host/CDC.c
@@
-40,7
+40,7
@@
static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
uint16_t ConfigDescriptorSize;
\r
uint8_t FoundEndpoints = 0;
\r
\r
uint16_t ConfigDescriptorSize;
\r
uint8_t FoundEndpoints = 0;
\r
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return CDC_ENUMERROR_ControlError;
\r
\r
if (ConfigDescriptorSize > 512)
\r
return CDC_ENUMERROR_ControlError;
\r
\r
if (ConfigDescriptorSize > 512)
\r
@@
-48,7
+48,7
@@
static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
return CDC_ENUMERROR_InvalidConfigDataReturned;
\r
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
return CDC_ENUMERROR_InvalidConfigDataReturned;
\r
diff --git
a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
index
bbe258b
..
47982b8
100644
(file)
--- a/
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
+++ b/
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
@@
-31,7
+31,7
@@
#include "ConfigDescriptor.h"
\r
\r
#if defined(USB_CAN_BE_HOST)
\r
#include "ConfigDescriptor.h"
\r
\r
#if defined(USB_CAN_BE_HOST)
\r
-uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr)
\r
+uint8_t USB_GetDeviceConfigDescriptor(uint
8_t ConfigNumber, uint
16_t* const ConfigSizePtr, void* BufferPtr)
\r
{
\r
uint8_t ErrorCode;
\r
\r
{
\r
uint8_t ErrorCode;
\r
\r
@@
-39,7
+39,7
@@
uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* Buffe
{
\r
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
\r
.bRequest = REQ_GetDescriptor,
\r
{
\r
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
\r
.bRequest = REQ_GetDescriptor,
\r
- .wValue = (
DTYPE_Configuration << 8
),
\r
+ .wValue = (
(DTYPE_Configuration << 8) | (ConfigNumber - 1)
),
\r
.wIndex = 0,
\r
.wLength = sizeof(USB_Descriptor_Configuration_Header_t),
\r
};
\r
.wIndex = 0,
\r
.wLength = sizeof(USB_Descriptor_Configuration_Header_t),
\r
};
\r
diff --git
a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
index
5c2b6e2
..
17b6378
100644
(file)
--- a/
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
+++ b/
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
@@
-183,6
+183,9
@@
/* Function Prototypes: */
\r
/** Retrieves the configuration descriptor data or size from an attached device via a standard request.
\r
*
\r
/* Function Prototypes: */
\r
/** Retrieves the configuration descriptor data or size from an attached device via a standard request.
\r
*
\r
+ * \param ConfigNumber Device configuration descriptor number to fetch from the device (usually set to 1 for
\r
+ * single configuration devices)
\r
+ *
\r
* \param ConfigSizePtr Pointer to a uint16_t for either storing or retrieving the configuration
\r
* descriptor size
\r
*
\r
* \param ConfigSizePtr Pointer to a uint16_t for either storing or retrieving the configuration
\r
* descriptor size
\r
*
\r
@@
-192,8
+195,8
@@
* of bytes indicated by ConfigSizePtr of the configuration descriptor will be loaded
\r
* into the buffer
\r
*/
\r
* of bytes indicated by ConfigSizePtr of the configuration descriptor will be loaded
\r
* into the buffer
\r
*/
\r
- uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* BufferPtr)
\r
- ATTR_NON_NULL_PTR_ARG(
1
);
\r
+ uint8_t USB_GetDeviceConfigDescriptor(uint
8_t ConfigNumber, uint
16_t* const ConfigSizePtr, void* BufferPtr)
\r
+ ATTR_NON_NULL_PTR_ARG(
2
);
\r
\r
/** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value.
\r
* The bytes remaining value is automatically decremented.
\r
\r
/** Skips to the next sub-descriptor inside the configuration descriptor of the specified type value.
\r
* The bytes remaining value is automatically decremented.
\r
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
3ef3a6e
..
4644181
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-27,7
+27,7
@@
* - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
\r
* cleared to prevent endpoint type corruption
\r
* - Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken()
\r
* - Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is
\r
* cleared to prevent endpoint type corruption
\r
* - Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken()
\r
- *
\r
+ *
- Extend USB_GetDeviceConfigDescriptor() routine to require the configuration number within the device to fetch
\r
*
\r
* \section Sec_ChangeLog090605 Version 090605
\r
*
\r
*
\r
* \section Sec_ChangeLog090605 Version 090605
\r
*
\r
diff --git
a/LUFA/ManPages/MigrationInformation.txt
b/LUFA/ManPages/MigrationInformation.txt
index
ecd4e9e
..
d46ddd0
100644
(file)
--- a/
LUFA/ManPages/MigrationInformation.txt
+++ b/
LUFA/ManPages/MigrationInformation.txt
@@
-13,13
+13,18
@@
* \section Sec_MigrationXXXXXX Migrating from 090605 to XXXXXX
\r
*
\r
* <b>All</b>
\r
* \section Sec_MigrationXXXXXX Migrating from 090605 to XXXXXX
\r
*
\r
* <b>All</b>
\r
- * - The "Simple Scheduler" has been
deprecated
, as it was little more than an abtracted loop and caused much confusion. User
\r
+ * - The "Simple Scheduler" has been
<i>deprecated</i>
, as it was little more than an abtracted loop and caused much confusion. User
\r
* applications using the scheduler should switch to regular loops instead. The scheduler code will be removed in a future
\r
* release.
\r
* - The "Dynamic Memory Block Allocator" has been removed, as it was unused in (and unrelated to) the LUFA library and never
\r
* used in user applications. The library is available from the author's website for those wishing to still use it in their
\r
* applications.
\r
*
\r
* applications using the scheduler should switch to regular loops instead. The scheduler code will be removed in a future
\r
* release.
\r
* - The "Dynamic Memory Block Allocator" has been removed, as it was unused in (and unrelated to) the LUFA library and never
\r
* used in user applications. The library is available from the author's website for those wishing to still use it in their
\r
* applications.
\r
*
\r
+ * <b>Host Mode</b>
\r
+ * - The USB_GetDeviceConfigDescriptor() function now requires the desired configuration index within the device as its first
\r
+ * parameter, to add support for multi-configuration devices. Existing code should use a configuration index of 1 to indicate the
\r
+ * first configuration descriptor within the device.
\r
+ *
\r
* \section Sec_Migration090605 Migrating from 090510 to 090605
\r
*
\r
* <b>Device Mode</b>
\r
* \section Sec_Migration090605 Migrating from 090510 to 090605
\r
*
\r
* <b>Device Mode</b>
\r
diff --git
a/Projects/MissileLauncher/ConfigDescriptor.c
b/Projects/MissileLauncher/ConfigDescriptor.c
index
29fa60b
..
2a6e152
100644
(file)
--- a/
Projects/MissileLauncher/ConfigDescriptor.c
+++ b/
Projects/MissileLauncher/ConfigDescriptor.c
@@
-53,7
+53,7
@@
uint8_t ProcessConfigurationDescriptor(void)
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
uint8_t FoundEndpoints = 0;
\r
\r
/* Get Configuration Descriptor size from the device */
\r
- if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
+ if (USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
return ControlError;
\r
\r
/* Ensure that the Configuration Descriptor isn't too large */
\r
@@
-64,7
+64,7
@@
uint8_t ProcessConfigurationDescriptor(void)
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
ConfigDescriptorData = alloca(ConfigDescriptorSize);
\r
\r
/* Retrieve the entire configuration descriptor into the allocated buffer */
\r
- USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, ConfigDescriptorData);
\r
+ USB_GetDeviceConfigDescriptor(
1,
&ConfigDescriptorSize, ConfigDescriptorData);
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
\r
/* Validate returned data - ensure first entry is a configuration header descriptor */
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)
\r
diff --git
a/Projects/MissileLauncher/MissileLauncher.c
b/Projects/MissileLauncher/MissileLauncher.c
index
2782b69
..
bd542ee
100644
(file)
--- a/
Projects/MissileLauncher/MissileLauncher.c
+++ b/
Projects/MissileLauncher/MissileLauncher.c
@@
-54,40
+54,40
@@
#include "MissileLauncher.h"
\r
\r
/** Launcher first init command report data sequence */
\r
#include "MissileLauncher.h"
\r
\r
/** Launcher first init command report data sequence */
\r
-
static const
uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 };
\r
+uint8_t CMD_INITA[8] = { 85, 83, 66, 67, 0, 0, 4, 0 };
\r
\r
/** Launcher second init command report data sequence */
\r
\r
/** Launcher second init command report data sequence */
\r
-
static const
uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 };
\r
+uint8_t CMD_INITB[8] = { 85, 83, 66, 67, 0, 64, 2, 0 };
\r
\r
/** Launcher command report data sequence to stop all movement */
\r
\r
/** Launcher command report data sequence to stop all movement */
\r
-
static const
uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 };
\r
+uint8_t CMD_STOP[8] = { 0, 0, 0, 0, 0, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move left */
\r
\r
/** Launcher command report data sequence to move left */
\r
-
static const
uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 };
\r
+uint8_t CMD_LEFT[8] = { 0, 1, 0, 0, 0, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move right */
\r
\r
/** Launcher command report data sequence to move right */
\r
-
static const
uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 };
\r
+uint8_t CMD_RIGHT[8] = { 0, 0, 1, 0, 0, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move up */
\r
\r
/** Launcher command report data sequence to move up */
\r
-
static const
uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 };
\r
+uint8_t CMD_UP[8] = { 0, 0, 0, 1, 0, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move down */
\r
\r
/** Launcher command report data sequence to move down */
\r
-
static const
uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 };
\r
+uint8_t CMD_DOWN[8] = { 0, 0, 0, 0, 1, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move left and up */
\r
\r
/** Launcher command report data sequence to move left and up */
\r
-
static const
uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 };
\r
+uint8_t CMD_LEFTUP[8] = { 0, 1, 0, 1, 0, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move right and up */
\r
\r
/** Launcher command report data sequence to move right and up */
\r
-
static const
uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 };
\r
+uint8_t CMD_RIGHTUP[8] = { 0, 0, 1, 1, 0, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move left and down */
\r
\r
/** Launcher command report data sequence to move left and down */
\r
-
static const
uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 };
\r
+uint8_t CMD_LEFTDOWN[8] = { 0, 1, 0, 0, 1, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to move right and down */
\r
\r
/** Launcher command report data sequence to move right and down */
\r
-
static const
uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 };
\r
+uint8_t CMD_RIGHTDOWN[8] = { 0, 0, 1, 0, 1, 0, 8, 8 };
\r
\r
/** Launcher command report data sequence to fire a missile */
\r
\r
/** Launcher command report data sequence to fire a missile */
\r
-
static const
uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 };
\r
+uint8_t CMD_FIRE[8] = { 0, 0, 0, 0, 0, 1, 8, 8 };
\r
\r
/** Last command sent to the launcher, to determine what new command (if any) must be sent */
\r
uint8_t* CmdState;
\r
\r
/** Last command sent to the launcher, to determine what new command (if any) must be sent */
\r
uint8_t* CmdState;
\r