diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-20 02:27:32 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-20 02:27:32 +0000 |
commit | 8a68203d3451c50c573c6baf4850e72d8dbabfcb (patch) | |
tree | 273d8ce3cd833c2004413229a2846e24b332eb6f /Demos/Host/LowLevel/StillImageHost/StillImageHost.c | |
parent | cf313989e6f451a3b6058db94929a51bc1b5e68b (diff) | |
download | lufa-8a68203d3451c50c573c6baf4850e72d8dbabfcb.tar.gz lufa-8a68203d3451c50c573c6baf4850e72d8dbabfcb.tar.bz2 lufa-8a68203d3451c50c573c6baf4850e72d8dbabfcb.zip |
Added error codes to most StillImageHost demo commands.
Diffstat (limited to 'Demos/Host/LowLevel/StillImageHost/StillImageHost.c')
-rw-r--r-- | Demos/Host/LowLevel/StillImageHost/StillImageHost.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c index f10de4c31..dfc7cb7c1 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c @@ -216,28 +216,28 @@ void StillImage_Task(void) uint8_t* DeviceInfoPos = DeviceInfo;
/* Skip over the data before the unicode device information strings */
- DeviceInfoPos += 8; // Skip to VendorExtensionDesc String
- DeviceInfoPos += ((*DeviceInfoPos << 1) + 1); // Skip over VendorExtensionDesc String
- DeviceInfoPos += 2; // Skip over FunctionalMode
- DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over OperationCode Array
- DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over EventCode Array
- DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over DevicePropCode Array
- DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over ObjectFormatCode Array
- DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over ObjectFormatCode Array
+ DeviceInfoPos += 8; // Skip to VendorExtensionDesc String
+ DeviceInfoPos += (1 + UNICODE_STRING_LENGTH(*DeviceInfoPos)); // Skip over VendorExtensionDesc String
+ DeviceInfoPos += 2; // Skip over FunctionalMode
+ DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over OperationCode Array
+ DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over EventCode Array
+ DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over DevicePropCode Array
+ DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over ObjectFormatCode Array
+ DeviceInfoPos += (4 + (*(uint32_t*)DeviceInfoPos << 1)); // Skip over ObjectFormatCode Array
/* Extract and convert the Manufacturer Unicode string to ASCII and print it through the USART */
char Manufacturer[*DeviceInfoPos];
UnicodeToASCII(DeviceInfoPos, Manufacturer);
printf_P(PSTR(" Manufacturer: %s\r\n"), Manufacturer);
- DeviceInfoPos += ((*DeviceInfoPos << 1) + 1); // Skip over Manufacturer String
+ DeviceInfoPos += 1 + UNICODE_STRING_LENGTH(*DeviceInfoPos); // Skip over Manufacturer String
/* Extract and convert the Model Unicode string to ASCII and print it through the USART */
char Model[*DeviceInfoPos];
UnicodeToASCII(DeviceInfoPos, Model);
printf_P(PSTR(" Model: %s\r\n"), Model);
- DeviceInfoPos += ((*DeviceInfoPos << 1) + 1); // Skip over Model String
+ DeviceInfoPos += 1 + UNICODE_STRING_LENGTH(*DeviceInfoPos); // Skip over Model String
/* Extract and convert the Device Version Unicode string to ASCII and print it through the USART */
char DeviceVersion[*DeviceInfoPos];
|