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:
7fbb759
)
Oops - with new changes to the way the device Configuration Descriptor is retrieved...
author
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 31 Aug 2009 08:27:48 +0000
(08:27 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 31 Aug 2009 08:27:48 +0000
(08:27 +0000)
12 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/KeyboardHostWithParser/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.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/MouseHostWithParser/MouseHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
b/Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
index
f856262
..
487cac6
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
+++ b/
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
@@
-70,7
+70,7
@@
uint8_t ProcessConfigurationDescriptor(void)
return NoEndpointFound;
\r
}
\r
\r
return NoEndpointFound;
\r
}
\r
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Check if the endpoint is a bulk or interrupt type endpoint */
\r
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
\r
\r
/* Check if the endpoint is a bulk or interrupt type endpoint */
\r
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
\r
diff --git
a/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
index
f9671e2
..
917df27
100644
(file)
--- a/
Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
@@
-122,7
+122,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
}
\r
\r
}
\r
}
\r
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Check if the found endpoint is a interrupt or bulk type descriptor */
\r
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
\r
\r
/* Check if the found endpoint is a interrupt or bulk type descriptor */
\r
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
\r
diff --git
a/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
index
dba62fd
..
6730fdb
100644
(file)
--- a/
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
@@
-89,7
+89,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* If the endpoint is a IN type endpoint */
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
\r
\r
/* If the endpoint is a IN type endpoint */
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
index
46fb94e
..
7dc5574
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
@@
-81,7
+81,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Configure the keyboard data pipe */
\r
Pipe_ConfigurePipe(KEYBOARD_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
\r
/* Configure the keyboard data pipe */
\r
Pipe_ConfigurePipe(KEYBOARD_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
b/Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
index
7ab0a18
..
d09e4c4
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
@@
-81,7
+81,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Save the HID report size for later use */
\r
}
\r
\r
/* Save the HID report size for later use */
\r
- HIDReportSize = DESCRIPTOR_CAST(C
onfigDescriptorData
, USB_Descriptor_HID_t).HIDReportLength;
\r
+ HIDReportSize = DESCRIPTOR_CAST(C
urrConfigLocation
, USB_Descriptor_HID_t).HIDReportLength;
\r
\r
/* Get the keyboard interface's data endpoint descriptor */
\r
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
\r
\r
/* Get the keyboard interface's data endpoint descriptor */
\r
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
\r
@@
-92,7
+92,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Configure the keyboard data pipe */
\r
Pipe_ConfigurePipe(KEYBOARD_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
\r
/* Configure the keyboard data pipe */
\r
Pipe_ConfigurePipe(KEYBOARD_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index
db4032f
..
3c9f304
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@
-166,8
+166,8
@@
void Keyboard_HID_Task(void)
break;
\r
}
\r
\r
break;
\r
}
\r
\r
- p
uts_P(PSTR("Processing HID Report.\r\n")
);
\r
-
\r
+ p
rintf_P(PSTR("Processing HID Report (Size %d Bytes).\r\n"), HIDReportSize
);
\r
+
\r
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
{
\r
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
{
\r
diff --git
a/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
index
1ba3244
..
ca84e45
100644
(file)
--- a/
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
@@
-84,7
+84,7
@@
uint8_t ProcessConfigurationDescriptor(void)
return NoEndpointFound;
\r
}
\r
\r
return NoEndpointFound;
\r
}
\r
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Check if the endpoint is a bulk IN or bulk OUT endpoint, set appropriate globals */
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
\r
\r
/* Check if the endpoint is a bulk IN or bulk OUT endpoint, set appropriate globals */
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
\r
diff --git
a/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
index
912f146
..
2e6a4c8
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
@@
-81,7
+81,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Configure the mouse data pipe */
\r
Pipe_ConfigurePipe(MOUSE_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
\r
/* Configure the mouse data pipe */
\r
Pipe_ConfigurePipe(MOUSE_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
diff --git
a/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
b/Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
index
fa06741
..
901119e
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
@@
-63,7
+63,7
@@
uint8_t ProcessConfigurationDescriptor(void)
default:
\r
return ControlError;
\r
}
\r
default:
\r
return ControlError;
\r
}
\r
-
\r
+
\r
/* Get the mouse interface from the configuration descriptor */
\r
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
\r
DComp_NextMouseInterface) != DESCRIPTOR_SEARCH_COMP_Found)
\r
/* Get the mouse interface from the configuration descriptor */
\r
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
\r
DComp_NextMouseInterface) != DESCRIPTOR_SEARCH_COMP_Found)
\r
@@
-81,8
+81,8
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Save the HID report size for later use */
\r
}
\r
\r
/* Save the HID report size for later use */
\r
- HIDReportSize = DESCRIPTOR_CAST(C
onfigDescriptorData
, USB_Descriptor_HID_t).HIDReportLength;
\r
-
\r
+ HIDReportSize = DESCRIPTOR_CAST(C
urrConfigLocation
, USB_Descriptor_HID_t).HIDReportLength;
\r
+
\r
/* Get the mouse interface's data endpoint descriptor */
\r
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
\r
DComp_NextInterfaceMouseDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
\r
/* Get the mouse interface's data endpoint descriptor */
\r
if (USB_GetNextDescriptorComp(&CurrConfigBytesRem, &CurrConfigLocation,
\r
DComp_NextInterfaceMouseDataEndpoint) != DESCRIPTOR_SEARCH_COMP_Found)
\r
@@
-92,7
+92,7
@@
uint8_t ProcessConfigurationDescriptor(void)
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
}
\r
\r
/* Retrieve the endpoint address from the endpoint descriptor */
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Configure the mouse data pipe */
\r
Pipe_ConfigurePipe(MOUSE_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
\r
/* Configure the mouse data pipe */
\r
Pipe_ConfigurePipe(MOUSE_DATAPIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
\r
diff --git
a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index
31820be
..
69ba64b
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@
-166,7
+166,7
@@
void Mouse_HID_Task(void)
break;
\r
}
\r
\r
break;
\r
}
\r
\r
- p
uts_P(PSTR("Processing HID Report.\r\n")
);
\r
+ p
rintf_P(PSTR("Processing HID Report (Size %d Bytes).\r\n"), HIDReportSize
);
\r
\r
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
\r
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
@@
-179,7
+179,7
@@
void Mouse_HID_Task(void)
\r
/* Wait until USB device disconnected */
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
\r
/* Wait until USB device disconnected */
\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
\r
- break;
\r
+ break;
\r
}
\r
\r
puts_P(PSTR("Mouse Enumerated.\r\n"));
\r
}
\r
\r
puts_P(PSTR("Mouse Enumerated.\r\n"));
\r
diff --git
a/Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
index
22d84c5
..
5a8731d
100644
(file)
--- a/
Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
@@
-61,8
+61,8
@@
uint8_t ProcessConfigurationDescriptor(void)
return NoInterfaceFound;
\r
}
\r
\r
return NoInterfaceFound;
\r
}
\r
\r
- PrinterInterfaceNumber = DESCRIPTOR_CAST(C
onfigDescriptorData
, USB_Descriptor_Interface_t).InterfaceNumber;
\r
- PrinterAltSetting = DESCRIPTOR_CAST(C
onfigDescriptorData
, USB_Descriptor_Interface_t).AlternateSetting;
\r
+ PrinterInterfaceNumber = DESCRIPTOR_CAST(C
urrConfigLocation
, USB_Descriptor_Interface_t).InterfaceNumber;
\r
+ PrinterAltSetting = DESCRIPTOR_CAST(C
urrConfigLocation
, USB_Descriptor_Interface_t).AlternateSetting;
\r
\r
/* Get the IN and OUT data endpoints for the printer interface */
\r
while (FoundEndpoints != ((1 << PRINTER_DATA_OUT_PIPE) | (1 << PRINTER_DATA_IN_PIPE)))
\r
\r
/* Get the IN and OUT data endpoints for the printer interface */
\r
while (FoundEndpoints != ((1 << PRINTER_DATA_OUT_PIPE) | (1 << PRINTER_DATA_IN_PIPE)))
\r
@@
-74,7
+74,7
@@
uint8_t ProcessConfigurationDescriptor(void)
return NoEndpointFound;
\r
}
\r
\r
return NoEndpointFound;
\r
}
\r
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Check if the endpoint is a bulk IN or bulk OUT endpoint, set appropriate globals */
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
\r
\r
/* Check if the endpoint is a bulk IN or bulk OUT endpoint, set appropriate globals */
\r
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
\r
diff --git
a/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
b/Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
index
4e7751d
..
5b3664f
100644
(file)
--- a/
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
+++ b/
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
@@
-84,7
+84,7
@@
uint8_t ProcessConfigurationDescriptor(void)
return NoEndpointFound;
\r
}
\r
\r
return NoEndpointFound;
\r
}
\r
\r
- USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
onfigDescriptorData
, USB_Descriptor_Endpoint_t);
\r
+ USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(C
urrConfigLocation
, USB_Descriptor_Endpoint_t);
\r
\r
/* Check if the found endpoint is a interrupt or bulk type descriptor */
\r
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
\r
\r
/* Check if the found endpoint is a interrupt or bulk type descriptor */
\r
if ((EndpointData->Attributes & EP_TYPE_MASK) == EP_TYPE_INTERRUPT)
\r