diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-02-20 18:47:25 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-02-20 18:47:25 +0000 |
| commit | f16b9fd2ed545ff083a9a5478852728447e4ec04 (patch) | |
| tree | 2b69bbeafedf62cae42634354d4c4ea3401f9fdb /LUFA/Drivers/USB/Class/Host | |
| parent | 588000af4394993f531b748b976f1be558086c61 (diff) | |
Remove potentially unaligned uint32_t access in HIDParser.c, replace with standard C bit shifts.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2063 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host')
4 files changed, 5 insertions, 13 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c index cc705893..eb4c2530 100644 --- a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c @@ -233,7 +233,7 @@ static uint8_t AOA_Host_GetAccessoryProtocol(uint16_t* const Protocol) static uint8_t AOA_Host_SendPropertyString(USB_ClassInfo_AOA_Host_t* const AOAInterfaceInfo,
const uint8_t StringIndex)
{
- const char* String = ((char**)&AOAInterfaceInfo->Config.PropertyStrings)[StringIndex];
+ const char* String = AOAInterfaceInfo->Config.PropertyStrings[StringIndex];
if (String == NULL)
String = "";
diff --git a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h index d9813428..58bd98fe 100644 --- a/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h +++ b/LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h @@ -91,16 +91,8 @@ uint8_t DataOUTPipeNumber; /**< Pipe number of the AOA interface's OUT data pipe. */
bool DataOUTPipeDoubleBank; /**< Indicates if the AOA interface's OUT data pipe should use double banking. */
- struct
- {
- char* Manufacturer; /**< Device manufacturer string. */
- char* Model; /**< Device model name string. */
- char* Description; /**< Device description string. */
- char* Version; /**< Device version string. */
- char* URI; /**< Device URI information string. */
- char* Serial; /**< Device serial number string. */
- } ATTR_PACKED PropertyStrings; /**< Android Accessory property strings, sent to identify the accessory when the
- * Android device is switched into Open Accessory mode. */
+ char* PropertyStrings[AOA_STRING_TOTAL_STRINGS]; /**< Android Accessory property strings, sent to identify the accessory when the
+ * Android device is switched into Open Accessory mode. */
} Config; /**< Config data for the USB class interface within the device. All elements in this section
* <b>must</b> be set or the interface will fail to enumerate and operate correctly.
*/
diff --git a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c index 2d349911..379ccb01 100644 --- a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.c @@ -278,7 +278,7 @@ uint8_t PRNT_Host_SendByte(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, } uint8_t PRNT_Host_SendString(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, - void* String) + const char* const String) { uint8_t ErrorCode; diff --git a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h index 4d9baf0f..c8c997f7 100644 --- a/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h +++ b/LUFA/Drivers/USB/Class/Host/PrinterClassHost.h @@ -190,7 +190,7 @@ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum. */ uint8_t PRNT_Host_SendString(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, - void* String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); + const char* const String) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2); /** Sends the given raw data stream to the attached printer's input endpoint. This should contain commands that the * printer is able to understand - for example, PCL data. Not all printers accept all printer languages; see |
