diff options
Diffstat (limited to 'Demos/Host/LowLevel')
37 files changed, 164 insertions, 86 deletions
diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c index f477ac276..66a5b8e7e 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c +++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" @@ -165,11 +166,14 @@ void ReadNextReport(void)  /** Writes a report to the attached device.   *   *  \param[in] ReportOUTData  Buffer containing the report to send to the device - *  \param[in] ReportIndex  Index of the report in the device (zero if the device does not use multiple reports) - *  \param[in] ReportType  Type of report to send, either REPORT_TYPE_OUT or REPORT_TYPE_FEATURE - *  \param[in] ReportLength  Length of the report to send + *  \param[in] ReportIndex    Index of the report in the device (zero if the device does not use multiple reports) + *  \param[in] ReportType     Type of report to send, either REPORT_TYPE_OUT or REPORT_TYPE_FEATURE + *  \param[in] ReportLength   Length of the report to send   */ -void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t ReportType, uint16_t ReportLength) +void WriteNextReport(uint8_t* ReportOUTData, +                     const uint8_t ReportIndex, +                     const uint8_t ReportType, +                     uint16_t ReportLength)  {  	/* Select the HID data OUT pipe */  	Pipe_SelectPipe(HID_DATA_OUT_PIPE); diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h index 8d0674eee..89ac01958 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h +++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h @@ -90,10 +90,14 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  		void ReadNextReport(void); -		void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t ReportType, uint16_t ReportLength); +		void WriteNextReport(uint8_t* ReportOUTData, +		                     const uint8_t ReportIndex, +		                     const uint8_t ReportType, +		                     uint16_t ReportLength);  #endif diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.c b/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.c index cc7c98bfc..bda99bdd0 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.c +++ b/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.c @@ -79,7 +79,7 @@ uint8_t GetHIDReportData(void)   *   *  \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded   */ -bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem) +bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem)  {  	bool IsJoystick = false; diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h b/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h index 3ffc051e8..da73ff823 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h +++ b/Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h @@ -89,6 +89,6 @@  	/* Function Prototypes: */  		uint8_t GetHIDReportData(void); -		bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem); +		bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem);  #endif diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h index cf6369b9b..95a0a639e 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h @@ -76,7 +76,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  		void ProcessJoystickReport(uint8_t* JoystickReport); diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c index debbf7651..d98c26557 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h index dc09f84c9..91a2be534 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h @@ -87,7 +87,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  		void ReadNextReport(void); diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c b/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c index eb8ec59a8..6b4df377d 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c @@ -79,7 +79,7 @@ uint8_t GetHIDReportData(void)   *   *  \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded   */ -bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem) +bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem)  {  	/* Check the attributes of the current item - see if we are interested in it or not;  	 * only store KEYBOARD usage page items into the Processed HID Report structure to diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.h b/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.h index 428b91a2b..09cace965 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.h +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.h @@ -77,6 +77,6 @@  	/* Function Prototypes: */  		uint8_t GetHIDReportData(void); -		bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem); +		bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem);  #endif diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index 301f6de3e..666879c98 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h index 500b7cb2c..76b3b49a9 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -71,7 +71,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  		void ProcessKeyboardReport(uint8_t* KeyboardReport); diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c index 9c8190286..f518550b5 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c @@ -114,7 +114,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h index 1338f6516..ecae67c8d 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h @@ -108,7 +108,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  #endif diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c index 129c50af8..b94bbcac7 100644 --- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c +++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c @@ -63,7 +63,8 @@ static uint32_t MassStore_Tag = 1;   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum   */ -static uint8_t MassStore_SendCommand(CommandBlockWrapper_t* SCSICommandBlock, void* BufferPtr) +static uint8_t MassStore_SendCommand(CommandBlockWrapper_t* const SCSICommandBlock, +                                     void* BufferPtr)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -178,7 +179,8 @@ static uint8_t MassStore_WaitForDataReceived(void)   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum   */ -static uint8_t MassStore_SendReceiveData(CommandBlockWrapper_t* SCSICommandBlock, void* BufferPtr) +static uint8_t MassStore_SendReceiveData(CommandBlockWrapper_t* const SCSICommandBlock, +                                         void* BufferPtr)  {  	uint8_t  ErrorCode = PIPE_RWSTREAM_NoError;  	uint16_t BytesRem  = SCSICommandBlock->DataTransferLength; @@ -233,7 +235,7 @@ static uint8_t MassStore_SendReceiveData(CommandBlockWrapper_t* SCSICommandBlock   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -static uint8_t MassStore_GetReturnedStatus(CommandStatusWrapper_t* SCSICommandStatus) +static uint8_t MassStore_GetReturnedStatus(CommandStatusWrapper_t* const SCSICommandStatus)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -334,7 +336,8 @@ uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -uint8_t MassStore_Inquiry(const uint8_t LUNIndex, SCSI_Inquiry_Response_t* const InquiryPtr) +uint8_t MassStore_Inquiry(const uint8_t LUNIndex, +                          SCSI_Inquiry_Response_t* const InquiryPtr)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -384,7 +387,8 @@ uint8_t MassStore_Inquiry(const uint8_t LUNIndex, SCSI_Inquiry_Response_t* const   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -uint8_t MassStore_RequestSense(const uint8_t LUNIndex, SCSI_Request_Sense_Response_t* const SensePtr) +uint8_t MassStore_RequestSense(const uint8_t LUNIndex, +                               SCSI_Request_Sense_Response_t* const SensePtr)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -437,8 +441,11 @@ uint8_t MassStore_RequestSense(const uint8_t LUNIndex, SCSI_Request_Sense_Respon   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress, -                                  const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr) +uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, +                                  const uint32_t BlockAddress, +                                  const uint8_t Blocks, +                                  const uint16_t BlockSize, +                                  void* BufferPtr)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -495,8 +502,11 @@ uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAd   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress, -                                   const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr) +uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, +                                   const uint32_t BlockAddress, +                                   const uint8_t Blocks, +                                   const uint16_t BlockSize, +                                   void* BufferPtr)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -599,7 +609,8 @@ uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const CapacityPtr) +uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, +                               SCSI_Capacity_t* const CapacityPtr)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; @@ -658,7 +669,8 @@ uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails   */ -uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool PreventRemoval) +uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, +                                            const bool PreventRemoval)  {  	uint8_t ErrorCode = PIPE_RWSTREAM_NoError; diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h index aa349946c..5c1e80b51 100644 --- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h +++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h @@ -185,25 +185,34 @@  	/* Function Prototypes: */  		#if defined(INCLUDE_FROM_MASSSTORE_COMMANDS_C) -			static uint8_t MassStore_SendCommand(CommandBlockWrapper_t* SCSICommandBlock, void* BufferPtr); +			static uint8_t MassStore_SendCommand(CommandBlockWrapper_t* const SCSICommandBlock, +			                                     void* BufferPtr);  			static uint8_t MassStore_WaitForDataReceived(void); -			static uint8_t MassStore_SendReceiveData(CommandBlockWrapper_t* SCSICommandBlock, void* BufferPtr) ATTR_NON_NULL_PTR_ARG(1); -			static uint8_t MassStore_GetReturnedStatus(CommandStatusWrapper_t* SCSICommandStatus) ATTR_NON_NULL_PTR_ARG(1); +			static uint8_t MassStore_SendReceiveData(CommandBlockWrapper_t* const SCSICommandBlock, +			                                         void* BufferPtr) ATTR_NON_NULL_PTR_ARG(1); +			static uint8_t MassStore_GetReturnedStatus(CommandStatusWrapper_t* const SCSICommandStatus) ATTR_NON_NULL_PTR_ARG(1);  		#endif  		uint8_t MassStore_MassStorageReset(void);  		uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex); -		uint8_t MassStore_RequestSense(const uint8_t LUNIndex, SCSI_Request_Sense_Response_t* const SensePtr) -		                               ATTR_NON_NULL_PTR_ARG(2); -		uint8_t MassStore_Inquiry(const uint8_t LUNIndex, SCSI_Inquiry_Response_t* const InquiryPtr) -		                               ATTR_NON_NULL_PTR_ARG(2); -		uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress, -		                                  const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr) ATTR_NON_NULL_PTR_ARG(5); -		uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress, -                                           const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr) ATTR_NON_NULL_PTR_ARG(5); -		uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const CapacityPtr) -		                               ATTR_NON_NULL_PTR_ARG(2); +		uint8_t MassStore_RequestSense(const uint8_t LUNIndex, +		                               SCSI_Request_Sense_Response_t* const SensePtr) ATTR_NON_NULL_PTR_ARG(2); +		uint8_t MassStore_Inquiry(const uint8_t LUNIndex, +		                          SCSI_Inquiry_Response_t* const InquiryPtr) ATTR_NON_NULL_PTR_ARG(2); +		uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, +		                                  const uint32_t BlockAddress, +		                                  const uint8_t Blocks, +		                                  const uint16_t BlockSize, +		                                  void* BufferPtr) ATTR_NON_NULL_PTR_ARG(5); +		uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, +		                                   const uint32_t BlockAddress, +                                           const uint8_t Blocks, +		                                   const uint16_t BlockSize, +		                                   void* BufferPtr) ATTR_NON_NULL_PTR_ARG(5); +		uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, +		                               SCSI_Capacity_t* const CapacityPtr) ATTR_NON_NULL_PTR_ARG(2);  		uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex); -		uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool PreventRemoval); +		uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, +		                                            const bool PreventRemoval);  #endif diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c index 2739fc99a..985aeeb08 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c @@ -117,7 +117,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" @@ -373,7 +374,8 @@ void MassStorage_Task(void)   *  \param[in] CommandString  ASCII string located in PROGMEM space indicating what operation failed   *  \param[in] ErrorCode      Error code of the function which failed to complete successfully   */ -void ShowDiskReadError(char* CommandString, uint8_t ErrorCode) +void ShowDiskReadError(char* CommandString, +                       const uint8_t ErrorCode)  {  	if (ErrorCode == MASS_STORE_SCSI_COMMAND_FAILED)  	{ diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h index 14d8d9734..7aabe9f7d 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h @@ -80,9 +80,11 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void); -		void ShowDiskReadError(char* CommandString, uint8_t ErrorCode); +		void ShowDiskReadError(char* CommandString, +		                       const uint8_t ErrorCode);  #endif diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.c b/Demos/Host/LowLevel/MouseHost/MouseHost.c index 6e7b284df..bf20bca52 100644 --- a/Demos/Host/LowLevel/MouseHost/MouseHost.c +++ b/Demos/Host/LowLevel/MouseHost/MouseHost.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.h b/Demos/Host/LowLevel/MouseHost/MouseHost.h index f196dadcb..b9c5aeda1 100644 --- a/Demos/Host/LowLevel/MouseHost/MouseHost.h +++ b/Demos/Host/LowLevel/MouseHost/MouseHost.h @@ -87,7 +87,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  		void ReadNextReport(void); diff --git a/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c b/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c index f551f2f4c..327ae45ec 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c @@ -79,7 +79,7 @@ uint8_t GetHIDReportData(void)   *   *  \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded   */ -bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem) +bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem)  {  	bool IsMouse = false; diff --git a/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.h b/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.h index 684c74319..bd12a39c1 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.h +++ b/Demos/Host/LowLevel/MouseHostWithParser/HIDReport.h @@ -92,6 +92,6 @@  	/* Function Prototypes: */  		uint8_t GetHIDReportData(void); -		bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem); +		bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem);  #endif diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index efe1421a2..1b9c12aa9 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h index 2c11f110c..3a80c8e60 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h @@ -76,7 +76,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  		void ProcessMouseReport(uint8_t* MouseReport); diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c index 5f3effa7b..024895991 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c @@ -44,7 +44,8 @@   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum   */ -uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t CommandSize) +uint8_t Printer_SendData(const void* const PrinterCommands, +                         const uint16_t CommandSize)  {  	uint8_t ErrorCode; @@ -74,7 +75,8 @@ uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t Comma   *   *  \return A value from the USB_Host_SendControlErrorCodes_t enum   */ -uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize) +uint8_t Printer_GetDeviceID(char* DeviceIDString, +                            const uint16_t BufferSize)  {  	uint8_t  ErrorCode = HOST_SENDCONTROL_Successful;  	uint16_t DeviceIDStringLength = 0; diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h index cbc54564c..8c3bd3316 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h @@ -59,9 +59,11 @@  		#define PRINTER_DATA_OUT_PIPE        2  	/* Function Prototypes: */ -		uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t CommandSize); -		uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize); -		uint8_t Printer_GetPortStatus(uint8_t* PortStatus); +		uint8_t Printer_SendData(const void* const PrinterCommands, +		                         const uint16_t CommandSize); +		uint8_t Printer_GetDeviceID(char* DeviceIDString, +		                            const uint16_t BufferSize); +		uint8_t Printer_GetPortStatus(uint8_t* const PortStatus);  		uint8_t Printer_SoftReset(void);  #endif diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c index b6f3efae3..f12c95ef9 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c @@ -98,7 +98,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)  }  /** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */ -void EVENT_USB_Host_HostError(uint8_t ErrorCode) +void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  {  	USB_ShutDown(); @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h index 99bbd4a66..78583f0e4 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h @@ -74,8 +74,9 @@  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void);  		void EVENT_USB_Host_DeviceEnumerationComplete(void); -		void EVENT_USB_Host_HostError(uint8_t ErrorCode); -		void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode); +		void EVENT_USB_Host_HostError(const uint8_t ErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void SetupHardware(void); diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c b/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c index 5200372e9..cd142ef55 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c +++ b/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c @@ -47,7 +47,8 @@ uint32_t RequestID = 0;   *   *  \return A value from the USB_Host_SendControlErrorCodes_t enum   */ -uint8_t RNDIS_SendEncapsulatedCommand(void* const Buffer, const uint16_t Length) +uint8_t RNDIS_SendEncapsulatedCommand(void* const Buffer, +                                      const uint16_t Length)  {  	USB_ControlRequest = (USB_Request_Header_t)  		{ @@ -71,7 +72,8 @@ uint8_t RNDIS_SendEncapsulatedCommand(void* const Buffer, const uint16_t Length)   *   *  \return A value from the USB_Host_SendControlErrorCodes_t enum   */ -uint8_t RNDIS_GetEncapsulatedResponse(void* const Buffer, const uint16_t Length) +uint8_t RNDIS_GetEncapsulatedResponse(void* const Buffer, +                                      const uint16_t Length)  {  	USB_ControlRequest = (USB_Request_Header_t)  		{ @@ -128,7 +130,8 @@ uint8_t RNDIS_SendKeepAlive(void)   *  \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a   *          logical command failure   */ -uint8_t RNDIS_InitializeDevice(const uint16_t HostMaxPacketSize, uint16_t* const DeviceMaxPacketSize) +uint8_t RNDIS_InitializeDevice(const uint16_t HostMaxPacketSize, +                               uint16_t* const DeviceMaxPacketSize)  {  	uint8_t ErrorCode; @@ -172,7 +175,9 @@ uint8_t RNDIS_InitializeDevice(const uint16_t HostMaxPacketSize, uint16_t* const   *  \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a   *          logical command failure   */ -uint8_t RNDIS_SetRNDISProperty(const uint32_t Oid, void* Buffer, const uint16_t Length) +uint8_t RNDIS_SetRNDISProperty(const uint32_t Oid, +                               void* Buffer, +                               const uint16_t Length)  {  	uint8_t ErrorCode; @@ -222,7 +227,9 @@ uint8_t RNDIS_SetRNDISProperty(const uint32_t Oid, void* Buffer, const uint16_t   *  \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a   *          logical command failure   */ -uint8_t RNDIS_QueryRNDISProperty(const uint32_t Oid, void* Buffer, const uint16_t MaxLength) +uint8_t RNDIS_QueryRNDISProperty(const uint32_t Oid, +                                 void* Buffer, +                                 const uint16_t MaxLength)  {  	uint8_t ErrorCode; diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.h b/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.h index a2f15c5a7..960d53823 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.h +++ b/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.h @@ -200,13 +200,20 @@  		#define RNDIS_COMMAND_FAILED                  0xC0  	/* Function Prototypes: */ -		uint8_t RNDIS_SendEncapsulatedCommand(void* const Buffer, const uint16_t Length); -		uint8_t RNDIS_GetEncapsulatedResponse(void* const Buffer, const uint16_t Length); +		uint8_t RNDIS_SendEncapsulatedCommand(void* const Buffer, +		                                      const uint16_t Length); +		uint8_t RNDIS_GetEncapsulatedResponse(void* const Buffer, +		                                      const uint16_t Length);  		uint8_t RNDIS_SendKeepAlive(void); -		uint8_t RNDIS_InitializeDevice(const uint16_t HostMaxPacketSize, uint16_t* const DeviceMaxPacketSize); -		uint8_t RNDIS_SetRNDISProperty(const uint32_t Oid, void* Buffer, const uint16_t Length); -		uint8_t RNDIS_QueryRNDISProperty(const uint32_t Oid, void* Buffer, const uint16_t MaxLength); +		uint8_t RNDIS_InitializeDevice(const uint16_t HostMaxPacketSize, +		                               uint16_t* const DeviceMaxPacketSize); +		uint8_t RNDIS_SetRNDISProperty(const uint32_t Oid, +		                               void* Buffer, +		                               const uint16_t Length); +		uint8_t RNDIS_QueryRNDISProperty(const uint32_t Oid, +		                                 void* Buffer, +		                                 const uint16_t MaxLength);  		uint8_t RNDIS_GetPacketLength(uint16_t* const PacketLength);  #endif diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c index 1d18f11e6..1da5b4dbf 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h index 46b47f95c..08187f9fa 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h +++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h @@ -91,7 +91,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  #endif diff --git a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c index 530450988..a99a95680 100644 --- a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c +++ b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c @@ -198,7 +198,8 @@ uint8_t SImage_ReceiveBlockHeader(void)   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum   */ -uint8_t SImage_SendData(void* const Buffer, const uint16_t Bytes) +uint8_t SImage_SendData(void* const Buffer, +                        const uint16_t Bytes)  {  	uint8_t ErrorCode; @@ -225,7 +226,8 @@ uint8_t SImage_SendData(void* const Buffer, const uint16_t Bytes)   *   *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum   */ -uint8_t SImage_ReadData(void* const Buffer, const uint16_t Bytes) +uint8_t SImage_ReadData(void* const Buffer, +                        const uint16_t Bytes)  {  	uint8_t ErrorCode; diff --git a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.h b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.h index a57ddaf2c..c91a80122 100644 --- a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.h +++ b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.h @@ -108,8 +108,10 @@  		void    SImage_SendBlockHeader(void);  		uint8_t SImage_ReceiveBlockHeader(void);  		uint8_t SImage_ReceiveEventHeader(void); -		uint8_t SImage_SendData(void* const Buffer, const uint16_t Bytes); -		uint8_t SImage_ReadData(void* const Buffer, const uint16_t Bytes); +		uint8_t SImage_SendData(void* const Buffer, +		                        const uint16_t Bytes); +		uint8_t SImage_ReadData(void* const Buffer, +		                        const uint16_t Bytes);  		bool    SImage_IsEventReceived(void);  #endif diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c index 686eb5ff4..73f0c2c76 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c @@ -113,7 +113,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" @@ -339,7 +340,8 @@ void StillImage_Task(void)   *  \param[in] UnicodeString  Pointer to a Unicode encoded input string   *  \param[out] Buffer        Pointer to a buffer where the converted ASCII string should be stored   */ -void UnicodeToASCII(uint8_t* UnicodeString, char* Buffer) +void UnicodeToASCII(uint8_t* UnicodeString, +                    char* Buffer)  {  	/* Get the number of characters in the string, skip to the start of the string data */  	uint8_t CharactersRemaining = *(UnicodeString++); @@ -363,7 +365,8 @@ void UnicodeToASCII(uint8_t* UnicodeString, char* Buffer)   *  \param[in] ErrorCode          Error code of the function which failed to complete successfully   *  \param[in] ResponseCodeError  Indicates if the error is due to a command failed indication from the device, or a communication failure   */ -void ShowCommandError(uint8_t ErrorCode, bool ResponseCodeError) +void ShowCommandError(uint8_t ErrorCode, +                      bool ResponseCodeError)  {  	char* FailureType = ((ResponseCodeError) ? PSTR("Response Code != OK") : PSTR("Transaction Fail")); diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h index d7b893ee2..61e5eb5b5 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h @@ -76,10 +76,13 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void); -		void UnicodeToASCII(uint8_t* restrict UnicodeString, char* restrict Buffer); -		void ShowCommandError(uint8_t ErrorCode, bool ResponseCodeError); +		void UnicodeToASCII(uint8_t* UnicodeString, +		                    char* Buffer); +		void ShowCommandError(uint8_t ErrorCode, +		                      bool ResponseCodeError);  #endif diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c index 8bec8e562..4c250cd48 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c @@ -112,7 +112,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)  /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while   *  enumerating an attached USB device.   */ -void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) +void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +                                            const uint8_t SubErrorCode)  {  	printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"  	                         " -- Error Code %d\r\n" diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h index 4227b5383..cf785e320 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h @@ -81,7 +81,8 @@  		void EVENT_USB_Host_HostError(const uint8_t ErrorCode);  		void EVENT_USB_Host_DeviceAttached(void);  		void EVENT_USB_Host_DeviceUnattached(void); -		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); +		void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, +		                                            const uint8_t SubErrorCode);  		void EVENT_USB_Host_DeviceEnumerationComplete(void);  #endif  | 
