Update all demos, projects and bootloaders to indent all function parameters, one...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 21 Jul 2010 16:19:32 +0000 (16:19 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 21 Jul 2010 16:19:32 +0000 (16:19 +0000)
Add missing const qualifiers to the demos.

271 files changed:
Bootloaders/CDC/Descriptors.c
Bootloaders/CDC/Descriptors.h
Bootloaders/DFU/Descriptors.c
Bootloaders/DFU/Descriptors.h
Demos/Device/ClassDriver/AudioInput/Descriptors.c
Demos/Device/ClassDriver/AudioInput/Descriptors.h
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
Demos/Device/ClassDriver/AudioOutput/Descriptors.h
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.h
Demos/Device/ClassDriver/GenericHID/Descriptors.c
Demos/Device/ClassDriver/GenericHID/Descriptors.h
Demos/Device/ClassDriver/GenericHID/GenericHID.c
Demos/Device/ClassDriver/GenericHID/GenericHID.h
Demos/Device/ClassDriver/Joystick/Descriptors.c
Demos/Device/ClassDriver/Joystick/Descriptors.h
Demos/Device/ClassDriver/Joystick/Joystick.c
Demos/Device/ClassDriver/Joystick/Joystick.h
Demos/Device/ClassDriver/Keyboard/Descriptors.h
Demos/Device/ClassDriver/Keyboard/Keyboard.c
Demos/Device/ClassDriver/Keyboard/Keyboard.h
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
Demos/Device/ClassDriver/KeyboardMouse/Descriptors.h
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
Demos/Device/ClassDriver/MIDI/Descriptors.c
Demos/Device/ClassDriver/MIDI/Descriptors.h
Demos/Device/ClassDriver/MassStorage/Descriptors.c
Demos/Device/ClassDriver/MassStorage/Descriptors.h
Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c
Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.h
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.h
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.c
Demos/Device/ClassDriver/MassStorageKeyboard/Descriptors.h
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
Demos/Device/ClassDriver/Mouse/Descriptors.c
Demos/Device/ClassDriver/Mouse/Descriptors.h
Demos/Device/ClassDriver/Mouse/Mouse.c
Demos/Device/ClassDriver/Mouse/Mouse.h
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.c
Demos/Device/ClassDriver/RNDISEthernet/Descriptors.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/ARP.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/Ethernet.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/IP.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.h
Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.c
Demos/Device/ClassDriver/RNDISEthernet/Lib/Webserver.h
Demos/Device/ClassDriver/VirtualSerial/Descriptors.c
Demos/Device/ClassDriver/VirtualSerial/Descriptors.h
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.c
Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
Demos/Device/Incomplete/Sideshow/Descriptors.c
Demos/Device/Incomplete/Sideshow/Descriptors.h
Demos/Device/Incomplete/Sideshow/Lib/SideshowApplications.c
Demos/Device/Incomplete/Sideshow/Lib/SideshowApplications.h
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.c
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.h
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.c
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h
Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.c
Demos/Device/Incomplete/Sideshow/Lib/SideshowContent.h
Demos/Device/Incomplete/Sideshow/Sideshow.c
Demos/Device/LowLevel/AudioInput/Descriptors.c
Demos/Device/LowLevel/AudioInput/Descriptors.h
Demos/Device/LowLevel/AudioOutput/Descriptors.c
Demos/Device/LowLevel/AudioOutput/Descriptors.h
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.c
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
Demos/Device/LowLevel/GenericHID/Descriptors.c
Demos/Device/LowLevel/GenericHID/Descriptors.h
Demos/Device/LowLevel/Joystick/Descriptors.c
Demos/Device/LowLevel/Joystick/Descriptors.h
Demos/Device/LowLevel/Joystick/Joystick.c
Demos/Device/LowLevel/Joystick/Joystick.h
Demos/Device/LowLevel/Keyboard/Descriptors.c
Demos/Device/LowLevel/Keyboard/Descriptors.h
Demos/Device/LowLevel/Keyboard/Keyboard.c
Demos/Device/LowLevel/Keyboard/Keyboard.h
Demos/Device/LowLevel/KeyboardMouse/Descriptors.c
Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
Demos/Device/LowLevel/MIDI/Descriptors.c
Demos/Device/LowLevel/MIDI/Descriptors.h
Demos/Device/LowLevel/MassStorage/Descriptors.c
Demos/Device/LowLevel/MassStorage/Descriptors.h
Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c
Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.h
Demos/Device/LowLevel/Mouse/Descriptors.c
Demos/Device/LowLevel/Mouse/Descriptors.h
Demos/Device/LowLevel/Mouse/Mouse.c
Demos/Device/LowLevel/Mouse/Mouse.h
Demos/Device/LowLevel/RNDISEthernet/Descriptors.c
Demos/Device/LowLevel/RNDISEthernet/Descriptors.h
Demos/Device/LowLevel/RNDISEthernet/Lib/ARP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/ARP.h
Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.h
Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.c
Demos/Device/LowLevel/RNDISEthernet/Lib/Ethernet.h
Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.h
Demos/Device/LowLevel/RNDISEthernet/Lib/IP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/IP.h
Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c
Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.h
Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h
Demos/Device/LowLevel/RNDISEthernet/Lib/UDP.c
Demos/Device/LowLevel/RNDISEthernet/Lib/UDP.h
Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c
Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.h
Demos/Device/LowLevel/VirtualSerial/Descriptors.c
Demos/Device/LowLevel/VirtualSerial/Descriptors.h
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.h
Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.h
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
Demos/Host/ClassDriver/MIDIHost/MIDIHost.h
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
Demos/Host/ClassDriver/MouseHost/MouseHost.c
Demos/Host/ClassDriver/MouseHost/MouseHost.h
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h
Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
Demos/Host/ClassDriver/PrinterHost/PrinterHost.h
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
Demos/Host/ClassDriver/StillImageHost/StillImageHost.h
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h
Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothACLPackets.c
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.h
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.h
Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMM.c
Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMM.h
Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.c
Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h
Demos/Host/Incomplete/BluetoothHost/Lib/SDP.c
Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.c
Demos/Host/LowLevel/JoystickHostWithParser/HIDReport.h
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.c
Demos/Host/LowLevel/KeyboardHostWithParser/HIDReport.h
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
Demos/Host/LowLevel/MIDIHost/MIDIHost.c
Demos/Host/LowLevel/MIDIHost/MIDIHost.h
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
Demos/Host/LowLevel/MouseHost/MouseHost.c
Demos/Host/LowLevel/MouseHost/MouseHost.h
Demos/Host/LowLevel/MouseHostWithParser/HIDReport.c
Demos/Host/LowLevel/MouseHostWithParser/HIDReport.h
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c
Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.h
Demos/Host/LowLevel/PrinterHost/PrinterHost.c
Demos/Host/LowLevel/PrinterHost/PrinterHost.h
Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c
Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.h
Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h
Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.h
Demos/Host/LowLevel/StillImageHost/StillImageHost.c
Demos/Host/LowLevel/StillImageHost/StillImageHost.h
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h
Projects/AVRISP-MKII/Descriptors.c
Projects/AVRISP-MKII/Descriptors.h
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
Projects/AVRISP-MKII/Lib/V2ProtocolParams.c
Projects/AVRISP-MKII/Lib/V2ProtocolParams.h
Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.h
Projects/Benito/Descriptors.c
Projects/Benito/Descriptors.h
Projects/Benito/Lib/LightweightRingBuff.h
Projects/Incomplete/MIDIToneGenerator/Descriptors.c
Projects/Incomplete/MIDIToneGenerator/Descriptors.h
Projects/Incomplete/StandaloneProgrammer/Descriptors.c
Projects/Incomplete/StandaloneProgrammer/Descriptors.h
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h
Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h
Projects/LEDNotifier/Board/LEDs.h
Projects/LEDNotifier/Descriptors.c
Projects/LEDNotifier/Descriptors.h
Projects/Magstripe/Descriptors.c
Projects/Magstripe/Descriptors.h
Projects/Magstripe/Lib/CircularBitBuffer.c
Projects/Magstripe/Lib/CircularBitBuffer.h
Projects/Magstripe/Magstripe.c
Projects/Magstripe/Magstripe.h
Projects/MissileLauncher/MissileLauncher.c
Projects/MissileLauncher/MissileLauncher.h
Projects/RelayBoard/Descriptors.c
Projects/RelayBoard/Descriptors.h
Projects/TempDataLogger/Descriptors.c
Projects/TempDataLogger/Descriptors.h
Projects/TempDataLogger/Lib/DS1307.c
Projects/TempDataLogger/Lib/DS1307.h
Projects/TempDataLogger/Lib/DataflashManager.c
Projects/TempDataLogger/Lib/DataflashManager.h
Projects/TempDataLogger/Lib/SCSI.c
Projects/TempDataLogger/Lib/SCSI.h
Projects/TempDataLogger/TempDataLogger.c
Projects/TempDataLogger/TempDataLogger.h
Projects/USBtoSerial/Descriptors.c
Projects/USBtoSerial/Descriptors.h
Projects/USBtoSerial/Lib/LightweightRingBuff.h
Projects/Webserver/Descriptors.h
Projects/Webserver/Lib/DHCPClientApp.c
Projects/Webserver/Lib/DHCPClientApp.h
Projects/Webserver/Lib/DataflashManager.c
Projects/Webserver/Lib/DataflashManager.h
Projects/Webserver/Lib/SCSI.c
Projects/Webserver/Lib/SCSI.h
Projects/Webserver/USBHostMode.h
Projects/XPLAINBridge/AVRISPDescriptors.c
Projects/XPLAINBridge/AVRISPDescriptors.h
Projects/XPLAINBridge/Lib/LightweightRingBuff.h
Projects/XPLAINBridge/Lib/SoftUART.h
Projects/XPLAINBridge/USARTDescriptors.c
Projects/XPLAINBridge/USARTDescriptors.h
Projects/XPLAINBridge/XPLAINBridge.c
Projects/XPLAINBridge/XPLAINBridge.h

index c7dcf55..e808fcf 100644 (file)
@@ -201,7 +201,9 @@ USB_Descriptor_String_t ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 845ab55..f8e557c 100644 (file)
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 1e9ec45..4e7272c 100644 (file)
@@ -143,7 +143,9 @@ USB_Descriptor_String_t ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 3cf1526..d89cc90 100644 (file)
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 006e45b..2a58064 100644 (file)
@@ -271,7 +271,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 79825bd..30249e9 100644 (file)
@@ -76,7 +76,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index a9a5f05..0fc52a6 100644 (file)
@@ -271,7 +271,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index ff7f0bb..4804c2c 100644 (file)
@@ -76,7 +76,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 5a89cc8..d50e27d 100644 (file)
@@ -338,7 +338,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 8cebab3..968ddd3 100644 (file)
@@ -96,7 +96,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 35b6559..b0413a6 100644 (file)
@@ -189,7 +189,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 410e195..2192da6 100644 (file)
@@ -66,7 +66,8 @@
                #define GENERIC_REPORT_SIZE       8
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
-
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+                                                                                       
 #endif
index de01ef5..8b51b76 100644 (file)
@@ -143,8 +143,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        if (HIDReportEcho.ReportID)
          *ReportID = HIDReportEcho.ReportID;
@@ -163,8 +166,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        HIDReportEcho.ReportID   = ReportID;
        HIDReportEcho.ReportSize = ReportSize;
index 6327958..8fa0b93 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
                
 #endif
index ec46c3f..125297d 100644 (file)
@@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index a80260c..fc8cbe5 100644 (file)
@@ -63,7 +63,9 @@
                #define JOYSTICK_EPSIZE              8
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress)
                                                    ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 9c6311a..e2804d6 100644 (file)
@@ -137,8 +137,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_JoystickReport_Data_t* JoystickReport = (USB_JoystickReport_Data_t*)ReportData;
        
@@ -173,8 +176,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports
 }
index 1cb3d95..fc06634 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 
 #endif
index 7ea7f47..4100faa 100644 (file)
@@ -63,7 +63,8 @@
                #define KEYBOARD_EPSIZE              8
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index f194f39..80f0ad9 100644 (file)
@@ -178,8 +178,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        uint8_t  LEDMask   = LEDS_NO_LEDS;
        uint8_t* LEDReport = (uint8_t*)ReportData;
index df272e2..4c4e2d5 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 
 #endif
index fa34436..c510ce6 100644 (file)
@@ -275,7 +275,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 3dd2ec7..b4bf3d2 100644 (file)
@@ -69,7 +69,8 @@
                #define HID_EPSIZE                8
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index b032f87..43634ea 100644 (file)
@@ -165,8 +165,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        uint8_t JoyStatus_LCL    = Joystick_GetStatus();
        uint8_t ButtonStatus_LCL = Buttons_GetStatus();
@@ -232,8 +235,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        if (HIDInterfaceInfo == &Keyboard_HID_Interface)
        {
index 34c1467..9cbba7a 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
                
 #endif
index 640c832..9ce300a 100644 (file)
@@ -283,7 +283,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 9933d06..fc648de 100644 (file)
@@ -75,7 +75,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index d7d41c5..b1744e6 100644 (file)
@@ -174,7 +174,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index a13ee01..b7d15e4 100644 (file)
@@ -66,7 +66,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index bf0b330..64db446 100644 (file)
@@ -47,7 +47,9 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
-void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                  const uint32_t BlockAddress,
+                                  uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -181,7 +183,9 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
-void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                 const uint32_t BlockAddress,
+                                 uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -289,7 +293,9 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
  *  \param[in] TotalBlocks   Number of blocks of data to write
  *  \param[in] BufferPtr     Pointer to the data source RAM buffer
  */
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                      uint16_t TotalBlocks,
+                                      uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -388,7 +394,9 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t Tota
  *  \param[in] TotalBlocks   Number of blocks of data to read
  *  \param[out] BufferPtr    Pointer to the data destination RAM buffer
  */
-void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                     uint16_t TotalBlocks,
+                                     uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index f3e1b65..f162c03 100644 (file)
                #define VIRTUAL_MEMORY_BLOCKS               (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                 const uint32_t BlockAddress,
                                                  uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                const uint32_t BlockAddress,
                                                 uint16_t TotalBlocks);
-               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                                     uint16_t TotalBlocks,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
-               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                                    uint16_t TotalBlocks,
                                                     uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                void DataflashManager_ResetDataflashProtections(void);
                bool DataflashManager_CheckDataflashOperation(void);
index 0bc92c1..fcda46c 100644 (file)
@@ -247,7 +247,8 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  *  \param[in] IsDataRead  Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
  */
-static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead)
+static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                      const bool IsDataRead)
 {
        uint32_t BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
        uint16_t TotalBlocks  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
index dab3ebb..0c00cfb 100644 (file)
@@ -80,7 +80,8 @@
                        static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead);
+                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                             const bool IsDataRead);
                #endif
                
 #endif
index 4bd2e48..f8c2ff7 100644 (file)
@@ -254,7 +254,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 70b161d..50c6186 100644 (file)
@@ -77,7 +77,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index f3a0ea1..00016b0 100644 (file)
@@ -47,7 +47,9 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
-void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                  const uint32_t BlockAddress,
+                                  uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -181,7 +183,9 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
-void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                 const uint32_t BlockAddress,
+                                 uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -289,7 +293,9 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
  *  \param[in] TotalBlocks   Number of blocks of data to write
  *  \param[in] BufferPtr     Pointer to the data source RAM buffer
  */
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                      uint16_t TotalBlocks,
+                                      uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -388,7 +394,9 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t Tota
  *  \param[in] TotalBlocks   Number of blocks of data to read
  *  \param[out] BufferPtr    Pointer to the data destination RAM buffer
  */
-void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                     uint16_t TotalBlocks,
+                                     uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index 585af0d..f1f0ec7 100644 (file)
                #define LUN_MEDIA_BLOCKS                   (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                 const uint32_t BlockAddress,
                                                  uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                const uint32_t BlockAddress,
                                                 uint16_t TotalBlocks);
-               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                                     uint16_t TotalBlocks,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
-               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                                    uint16_t TotalBlocks,
                                                     uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                void DataflashManager_ResetDataflashProtections(void);
                
index fb9bda1..c55af62 100644 (file)
@@ -300,7 +300,8 @@ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
-static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead)
+static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                      const bool IsDataRead)
 {
        uint32_t BlockAddress;
        uint16_t TotalBlocks;
index 125bce4..6025d86 100644 (file)
@@ -81,7 +81,8 @@
                        static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-                       static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead);
+                       static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                             const bool IsDataRead);
                #endif
                
 #endif
index 330252f..2a6e3dd 100644 (file)
@@ -185,8 +185,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
        
@@ -223,8 +226,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        uint8_t  LEDMask   = LEDS_NO_LEDS;
        uint8_t* LEDReport = (uint8_t*)ReportData;
index a6a16d1..6e1a083 100644 (file)
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
-
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 
 #endif
index 703051e..66db661 100644 (file)
@@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 2c77d78..59910de 100644 (file)
@@ -63,7 +63,8 @@
                #define MOUSE_EPSIZE              8
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index f242736..19ca013 100644 (file)
@@ -137,8 +137,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData;
                
@@ -173,8 +176,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports
 }
index c3d9ce6..9a3c6e5 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 
 #endif
index 4857892..21b4fbb 100644 (file)
@@ -212,7 +212,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 8e8cde2..7d6c3b9 100644 (file)
@@ -77,7 +77,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 6cbc67f..18da19c 100644 (file)
@@ -46,7 +46,8 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t ARP_ProcessARPPacket(void* InDataStart, void* OutDataStart)
+int16_t ARP_ProcessARPPacket(void* InDataStart,
+                             void* OutDataStart)
 {
        DecodeARPHeader(InDataStart);
 
index 6ae9b7b..8de76f3 100644 (file)
@@ -69,6 +69,7 @@
                } ARP_Header_t;
                
        /* Function Prototypes: */
-               int16_t ARP_ProcessARPPacket(void* InDataStart, void* OutDataStart);
+               int16_t ARP_ProcessARPPacket(void* InDataStart,
+                                            void* OutDataStart);
 
 #endif
index 761c6ad..f694f2c 100644 (file)
@@ -46,7 +46,9 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, void* DHCPHeaderOutStart)
+int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
+                               void* DHCPHeaderInStart,
+                               void* DHCPHeaderOutStart)
 {
        IP_Header_t*   IPHeaderIN    = (IP_Header_t*)IPHeaderInStart;
        DHCP_Header_t* DHCPHeaderIN  = (DHCP_Header_t*)DHCPHeaderInStart;
index 2c8c4d8..3bfdb29 100644 (file)
                } DHCP_Header_t;
 
        /* Function Prototypes: */
-               int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, void* DHCPHeaderOutStart);
+               int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
+                                              void* DHCPHeaderInStart,
+                                              void* DHCPHeaderOutStart);
 
 #endif
index e34f824..5f39623 100644 (file)
@@ -56,7 +56,8 @@ const IP_Address_t  ClientIPAddress     = {CLIENT_IP_ADDRESS};
 /** Processes an incoming Ethernet frame, and writes the appropriate response to the output Ethernet
  *  frame buffer if the sub protocol handlers create a valid response.
  */
-void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_t* FrameOUT)
+void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* const FrameIN,
+                            Ethernet_Frame_Info_t* const FrameOUT)
 {
        DecodeEthernetFrameHeader(FrameIN);
 
@@ -115,7 +116,8 @@ void Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_
  *
  *  \return A 16-bit Ethernet checksum value
  */
-uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes)
+uint16_t Ethernet_Checksum16(void* Data,
+                             uint16_t Bytes)
 {
        uint16_t* Words    = (uint16_t*)Data;
        uint32_t  Checksum = 0;
index f8b8bff..233f48d 100644 (file)
@@ -96,7 +96,9 @@
                extern const IP_Address_t  ClientIPAddress;
                
        /* Function Prototypes: */
-               void     Ethernet_ProcessPacket(Ethernet_Frame_Info_t* FrameIN, Ethernet_Frame_Info_t* FrameOUT);
-               uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes);
+               void     Ethernet_ProcessPacket(Ethernet_Frame_Info_t* const FrameIN,
+                                               Ethernet_Frame_Info_t* const FrameOUT);
+               uint16_t Ethernet_Checksum16(void* Data,
+                                            uint16_t Bytes);
                
 #endif
index fa1a651..fec74b3 100644 (file)
@@ -46,7 +46,9 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart)
+int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* const FrameIN,
+                               void* InDataStart,
+                               void* OutDataStart)
 {
        ICMP_Header_t* ICMPHeaderIN  = (ICMP_Header_t*)InDataStart;
        ICMP_Header_t* ICMPHeaderOUT = (ICMP_Header_t*)OutDataStart;
index 4fe4295..9982560 100644 (file)
@@ -75,6 +75,8 @@
                } ICMP_Header_t;
                
        /* Function Prototypes: */
-               int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart);
+               int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* const FrameIN,
+                                              void* InDataStart,
+                                              void* OutDataStart);
 
 #endif
index 6766322..6f49eac 100644 (file)
@@ -47,7 +47,9 @@
  *           response was generated, NO_PROCESS if the packet processing was deferred until the
  *           next Ethernet packet handler iteration
  */
-int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart)
+int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* const FrameIN,
+                           void* InDataStart,
+                           void* OutDataStart)
 {
        DecodeIPHeader(InDataStart);
 
index ede537a..2156957 100644 (file)
@@ -90,6 +90,8 @@
                } IP_Header_t;
                
        /* Function Prototypes: */
-               int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart);
+               int16_t IP_ProcessIPPacket(Ethernet_Frame_Info_t* const FrameIN,
+                                          void* InDataStart,
+                                          void* OutDataStart);
 
 #endif
index e0bf6ec..676bf7a 100644 (file)
@@ -53,7 +53,7 @@
  *
  *  \param[in] FrameINData  Pointer to the start of an Ethernet frame information structure
  */
-void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* FrameINData)
+void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* const FrameINData)
 {
        #if !defined(NO_DECODE_ETHERNET)
        Ethernet_Frame_Header_t* FrameHeader = (Ethernet_Frame_Header_t*)FrameINData->FrameData;
index 56ed795..c1d3b39 100644 (file)
@@ -48,7 +48,7 @@
                #include "Ethernet.h"
                
        /* Function Prototypes: */
-               void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* FrameINData);
+               void DecodeEthernetFrameHeader(Ethernet_Frame_Info_t* const FrameINData);
                void DecodeARPHeader(void* InDataStart);
                void DecodeIPHeader(void* InDataStart);
                void DecodeICMPHeader(void* InDataStart);
index 6b62edb..e0c581f 100644 (file)
@@ -55,7 +55,7 @@ TCP_ConnectionState_t  ConnectionStateTable[MAX_TCP_CONNECTIONS];
  *  level. If an application produces a response, this task constructs the appropriate Ethernet frame and places it into the Ethernet OUT
  *  buffer for later transmission.
  */
-void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* RNDISInterfaceInfo)
+void TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
 {
        /* Run each application in sequence, to process incoming and generate outgoing packets */
        for (uint8_t CSTableEntry = 0; CSTableEntry < MAX_TCP_CONNECTIONS; CSTableEntry++)
@@ -178,7 +178,9 @@ void TCP_Init(void)
  *
  *  \return Boolean true if the port state was set, false otherwise (no more space in the port state table)
  */
-bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
+bool TCP_SetPortState(const uint16_t Port,
+                      const uint8_t State,
+                      void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -225,7 +227,7 @@ bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_Connecti
  *
  *  \return A value from the TCP_PortStates_t enum
  */
-uint8_t TCP_GetPortState(uint16_t Port)
+uint8_t TCP_GetPortState(const uint16_t Port)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -250,7 +252,10 @@ uint8_t TCP_GetPortState(uint16_t Port)
  *
  *  \return Boolean true if the connection was updated or created, false otherwise (no more space in the connection state table)
  */
-bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State)
+bool TCP_SetConnectionState(const uint16_t Port,
+                            const IP_Address_t RemoteAddress,
+                            const uint16_t RemotePort,
+                            const uint8_t State)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -290,7 +295,9 @@ bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t
  *
  *  \return A value from the TCP_ConnectionStates_t enum
  */
-uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
+uint8_t TCP_GetConnectionState(const uint16_t Port,
+                               const IP_Address_t RemoteAddress,
+                               const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -317,7 +324,9 @@ uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16
  *
  *  \return ConnectionInfo structure of the connection if found, NULL otherwise
  */
-TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
+TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
+                                            const IP_Address_t RemoteAddress,
+                                            const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -346,7 +355,9 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAd
  *           response was generated, NO_PROCESS if the packet processing was deferred until the
  *           next Ethernet packet handler iteration
  */
-int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void* TCPHeaderOutStart)
+int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
+                             void* TCPHeaderInStart,
+                             void* TCPHeaderOutStart)
 {
        IP_Header_t*  IPHeaderIN   = (IP_Header_t*)IPHeaderInStart;
        TCP_Header_t* TCPHeaderIN  = (TCP_Header_t*)TCPHeaderInStart;
@@ -593,8 +604,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
  *
  *  \return A 16-bit TCP checksum value
  */
-static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddress,
-                               IP_Address_t DestinationAddress, uint16_t TCPOutSize)
+static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
+                               const IP_Address_t SourceAddress,
+                               const IP_Address_t DestinationAddress,
+                               const uint16_t TCPOutSize)
 {
        uint32_t Checksum = 0;
        
index ac14415..d412647 100644 (file)
                } TCP_Header_t;
                
        /* Function Prototypes: */
-               void                  TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* RNDISInterfaceInfo);
+               void                  TCP_TCPTask(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo);
                void                  TCP_Init(void);
-               bool                  TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
-               uint8_t               TCP_GetPortState(uint16_t Port);
-               bool                  TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State);
-               uint8_t               TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort);
-               TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort);
-               int16_t               TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void* TCPHeaderOutStart);
+               bool                  TCP_SetPortState(const uint16_t Port,
+                                                      const uint8_t State,
+                                                      void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
+               uint8_t               TCP_GetPortState(const uint16_t Port);
+               bool                  TCP_SetConnectionState(const uint16_t Port,
+                                                            const IP_Address_t RemoteAddress,
+                                                            const uint16_t RemotePort,
+                                                            const uint8_t State);
+               uint8_t               TCP_GetConnectionState(const uint16_t Port,
+                                                            const IP_Address_t RemoteAddress,
+                                                            const uint16_t RemotePort);
+               TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
+                                                           const IP_Address_t RemoteAddress,
+                                                           const uint16_t RemotePort);
+               int16_t               TCP_ProcessTCPPacket(void* IPHeaderInStart,
+                                                          void* TCPHeaderInStart,
+                                                          void* TCPHeaderOutStart);
 
                #if defined(INCLUDE_FROM_TCP_C)
-                       static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddress,
-                                                                                  IP_Address_t DestinationAddress, uint16_t TCPOutSize);
+                       static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
+                                                      const IP_Address_t SourceAddress,
+                                                                                  const IP_Address_t DestinationAddress,
+                                                      uint16_t TCPOutSize);
                #endif
 
 #endif
index c9c523f..15b0656 100644 (file)
@@ -46,7 +46,9 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void* UDPHeaderOutStart)
+int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart,
+                             void* UDPHeaderInStart,
+                             void* UDPHeaderOutStart)
 {
        UDP_Header_t* UDPHeaderIN  = (UDP_Header_t*)UDPHeaderInStart;
        UDP_Header_t* UDPHeaderOUT = (UDP_Header_t*)UDPHeaderOutStart;
index ee90522..57abd0d 100644 (file)
@@ -62,6 +62,8 @@
                } UDP_Header_t;
                
        /* Function Prototypes: */
-               int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void* UDPHeaderOutStart);
+               int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart,
+                                            void* UDPHeaderInStart,
+                                            void* UDPHeaderOutStart);
 
 #endif
index 7f90de3..e01a04f 100644 (file)
@@ -90,7 +90,8 @@ void Webserver_Init(void)
  *
  *  \return Boolean true if the command matches the request, false otherwise
  */
-static bool IsHTTPCommand(uint8_t* RequestHeader, char* Command)
+static bool IsHTTPCommand(uint8_t* RequestHeader,
+                          char* Command)
 {
        /* Returns true if the non null terminated string in RequestHeader matches the null terminated string Command */
        return (strncmp((char*)RequestHeader, Command, strlen(Command)) == 0);
@@ -102,7 +103,8 @@ static bool IsHTTPCommand(uint8_t* RequestHeader, char* Command)
  *  \param[in] ConnectionState  Pointer to a TCP Connection State structure giving connection information
  *  \param[in,out] Buffer       Pointer to the application's send/receive packet buffer
  */
-void Webserver_ApplicationCallback(TCP_ConnectionState_t* ConnectionState, TCP_ConnectionBuffer_t* Buffer)
+void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState,
+                                   TCP_ConnectionBuffer_t* const Buffer)
 {
        char*          BufferDataStr = (char*)Buffer->Data;
        static uint8_t PageBlock     = 0;
index 3ba4186..87fe1c9 100644 (file)
@@ -50,6 +50,7 @@
        
        /* Function Prototypes: */
                void Webserver_Init(void);
-               void Webserver_ApplicationCallback(TCP_ConnectionState_t* ConnectionState, TCP_ConnectionBuffer_t* Buffer);
+               void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState,
+                                                  TCP_ConnectionBuffer_t* const Buffer);
 
 #endif
index 97b66de..8f11d4a 100644 (file)
@@ -224,7 +224,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 017e3fe..387034f 100644 (file)
@@ -77,7 +77,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index f91fa4c..83fe2fe 100644 (file)
@@ -311,7 +311,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index f4733c2..82b3ed1 100644 (file)
@@ -88,7 +88,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 313f6c0..8db86b8 100644 (file)
@@ -199,8 +199,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData;
                
@@ -235,8 +238,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports
 }
index 64d04ec..64ad522 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 #endif
index f6d16c8..e05358e 100644 (file)
@@ -154,7 +154,9 @@ USB_OSCompatibleIDDescriptor_t PROGMEM DevCompatIDs =
                                 SubCompatibleID: "UNIV1"}
 };
 
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
@@ -207,11 +209,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
        return Size;
 }
 
-bool USB_GetOSFeatureDescriptor(const uint16_t wValue, const uint8_t wIndex,
-                                void** const DescriptorAddress, uint16_t* const DescriptorSize)
+uint16_t USB_GetOSFeatureDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        void*    Address = NULL;
-       uint16_t Size    = 0;
+       uint16_t Size    = NO_DESCRIPTOR;
 
        /* Check if a device level OS feature descriptor is being requested */
        if (wValue == 0x0000)
@@ -224,13 +227,6 @@ bool USB_GetOSFeatureDescriptor(const uint16_t wValue, const uint8_t wIndex,
                }
        }
 
-       if (Address != NULL)
-       {
-               *DescriptorAddress = Address;
-               *DescriptorSize    = Size;
-
-               return true;
-       }
-               
-       return false;
+       *DescriptorAddress = Address;
+       return Size;
 }
\ No newline at end of file
index 83c683b..4d672c0 100644 (file)
                } USB_OSCompatibleIDDescriptor_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                           ATTR_WARN_UNUSED_RESULT ATTR_WEAK ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
-               bool USB_GetOSFeatureDescriptor(const uint16_t wValue, const uint8_t wIndex,
-                                               void** const DescriptorAddress, uint16_t* const DescriptorSize)
-                                               ATTR_WARN_UNUSED_RESULT ATTR_WEAK ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);
+               uint16_t USB_GetOSFeatureDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index a6c529e..e8631be 100644 (file)
@@ -44,7 +44,7 @@ SideShow_Application_t* SideShow_GetFreeApplication(void)
        return NULL;
 }
 
-SideShow_Application_t* SideShow_GetApplicationFromGUID(GUID_t* GUID)
+SideShow_Application_t* SideShow_GetApplicationFromGUID(GUID_t* const GUID)
 {
        for (uint8_t App = 0; App < ARRAY_ELEMENTS(InstalledApplications); App++)
        {
index ed885d4..9624c7c 100644 (file)
@@ -57,6 +57,6 @@
                
        /* Function Prototypes: */
                SideShow_Application_t* SideShow_GetFreeApplication(void);
-               SideShow_Application_t* SideShow_GetApplicationFromGUID(GUID_t* GUID);
+               SideShow_Application_t* SideShow_GetApplicationFromGUID(GUID_t* const GUID);
                
 #endif
index 5bce088..827deb0 100644 (file)
@@ -280,7 +280,8 @@ static void SideShow_GetCapabilities(SideShow_PacketHeader_t* const PacketHeader
        return;
 }
 
-static void SideShow_GetString(SideShow_PacketHeader_t* const PacketHeader, void* const UnicodeStruct)
+static void SideShow_GetString(SideShow_PacketHeader_t* const PacketHeader,
+                               void* const UnicodeStruct)
 {
        Endpoint_ClearOUT();
 
index 6d4ad4c..1395cd3 100644 (file)
                        static void SideShow_GetCurrentUser(SideShow_PacketHeader_t* const PacketHeader);
                        static void SideShow_SetCurrentUser(SideShow_PacketHeader_t* const PacketHeader);
                        static void SideShow_GetCapabilities(SideShow_PacketHeader_t* const PacketHeader);
-                       static void SideShow_GetString(SideShow_PacketHeader_t* const PacketHeader, void* const UnicodeStruct);
+                       static void SideShow_GetString(SideShow_PacketHeader_t* const PacketHeader,
+                                                      void* const UnicodeStruct);
                        static void SideShow_GetApplicationOrder(SideShow_PacketHeader_t* const PacketHeader);
                        static void SideShow_GetSupportedEndpoints(SideShow_PacketHeader_t* const PacketHeader);
                        static void SideShow_AddApplication(SideShow_PacketHeader_t* const PacketHeader);
index 29f768e..02b681c 100644 (file)
@@ -30,7 +30,8 @@
 
 #include "SideshowCommon.h"
 
-uint16_t SideShow_Read_Unicode_String(void* const UnicodeString, const uint16_t MaxBytes)
+uint16_t SideShow_Read_Unicode_String(void* const UnicodeString,
+                                      const uint16_t MaxBytes)
 {
        Unicode_String_t* const UnicodeStruct = (Unicode_String_t*)UnicodeString;
        uint32_t                UnicodeCharsToRead;
index 7c632b3..b801ecf 100644 (file)
@@ -96,7 +96,8 @@
                } SideShow_PacketHeader_t;
 
        /* Function Prototypes: */
-               uint16_t SideShow_Read_Unicode_String(void* UnicodeString, const uint16_t MaxBytes);
+               uint16_t SideShow_Read_Unicode_String(void* UnicodeString,
+                                                     const uint16_t MaxBytes);
                void     SideShow_Write_Unicode_String(void* UnicodeString);
                void     SideShow_Discard_Byte_Stream(void);
 
index 0d1dd80..5bfae1b 100644 (file)
@@ -31,7 +31,8 @@
 #define  INCLUDE_FROM_SIDESHOWCONTENT_C
 #include "SideshowContent.h"
 
-bool SideShow_AddSimpleContent(SideShow_PacketHeader_t* const PacketHeader, SideShow_Application_t* const Application)
+bool SideShow_AddSimpleContent(SideShow_PacketHeader_t* const PacketHeader,
+                               SideShow_Application_t* const Application)
 {
        uint32_t ContentSize;
        uint32_t ContentID;
@@ -69,7 +70,8 @@ bool SideShow_AddSimpleContent(SideShow_PacketHeader_t* const PacketHeader, Side
        return true;
 }
 
-static void SideShow_ProcessXMLContent(void* ContentData, uint32_t ContentSize)
+static void SideShow_ProcessXMLContent(void* ContentData,
+                                       uint32_t ContentSize)
 {
        printf(" XML");
        Endpoint_Discard_Stream(ContentSize);
index 97a6bee..6e3031c 100644 (file)
                #define XML_END_TAG           "</body>"
        
        /* Function Prototypes: */
-               bool SideShow_AddSimpleContent(SideShow_PacketHeader_t* const PacketHeader, SideShow_Application_t* const Application);
+               bool SideShow_AddSimpleContent(SideShow_PacketHeader_t* const PacketHeader,
+                                              SideShow_Application_t* const Application);
 
                #if defined(INCLUDE_FROM_SIDESHOWCONTENT_C)
-                       static void SideShow_ProcessXMLContent(void* ContentData, uint32_t ContentSize);
+                       static void SideShow_ProcessXMLContent(void* ContentData,
+                                                              uint32_t ContentSize);
                #endif
                
 #endif
\ No newline at end of file
index 3e9778e..2972e0c 100644 (file)
@@ -122,13 +122,11 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_VENDOR | REQREC_DEVICE))
                        {
                                void*    DescriptorPointer;
-                               uint16_t DescriptorSize;
+                               uint16_t DescriptorSize = USB_GetOSFeatureDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex,
+                                                                                    &DescriptorPointer, &DescriptorSize);
 
-                               if (!(USB_GetOSFeatureDescriptor(USB_ControlRequest.wValue, USB_ControlRequest.wIndex,
-                                                                &DescriptorPointer, &DescriptorSize)))
-                               {
-                                       return;
-                               }
+                               if (DescriptorSize == NO_DESCRIPTOR)
+                                 return;
                                
                                Endpoint_ClearSETUP();
                                
index 414c766..cfe1fd0 100644 (file)
@@ -272,7 +272,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 443cd1a..91c1d56 100644 (file)
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index bcde7f9..414bae8 100644 (file)
@@ -272,7 +272,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 87c7594..ea9b9f0 100644 (file)
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index a7d64a4..a134813 100644 (file)
@@ -338,7 +338,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index f69c8c6..61941b1 100644 (file)
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 12ff1f0..0d83fe1 100644 (file)
@@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 0babc22..8e9e37b 100644 (file)
@@ -94,7 +94,8 @@
                #define DTYPE_Report              0x22
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index a1e35fe..45e771e 100644 (file)
@@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index a3144c4..c133f0b 100644 (file)
@@ -87,7 +87,8 @@
                #define DTYPE_Report              0x22
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 6ced1ce..561914a 100644 (file)
@@ -141,7 +141,7 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
  *
  *  \return Boolean true if the new report differs from the last report, false otherwise
  */
-bool GetNextReport(USB_JoystickReport_Data_t* ReportData)
+bool GetNextReport(USB_JoystickReport_Data_t* const ReportData)
 {
        static uint8_t PrevJoyStatus    = 0;
        static uint8_t PrevButtonStatus = 0;
index 3d876be..607f56e 100644 (file)
@@ -87,6 +87,6 @@
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_UnhandledControlRequest(void);
 
-               bool GetNextReport(USB_JoystickReport_Data_t* ReportData);
+               bool GetNextReport(USB_JoystickReport_Data_t* const ReportData);
 
 #endif
index 598616a..6a2dfb5 100644 (file)
@@ -216,7 +216,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index d4d7a98..d4b9ebf 100644 (file)
@@ -92,7 +92,8 @@
                #define DTYPE_Report              0x22
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index c581626..71b5861 100644 (file)
@@ -257,7 +257,7 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \param[out] ReportData  Pointer to a HID report data structure to be filled
  */
-void CreateKeyboardReport(USB_KeyboardReport_Data_t* ReportData)
+void CreateKeyboardReport(USB_KeyboardReport_Data_t* const ReportData)
 {
        uint8_t JoyStatus_LCL     = Joystick_GetStatus();
        uint8_t ButtonStatus_LCL  = Buttons_GetStatus();
@@ -291,7 +291,7 @@ void CreateKeyboardReport(USB_KeyboardReport_Data_t* ReportData)
  *
  *  \param[in] LEDReport  LED status report from the host
  */
-void ProcessLEDReport(uint8_t LEDReport)
+void ProcessLEDReport(const uint8_t LEDReport)
 {
        uint8_t LEDMask = LEDS_LED2;
        
index a3c3bd4..e5904b8 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               void CreateKeyboardReport(USB_KeyboardReport_Data_t* ReportData);
-               void ProcessLEDReport(uint8_t LEDReport);
+               void CreateKeyboardReport(USB_KeyboardReport_Data_t* const ReportData);
+               void ProcessLEDReport(const uint8_t LEDReport);
                void SendNextReport(void);
                void ReceiveNextReport(void);
 
index e09e3c8..a5505ea 100644 (file)
@@ -286,7 +286,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index f23ef36..f76d5c9 100644 (file)
@@ -98,7 +98,8 @@
                #define DTYPE_Report              0x22
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index cc1f2ef..a6d73a3 100644 (file)
@@ -283,7 +283,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 7068610..afb74c6 100644 (file)
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index d7d41c5..b1744e6 100644 (file)
@@ -174,7 +174,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 6d468f6..ce1c03c 100644 (file)
@@ -65,7 +65,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index aedfcc7..07926cc 100644 (file)
@@ -46,7 +46,8 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
-void DataflashManager_WriteBlocks(const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_WriteBlocks(const uint32_t BlockAddress,
+                                  uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -179,7 +180,8 @@ void DataflashManager_WriteBlocks(const uint32_t BlockAddress, uint16_t TotalBlo
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
-void DataflashManager_ReadBlocks(const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_ReadBlocks(const uint32_t BlockAddress,
+                                 uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -287,7 +289,9 @@ void DataflashManager_ReadBlocks(const uint32_t BlockAddress, uint16_t TotalBloc
  *  \param[in] TotalBlocks   Number of blocks of data to write
  *  \param[in] BufferPtr     Pointer to the data source RAM buffer
  */
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                      uint16_t TotalBlocks,
+                                      uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -386,7 +390,9 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t Tota
  *  \param[in] TotalBlocks   Number of blocks of data to read
  *  \param[out] BufferPtr    Pointer to the data destination RAM buffer
  */
-void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                     uint16_t TotalBlocks,
+                                     uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index 3306666..7a62ace 100644 (file)
                #define LUN_MEDIA_BLOCKS                    (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)   
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(const uint32_t BlockAddress, uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(const uint32_t BlockAddress, uint16_t TotalBlocks);
-               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_WriteBlocks(const uint32_t BlockAddress,
+                                                 uint16_t TotalBlocks);
+               void DataflashManager_ReadBlocks(const uint32_t BlockAddress,
+                                                uint16_t TotalBlocks);
+               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                                     uint16_t TotalBlocks,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
-               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                                    uint16_t TotalBlocks,
                                                     uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                void DataflashManager_ResetDataflashProtections(void);
                bool DataflashManager_CheckDataflashOperation(void);
index f7fc2f7..46533ee 100644 (file)
@@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 21c394f..eb72468 100644 (file)
@@ -87,7 +87,8 @@
                #define DTYPE_Report              0x22
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 7e38e7a..97aa55f 100644 (file)
@@ -226,7 +226,7 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \param[out] ReportData  Pointer to a HID report data structure to be filled
  */
-void CreateMouseReport(USB_MouseReport_Data_t* ReportData)
+void CreateMouseReport(USB_MouseReport_Data_t* const ReportData)
 {
        uint8_t JoyStatus_LCL    = Joystick_GetStatus();
        uint8_t ButtonStatus_LCL = Buttons_GetStatus();
index e818f80..56766a6 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               void CreateMouseReport(USB_MouseReport_Data_t* ReportData);
+               void CreateMouseReport(USB_MouseReport_Data_t* const ReportData);
 
 #endif
index c823d44..d7ad8f2 100644 (file)
@@ -212,7 +212,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 43a83e8..144fc90 100644 (file)
@@ -91,7 +91,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 6eb74fa..853d505 100644 (file)
@@ -46,7 +46,8 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t ARP_ProcessARPPacket(void* InDataStart, void* OutDataStart)
+int16_t ARP_ProcessARPPacket(void* InDataStart,
+                             void* OutDataStart)
 {
        DecodeARPHeader(InDataStart);
 
index 6ae9b7b..8de76f3 100644 (file)
@@ -69,6 +69,7 @@
                } ARP_Header_t;
                
        /* Function Prototypes: */
-               int16_t ARP_ProcessARPPacket(void* InDataStart, void* OutDataStart);
+               int16_t ARP_ProcessARPPacket(void* InDataStart,
+                                            void* OutDataStart);
 
 #endif
index eeed884..41265aa 100644 (file)
@@ -46,7 +46,9 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, void* DHCPHeaderOutStart)
+int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
+                               void* DHCPHeaderInStart,
+                               void* DHCPHeaderOutStart)
 {
        IP_Header_t*   IPHeaderIN    = (IP_Header_t*)IPHeaderInStart;
        DHCP_Header_t* DHCPHeaderIN  = (DHCP_Header_t*)DHCPHeaderInStart;
index 2c8c4d8..3bfdb29 100644 (file)
                } DHCP_Header_t;
 
        /* Function Prototypes: */
-               int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, void* DHCPHeaderOutStart);
+               int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
+                                              void* DHCPHeaderInStart,
+                                              void* DHCPHeaderOutStart);
 
 #endif
index 044b069..0b95633 100644 (file)
@@ -120,7 +120,8 @@ void Ethernet_ProcessPacket(void)
  *
  *  \return A 16-bit Ethernet checksum value
  */
-uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes)
+uint16_t Ethernet_Checksum16(void* Data,
+                             uint16_t Bytes)
 {
        uint16_t* Words    = (uint16_t*)Data;
        uint32_t  Checksum = 0;
index 683b187..49c6b1c 100644 (file)
                
        /* Function Prototypes: */
                void     Ethernet_ProcessPacket(void);
-               uint16_t Ethernet_Checksum16(void* Data, uint16_t Bytes);
+               uint16_t Ethernet_Checksum16(void* Data,
+                                            uint16_t Bytes);
                
 #endif
index a43ffca..7e4be9c 100644 (file)
@@ -45,7 +45,8 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t ICMP_ProcessICMPPacket(void* InDataStart, void* OutDataStart)
+int16_t ICMP_ProcessICMPPacket(void* InDataStart,
+                               void* OutDataStart)
 {
        ICMP_Header_t* ICMPHeaderIN  = (ICMP_Header_t*)InDataStart;
        ICMP_Header_t* ICMPHeaderOUT = (ICMP_Header_t*)OutDataStart;
index dfffae2..dcea1ad 100644 (file)
@@ -75,6 +75,7 @@
                } ICMP_Header_t;
                
        /* Function Prototypes: */
-               int16_t ICMP_ProcessICMPPacket(void* InDataStart, void* OutDataStart);
+               int16_t ICMP_ProcessICMPPacket(void* InDataStart,
+                                              void* OutDataStart);
 
 #endif
index 078f5b5..85ccf42 100644 (file)
@@ -46,7 +46,8 @@
  *           response was generated, NO_PROCESS if the packet processing was deferred until the
  *           next Ethernet packet handler iteration
  */
-int16_t IP_ProcessIPPacket(void* InDataStart, void* OutDataStart)
+int16_t IP_ProcessIPPacket(void* InDataStart,
+                           void* OutDataStart)
 {
        DecodeIPHeader(InDataStart);
 
index b0a06b8..8f45113 100644 (file)
@@ -90,6 +90,7 @@
                } IP_Header_t;
                
        /* Function Prototypes: */
-               int16_t IP_ProcessIPPacket(void* InDataStart, void* OutDataStart);
+               int16_t IP_ProcessIPPacket(void* InDataStart,
+                                          void* OutDataStart);
 
 #endif
index 80b8bc8..3875f88 100644 (file)
@@ -239,7 +239,7 @@ void ProcessRNDISControlMessage(void)
  *
  *  \return Boolean true if the query was handled, false otherwise
  */
-static bool ProcessNDISQuery(uint32_t OId, void* QueryData, uint16_t QuerySize,
+static bool ProcessNDISQuery(const uint32_t OId, void* QueryData, uint16_t QuerySize,
                              void* ResponseData, uint16_t* ResponseSize)
 {
        /* Handler for REMOTE_NDIS_QUERY_MSG messages */
index cabea97..5168dc8 100644 (file)
                void ProcessRNDISControlMessage(void);
 
                #if defined(INCLUDE_FROM_RNDIS_C)
-                       static bool ProcessNDISQuery(uint32_t OId, void* QueryData, uint16_t QuerySize,
-                                                                                void* ResponseData, uint16_t* ResponseSize);
-                       static bool ProcessNDISSet(uint32_t OId, void* SetData, uint16_t SetSize);      
+                       static bool ProcessNDISQuery(const uint32_t OId,
+                                                    void* QueryData,
+                                                    uint16_t QuerySize,
+                                                                                void* ResponseData,
+                                                    uint16_t* ResponseSize);
+                       static bool ProcessNDISSet(const uint32_t OId,
+                                                  void* SetData,
+                                                  uint16_t SetSize);   
                #endif
                
 #endif
index 7603149..f75b828 100644 (file)
@@ -175,7 +175,9 @@ void TCP_Init(void)
  *
  *  \return Boolean true if the port state was set, false otherwise (no more space in the port state table)
  */
-bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
+bool TCP_SetPortState(const uint16_t Port,
+                      const uint8_t State,
+                      void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*))
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -222,7 +224,7 @@ bool TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_Connecti
  *
  *  \return A value from the TCP_PortStates_t enum
  */
-uint8_t TCP_GetPortState(uint16_t Port)
+uint8_t TCP_GetPortState(const uint16_t Port)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -247,7 +249,10 @@ uint8_t TCP_GetPortState(uint16_t Port)
  *
  *  \return Boolean true if the connection was updated or created, false otherwise (no more space in the connection state table)
  */
-bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State)
+bool TCP_SetConnectionState(const uint16_t Port,
+                            const IP_Address_t RemoteAddress,
+                            const uint16_t RemotePort,
+                            const uint8_t State)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -287,7 +292,9 @@ bool TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t
  *
  *  \return A value from the TCP_ConnectionStates_t enum
  */
-uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
+uint8_t TCP_GetConnectionState(const uint16_t Port,
+                               const IP_Address_t RemoteAddress,
+                               const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -314,7 +321,9 @@ uint8_t TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16
  *
  *  \return ConnectionInfo structure of the connection if found, NULL otherwise
  */
-TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort)
+TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
+                                            const IP_Address_t RemoteAddress,
+                                            const uint16_t RemotePort)
 {
        /* Note, Port number should be specified in BIG endian to simplify network code */
 
@@ -343,7 +352,9 @@ TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAd
  *           response was generated, NO_PROCESS if the packet processing was deferred until the
  *           next Ethernet packet handler iteration
  */
-int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void* TCPHeaderOutStart)
+int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart,
+                             void* TCPHeaderInStart,
+                             void* TCPHeaderOutStart)
 {
        IP_Header_t*  IPHeaderIN   = (IP_Header_t*)IPHeaderInStart;
        TCP_Header_t* TCPHeaderIN  = (TCP_Header_t*)TCPHeaderInStart;
@@ -590,8 +601,10 @@ int16_t TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void
  *
  *  \return A 16-bit TCP checksum value
  */
-static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddress,
-                               IP_Address_t DestinationAddress, uint16_t TCPOutSize)
+static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
+                               const IP_Address_t SourceAddress,
+                               const IP_Address_t DestinationAddress,
+                               uint16_t TCPOutSize)
 {
        uint32_t Checksum = 0;
        
index 1e9b99b..984793e 100644 (file)
        /* Function Prototypes: */
                void                  TCP_Init(void);
                void                  TCP_Task(void);
-               bool                  TCP_SetPortState(uint16_t Port, uint8_t State, void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
-               uint8_t               TCP_GetPortState(uint16_t Port);
-               bool                  TCP_SetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort, uint8_t State);
-               uint8_t               TCP_GetConnectionState(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort);
-               TCP_ConnectionInfo_t* TCP_GetConnectionInfo(uint16_t Port, IP_Address_t RemoteAddress, uint16_t RemotePort);
-               int16_t               TCP_ProcessTCPPacket(void* IPHeaderInStart, void* TCPHeaderInStart, void* TCPHeaderOutStart);
+               bool                  TCP_SetPortState(const uint16_t Port,
+                                                      const uint8_t State,
+                                                      void (*Handler)(TCP_ConnectionState_t*, TCP_ConnectionBuffer_t*));
+               uint8_t               TCP_GetPortState(const uint16_t Port);
+               bool                  TCP_SetConnectionState(const uint16_t Port,
+                                                            const IP_Address_t RemoteAddress,
+                                                            const uint16_t RemotePort,
+                                                            const uint8_t State);
+               uint8_t               TCP_GetConnectionState(const uint16_t Port,
+                                                            const IP_Address_t RemoteAddress,
+                                                            const uint16_t RemotePort);
+               TCP_ConnectionInfo_t* TCP_GetConnectionInfo(const uint16_t Port,
+                                                           const IP_Address_t RemoteAddress,
+                                                           const uint16_t RemotePort);
+               int16_t               TCP_ProcessTCPPacket(void* IPHeaderInStart,
+                                                          void* TCPHeaderInStart,
+                                                          void* TCPHeaderOutStart);
 
                #if defined(INCLUDE_FROM_TCP_C)
-                       static uint16_t TCP_Checksum16(void* TCPHeaderOutStart, IP_Address_t SourceAddress,
-                                                                                  IP_Address_t DestinationAddress, uint16_t TCPOutSize);
+                       static uint16_t TCP_Checksum16(void* TCPHeaderOutStart,
+                                                      const IP_Address_t SourceAddress,
+                                                                                  const IP_Address_t DestinationAddress,
+                                                      uint16_t TCPOutSize);
                #endif
 
 #endif
index c9c523f..15b0656 100644 (file)
@@ -46,7 +46,9 @@
  *
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
  */
-int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void* UDPHeaderOutStart)
+int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart,
+                             void* UDPHeaderInStart,
+                             void* UDPHeaderOutStart)
 {
        UDP_Header_t* UDPHeaderIN  = (UDP_Header_t*)UDPHeaderInStart;
        UDP_Header_t* UDPHeaderOUT = (UDP_Header_t*)UDPHeaderOutStart;
index 6cbc0b8..42d7925 100644 (file)
@@ -65,6 +65,8 @@
                } UDP_Header_t;
                
        /* Function Prototypes: */
-               int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void* UDPHeaderOutStart);
+               int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart,
+                                            void* UDPHeaderInStart,
+                                            void* UDPHeaderOutStart);
 
 #endif
index 51a9fad..807c1a2 100644 (file)
@@ -90,7 +90,8 @@ void Webserver_Init(void)
  *
  *  \return Boolean true if the command matches the request, false otherwise
  */
-static bool IsHTTPCommand(uint8_t* RequestHeader, char* Command)
+static bool IsHTTPCommand(uint8_t* RequestHeader,
+                          char* Command)
 {
        /* Returns true if the non null terminated string in RequestHeader matches the null terminated string Command */
        return (strncmp((char*)RequestHeader, Command, strlen(Command)) == 0);
@@ -102,7 +103,8 @@ static bool IsHTTPCommand(uint8_t* RequestHeader, char* Command)
  *  \param[in] ConnectionState  Pointer to a TCP Connection State structure giving connection information
  *  \param[in,out] Buffer       Pointer to the application's send/receive packet buffer
  */
-void Webserver_ApplicationCallback(TCP_ConnectionState_t* ConnectionState, TCP_ConnectionBuffer_t* Buffer)
+void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState,
+                                   TCP_ConnectionBuffer_t* const Buffer)
 {
        char*          BufferDataStr = (char*)Buffer->Data;
        static uint8_t PageBlock     = 0;
index 3ba4186..87fe1c9 100644 (file)
@@ -50,6 +50,7 @@
        
        /* Function Prototypes: */
                void Webserver_Init(void);
-               void Webserver_ApplicationCallback(TCP_ConnectionState_t* ConnectionState, TCP_ConnectionBuffer_t* Buffer);
+               void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState,
+                                                  TCP_ConnectionBuffer_t* const Buffer);
 
 #endif
index a9c044d..1e87766 100644 (file)
@@ -224,7 +224,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 3ca71f5..2b06da0 100644 (file)
@@ -91,7 +91,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 703051e..66db661 100644 (file)
@@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 2c77d78..59910de 100644 (file)
@@ -63,7 +63,8 @@
                #define MOUSE_EPSIZE              8
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 6ec88ae..e2a2128 100644 (file)
@@ -104,8 +104,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData;
                
@@ -140,8 +143,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports
 }
index f96d0ae..90db85f 100644 (file)
                extern USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface;
                
        /* Function Prototypes: */
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
index bb9286b..dfd67ae 100644 (file)
@@ -93,7 +93,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"
index 63f64ff..fe5214e 100644 (file)
@@ -48,7 +48,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
index 8f0b405..f1b4cac 100644 (file)
@@ -231,7 +231,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"
@@ -250,7 +251,7 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8
  *
  *  \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;
 
index da667e6..1cebb92 100644 (file)
                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);
                
-               bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem);
+               bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem);
                
 #endif
index 8ae7d83..8bdf2b6 100644 (file)
@@ -211,7 +211,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"
index 948ff6a..fd6b838 100644 (file)
@@ -70,7 +70,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
index dedf12f..9d28e71 100644 (file)
@@ -237,7 +237,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"
@@ -256,7 +257,7 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8
  *
  *  \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
index 8a0aeff..5ecfdf4 100644 (file)
                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);
                
-               bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem);
+               bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem);
                
 #endif
index 108c807..faaebdd 100644 (file)
@@ -252,7 +252,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"
index f33ecb7..84e7680 100644 (file)
@@ -73,7 +73,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
index 697da34..40cf2a4 100644 (file)
@@ -289,7 +289,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"
index 0cd9897..b994712 100644 (file)
@@ -74,7 +74,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
index 6edceb0..a03381c 100644 (file)
@@ -207,7 +207,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"
index ccbaa82..7664580 100644 (file)
@@ -70,7 +70,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
index ef7835e..111bed4 100644 (file)
@@ -240,7 +240,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"
@@ -259,7 +260,7 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8
  *
  *  \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;
 
index 342dff7..3b26cea 100644 (file)
                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);
                
-               bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem);
+               bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem);
                
 #endif
index 9d5ca08..e0d9726 100644 (file)
@@ -211,7 +211,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"
index a488057..a2b90a6 100644 (file)
@@ -73,7 +73,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
index 589faeb..b793db9 100644 (file)
@@ -236,7 +236,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"
index 06f5ec2..f3c04f5 100644 (file)
@@ -74,7 +74,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
index 8f91d81..152639f 100644 (file)
@@ -205,7 +205,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"
index 5c163ef..1b77659 100644 (file)
@@ -70,7 +70,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
index e6403ec..543e098 100644 (file)
@@ -182,7 +182,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"
index bd5cd6a..ed4ffce 100644 (file)
@@ -70,7 +70,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
index 55c3997..8301e85 100644 (file)
@@ -123,7 +123,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"
index e0de59a..0814845 100644 (file)
@@ -79,7 +79,8 @@
                void EVENT_USB_Host_DeviceUnattached(void);
                void EVENT_USB_Host_DeviceEnumerationComplete(void);
                void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
-               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);
 
        /* Function Prototypes: */
                void SetupHardware(void);
index 68a02d4..939b2ae 100644 (file)
@@ -211,7 +211,8 @@ static void Bluetooth_ProcessIncomingACLPackets(void)
  *
  *  \return Pointer to the matching channel information structure in the channel table if found, NULL otherwise
  */
-Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue, const uint8_t SearchKey)
+Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue,
+                                              const uint8_t SearchKey)
 {
        for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
        {
@@ -253,7 +254,9 @@ Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue, const
  *
  * \return A value from the \ref BT_SendPacket_ErrorCodes_t enum
  */
-uint8_t Bluetooth_SendPacket(void* Data, const uint16_t DataLen, Bluetooth_Channel_t* const ACLChannel)
+uint8_t Bluetooth_SendPacket(void* Data,
+                             const uint16_t DataLen,
+                             Bluetooth_Channel_t* const ACLChannel)
 {
        BT_ACL_Header_t        ACLPacketHeader;
        BT_DataPacket_Header_t DataHeader;
index 0db17a2..7f6f8b7 100644 (file)
@@ -374,7 +374,9 @@ void Bluetooth_HCITask(void)
  *
  *  \return A value from the USB_Host_SendControlErrorCodes_t enum.
  */
-static uint8_t Bluetooth_SendHCICommand(const BT_HCICommand_Header_t* const HCICommandHeader, const void* Parameters, const uint16_t ParameterLength)
+static uint8_t Bluetooth_SendHCICommand(const BT_HCICommand_Header_t* const HCICommandHeader,
+                                        const void* Parameters,
+                                        const uint16_t ParameterLength)
 {
        /* Need to reserve the amount of bytes given in the header for the complete payload */
        uint8_t CommandBuffer[sizeof(BT_HCICommand_Header_t) + HCICommandHeader->ParameterLength];
index 5a556e1..9476446 100644 (file)
                void Bluetooth_HCITask(void);
                        
                #if defined(INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C)
-                       static uint8_t Bluetooth_SendHCICommand(const BT_HCICommand_Header_t* const HCICommandHeader, const void* Parameters,
+                       static uint8_t Bluetooth_SendHCICommand(const BT_HCICommand_Header_t* const HCICommandHeader,
+                                                               const void* Parameters,
                                                                const uint16_t ParameterLength);
                #endif
                
index f47bf1e..6f1ea67 100644 (file)
                void                 Bluetooth_ConnectionComplete(void);
                void                 Bluetooth_DisconnectionComplete(void);
                bool                 Bluetooth_ChannelConnectionRequest(const uint16_t PSM);
-               void                 Bluetooth_PacketReceived(void* Data, uint16_t DataLen, Bluetooth_Channel_t* const ACLChannel);
+               void                 Bluetooth_PacketReceived(void* Data, uint16_t DataLen,
+                                                             Bluetooth_Channel_t* const ACLChannel);
                void                 Bluetooth_ChannelOpened(Bluetooth_Channel_t* const ACLChannel);
 
-               Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue, const uint8_t SearchKey);
+               Bluetooth_Channel_t* Bluetooth_GetChannelData(const uint16_t SearchValue,
+                                                             const uint8_t SearchKey);
                Bluetooth_Channel_t* Bluetooth_OpenChannel(const uint16_t PSM);
                void                 Bluetooth_CloseChannel(Bluetooth_Channel_t* const ACLChannel);
-               uint8_t              Bluetooth_SendPacket(void* Data, uint16_t DataLen, Bluetooth_Channel_t* const ACLChannel);
+               uint8_t              Bluetooth_SendPacket(void* Data,
+                                                         uint16_t DataLen,
+                                                         Bluetooth_Channel_t* const ACLChannel);
 
        /* External Variables: */
                extern Bluetooth_Device_t      Bluetooth_DeviceConfiguration;
index d091676..f74002a 100644 (file)
@@ -118,7 +118,8 @@ void RFCOMM_ServiceChannels(Bluetooth_Channel_t* const ACLChannel)
  *  \param[in] Data        Incoming packet data containing the RFCOMM packet
  *  \param[in] ACLChannel  ACL channel the request was issued to by the remote device
  */
-void RFCOMM_ProcessPacket(void* Data, Bluetooth_Channel_t* const ACLChannel)
+void RFCOMM_ProcessPacket(void* Data,
+                          Bluetooth_Channel_t* const ACLChannel)
 {
        const RFCOMM_Header_t* FrameHeader  = (const RFCOMM_Header_t*)Data;
        const uint8_t*         FrameData    = (const uint8_t*)Data + sizeof(RFCOMM_Header_t);
@@ -154,7 +155,8 @@ void RFCOMM_ProcessPacket(void* Data, Bluetooth_Channel_t* const ACLChannel)
  *  \param[in] RFCOMMChannel  RFCOMM logical channel whose local terminal signals have changed
  *  \param[in] ACLChannel     ACL channel which has been opened to carry RFCOMM traffic between devices
  */
-void RFCOMM_SendChannelSignals(const RFCOMM_Channel_t* const RFCOMMChannel, Bluetooth_Channel_t* const ACLChannel)
+void RFCOMM_SendChannelSignals(const RFCOMM_Channel_t* const RFCOMMChannel,
+                               Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, ">> MSC Command");
        BT_RFCOMM_DEBUG(2, "-- DLCI 0x%02X", RFCOMMChannel->DLCI);
@@ -184,7 +186,9 @@ void RFCOMM_SendChannelSignals(const RFCOMM_Channel_t* const RFCOMMChannel, Blue
  *  \param[in] RFCOMMChannel  RFCOMM logical channel which is to be transmitted to
  *  \param[in] ACLChannel     ACL channel which has been opened to carry RFCOMM traffic between devices
  */
-void RFCOMM_SendData(const uint16_t DataLen, const uint8_t* Data, const RFCOMM_Channel_t* const RFCOMMChannel,
+void RFCOMM_SendData(const uint16_t DataLen,
+                     const uint8_t* Data,
+                     const RFCOMM_Channel_t* const RFCOMMChannel,
                      Bluetooth_Channel_t* const ACLChannel)
 {
        if (RFCOMMChannel->State != RFCOMM_Channel_Open)
@@ -263,8 +267,12 @@ uint16_t RFCOMM_GetVariableFieldValue(const uint8_t** BufferPos)
        return (((uint16_t)SecondOctet << 7) | FirstOctet >> 1);
 }
 
-void RFCOMM_SendFrame(const uint8_t DLCI, const bool CommandResponse, const uint8_t Control, const uint16_t DataLen,
-                      const void* Data, Bluetooth_Channel_t* const ACLChannel)
+void RFCOMM_SendFrame(const uint8_t DLCI,
+                      const bool CommandResponse,
+                      const uint8_t Control,
+                      const uint16_t DataLen,
+                      const void* Data,
+                      Bluetooth_Channel_t* const ACLChannel)
 {
        struct
        {
@@ -304,7 +312,8 @@ void RFCOMM_SendFrame(const uint8_t DLCI, const bool CommandResponse, const uint
        Bluetooth_SendPacket(&ResponsePacket, sizeof(ResponsePacket), ACLChannel);
 }
 
-static uint8_t RFCOMM_GetFCSValue(const void* FrameStart, uint8_t Length)
+static uint8_t RFCOMM_GetFCSValue(const void* FrameStart,
+                                  uint8_t Length)
 {
        uint8_t FCS = 0xFF;
        
@@ -315,13 +324,15 @@ static uint8_t RFCOMM_GetFCSValue(const void* FrameStart, uint8_t Length)
        return ~FCS;
 }
 
-static void RFCOMM_ProcessDM(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessDM(const RFCOMM_Address_t* const FrameAddress,
+                             Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< DM Received");
        BT_RFCOMM_DEBUG(2, "-- DLCI 0x%02X", FrameAddress->DLCI);
 }
 
-static void RFCOMM_ProcessDISC(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessDISC(const RFCOMM_Address_t* const FrameAddress,
+                               Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< DISC Received");
        BT_RFCOMM_DEBUG(2, "-- DLCI 0x%02X", FrameAddress->DLCI);
@@ -336,7 +347,8 @@ static void RFCOMM_ProcessDISC(const RFCOMM_Address_t* const FrameAddress, Bluet
        RFCOMM_SendFrame(FrameAddress->DLCI, true, (RFCOMM_Frame_UA | FRAME_POLL_FINAL), 0, NULL, ACLChannel);
 }
 
-static void RFCOMM_ProcessSABM(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessSABM(const RFCOMM_Address_t* const FrameAddress,
+                               Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< SABM Received");
        BT_RFCOMM_DEBUG(2, "-- DLCI 0x%02X", FrameAddress->DLCI);
@@ -375,14 +387,17 @@ static void RFCOMM_ProcessSABM(const RFCOMM_Address_t* const FrameAddress, Bluet
        }
 }
 
-static void RFCOMM_ProcessUA(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessUA(const RFCOMM_Address_t* const FrameAddress,
+                             Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< UA Received");
        BT_RFCOMM_DEBUG(2, "-- DLCI 0x%02X", FrameAddress->DLCI);
 }
 
-static void RFCOMM_ProcessUIH(const RFCOMM_Address_t* const FrameAddress, const uint16_t FrameLength, 
-                              const uint8_t* FrameData, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessUIH(const RFCOMM_Address_t* const FrameAddress,
+                              const uint16_t FrameLength, 
+                              const uint8_t* FrameData,
+                              Bluetooth_Channel_t* const ACLChannel)
 {
        if (FrameAddress->DLCI == RFCOMM_CONTROL_DLCI)
        {
index 5d22e38..7b74f4f 100644 (file)
        /* Function Prototypes: */
                void              RFCOMM_Initialize(void);
                void              RFCOMM_ServiceChannels(Bluetooth_Channel_t* const ACLChannel);
-               void              RFCOMM_ProcessPacket(void* Data, Bluetooth_Channel_t* const ACLChannel);
+               void              RFCOMM_ProcessPacket(void* Data,
+                                                      Bluetooth_Channel_t* const ACLChannel);
                
                void              RFCOMM_SendChannelSignals(const RFCOMM_Channel_t* const RFCOMMChannel,
                                                            Bluetooth_Channel_t* const ACLChannel);
-               void              RFCOMM_SendData(const uint16_t DataLen, const uint8_t* Data,
+               void              RFCOMM_SendData(const uint16_t DataLen,
+                                                 const uint8_t* Data,
                                                  const RFCOMM_Channel_t* const RFCOMMChannel,
                                                  Bluetooth_Channel_t* const ACLChannel);
 
                void              RFCOMM_ChannelOpened(RFCOMM_Channel_t* const RFCOMMChannel);
-               void              RFCOMM_DataReceived(RFCOMM_Channel_t* const RFCOMMChannel, uint16_t DataLen, const uint8_t* Data);
+               void              RFCOMM_DataReceived(RFCOMM_Channel_t* const RFCOMMChannel,
+                                                     uint16_t DataLen,
+                                                     const uint8_t* Data);
                void              RFCOMM_ChannelSignalsReceived(RFCOMM_Channel_t* const RFCOMMChannel);
 
                RFCOMM_Channel_t* RFCOMM_GetFreeChannelEntry(const uint8_t DLCI);
                RFCOMM_Channel_t* RFCOMM_GetChannelData(const uint8_t DLCI);
                uint16_t          RFCOMM_GetVariableFieldValue(const uint8_t** BufferPos);
-               void              RFCOMM_SendFrame(const uint8_t DLCI, const bool CommandResponse, const uint8_t Control,
-                                                      const uint16_t DataLen, const void* Data, Bluetooth_Channel_t* const ACLChannel);
+               void              RFCOMM_SendFrame(const uint8_t DLCI,
+                                                  const bool CommandResponse,
+                                                  const uint8_t Control,
+                                                      const uint16_t DataLen,
+                                                  const void* Data,
+                                                  Bluetooth_Channel_t* const ACLChannel);
 
                #if defined(INCLUDE_FROM_RFCOMM_C)
-                       static uint8_t RFCOMM_GetFCSValue(const void* FrameStart, uint8_t Length);
+                       static uint8_t RFCOMM_GetFCSValue(const void* FrameStart,
+                                                         uint8_t Length);
 
-                       static void RFCOMM_ProcessDM(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessDISC(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessSABM(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessUA(const RFCOMM_Address_t* const FrameAddress, Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessUIH(const RFCOMM_Address_t* const FrameAddress, const uint16_t FrameLength, 
-                                          const uint8_t* FrameData, Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessDM(const RFCOMM_Address_t* const FrameAddress,
+                                                    Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessDISC(const RFCOMM_Address_t* const FrameAddress,
+                                                      Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessSABM(const RFCOMM_Address_t* const FrameAddress,
+                                                      Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessUA(const RFCOMM_Address_t* const FrameAddress,
+                                                    Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessUIH(const RFCOMM_Address_t* const FrameAddress,
+                                                     const uint16_t FrameLength, 
+                                          const uint8_t* FrameData,
+                                                     Bluetooth_Channel_t* const ACLChannel);
                #endif
                
 #endif
index 0f829ea..5bd8845 100644 (file)
@@ -38,7 +38,8 @@
 #define  INCLUDE_FROM_RFCOMM_CONTROL_C
 #include "RFCOMMControl.h"
 
-void RFCOMM_ProcessControlCommand(const uint8_t* Command, Bluetooth_Channel_t* const ACLChannel)
+void RFCOMM_ProcessControlCommand(const uint8_t* Command,
+                                  Bluetooth_Channel_t* const ACLChannel)
 {
        const RFCOMM_Command_t* CommandHeader  = (const RFCOMM_Command_t*)Command;
        const uint8_t*          CommandData    = (const uint8_t*)Command + sizeof(RFCOMM_Command_t);
@@ -73,8 +74,10 @@ void RFCOMM_ProcessControlCommand(const uint8_t* Command, Bluetooth_Channel_t* c
        }
 }
 
-static void RFCOMM_ProcessTestCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t CommandDataLen,
-                                      const uint8_t* CommandData, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessTestCommand(const RFCOMM_Command_t* const CommandHeader,
+                                      const uint8_t CommandDataLen,
+                                      const uint8_t* CommandData,
+                                      Bluetooth_Channel_t* const ACLChannel)
 {
        const uint8_t* Params = (const uint8_t*)CommandData;
 
@@ -98,20 +101,24 @@ static void RFCOMM_ProcessTestCommand(const RFCOMM_Command_t* const CommandHeade
        RFCOMM_SendFrame(RFCOMM_CONTROL_DLCI, false, RFCOMM_Frame_UIH, sizeof(TestResponse), &TestResponse, ACLChannel);
 }
 
-static void RFCOMM_ProcessFCECommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+static void RFCOMM_ProcessFCECommand(const RFCOMM_Command_t* const CommandHeader,
+                                     const uint8_t* CommandData,
                                                 Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< FCE Command");
 }
 
-static void RFCOMM_ProcessFCDCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+static void RFCOMM_ProcessFCDCommand(const RFCOMM_Command_t* const CommandHeader,
+                                     const uint8_t* CommandData,
                                                 Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< FCD Command");
 }
 
-static void RFCOMM_ProcessMSCCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t CommandDataLen,
-                                     const uint8_t* CommandData, Bluetooth_Channel_t* const ACLChannel)
+static void RFCOMM_ProcessMSCCommand(const RFCOMM_Command_t* const CommandHeader,
+                                     const uint8_t CommandDataLen,
+                                     const uint8_t* CommandData,
+                                     Bluetooth_Channel_t* const ACLChannel)
 {
        const RFCOMM_MSC_Parameters_t* Params = (const RFCOMM_MSC_Parameters_t*)CommandData;
 
@@ -168,19 +175,22 @@ static void RFCOMM_ProcessMSCCommand(const RFCOMM_Command_t* const CommandHeader
        }       
 }
 
-static void RFCOMM_ProcessRPNCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+static void RFCOMM_ProcessRPNCommand(const RFCOMM_Command_t* const CommandHeader,
+                                     const uint8_t* CommandData,
                                                 Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< RPN Command");
 }
 
-static void RFCOMM_ProcessRLSCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+static void RFCOMM_ProcessRLSCommand(const RFCOMM_Command_t* const CommandHeader,
+                                     const uint8_t* CommandData,
                                                 Bluetooth_Channel_t* const ACLChannel)
 {
        BT_RFCOMM_DEBUG(1, "<< RLS Command");
 }
 
-static void RFCOMM_ProcessDPNCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+static void RFCOMM_ProcessDPNCommand(const RFCOMM_Command_t* const CommandHeader,
+                                     const uint8_t* CommandData,
                                                 Bluetooth_Channel_t* const ACLChannel)
 {
        const RFCOMM_DPN_Parameters_t* Params = (const RFCOMM_DPN_Parameters_t*)CommandData;
index d47715f..b527bfa 100644 (file)
                } RFCOMM_MSC_Parameters_t;
 
        /* Function Prototypes: */
-               void RFCOMM_ProcessControlCommand(const uint8_t* Command, Bluetooth_Channel_t* const Channel);
+               void RFCOMM_ProcessControlCommand(const uint8_t* Command,
+                                                 Bluetooth_Channel_t* const Channel);
 
                #if defined(INCLUDE_FROM_RFCOMM_CONTROL_C)
-                       static void RFCOMM_ProcessTestCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t CommandDataLen, 
-                                                             const uint8_t* CommandData, Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessFCECommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+                       static void RFCOMM_ProcessTestCommand(const RFCOMM_Command_t* const CommandHeader,
+                                                             const uint8_t CommandDataLen, 
+                                                             const uint8_t* CommandData,
+                                                             Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessFCECommand(const RFCOMM_Command_t* const CommandHeader,
+                                                            const uint8_t* CommandData,
                                                             Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessFCDCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+                       static void RFCOMM_ProcessFCDCommand(const RFCOMM_Command_t* const CommandHeader,
+                                                            const uint8_t* CommandData,
                                                             Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessMSCCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t CommandDataLen,
-                                                            const uint8_t* CommandData, Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessRPNCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+                       static void RFCOMM_ProcessMSCCommand(const RFCOMM_Command_t* const CommandHeader,
+                                                            const uint8_t CommandDataLen,
+                                                            const uint8_t* CommandData,
                                                             Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessRLSCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+                       static void RFCOMM_ProcessRPNCommand(const RFCOMM_Command_t* const CommandHeader,
+                                                            const uint8_t* CommandData,
                                                             Bluetooth_Channel_t* const ACLChannel);
-                       static void RFCOMM_ProcessDPNCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
+                       static void RFCOMM_ProcessRLSCommand(const RFCOMM_Command_t* const CommandHeader,
+                                                            const uint8_t* CommandData,
+                                                            Bluetooth_Channel_t* const ACLChannel);
+                       static void RFCOMM_ProcessDPNCommand(const RFCOMM_Command_t* const CommandHeader,
+                                                            const uint8_t* CommandData,
                                                             Bluetooth_Channel_t* const ACLChannel);
                #endif
                
index eb501f7..e0522f9 100644 (file)
@@ -88,7 +88,8 @@ void SDP_ProcessPacket(void* Data, Bluetooth_Channel_t* const Channel)
  *  \param[in] SDPHeader  Pointer to the start of the issued SDP request
  *  \param[in] Channel    Pointer to the Bluetooth channel structure the request was issued to
  */
-static void SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel)
+static void SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader,
+                                     Bluetooth_Channel_t* const Channel)
 {
        const void* CurrentParameter = ((const void*)SDPHeader + sizeof(SDP_PDUHeader_t));
 
@@ -169,7 +170,8 @@ static void SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader, Blu
  *  \param[in] SDPHeader  Pointer to the start of the issued SDP request
  *  \param[in] Channel    Pointer to the Bluetooth channel structure the request was issued to
  */
-static void SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel)
+static void SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader,
+                                        Bluetooth_Channel_t* const Channel)
 {
        const void* CurrentParameter = ((const void*)SDPHeader + sizeof(SDP_PDUHeader_t));
 
@@ -259,7 +261,8 @@ static void SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader,
  *  \param[in] SDPHeader  Pointer to the start of the issued SDP request
  *  \param[in] Channel    Pointer to the Bluetooth channel structure the request was issued to
  */
-static void SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel)
+static void SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHeader,
+                                              Bluetooth_Channel_t* const Channel)
 {
        const void* CurrentParameter = ((const void*)SDPHeader + sizeof(SDP_PDUHeader_t));
        
@@ -348,8 +351,10 @@ static void SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHe
  *
  *  \return Number of bytes added to the output buffer
  */
-static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t* AttributeTable, uint16_t AttributeList[][2],
-                                                  const uint8_t TotalAttributes, void** const BufferPos)
+static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t* AttributeTable,
+                                                  uint16_t AttributeList[][2],
+                                                  const uint8_t TotalAttributes,
+                                                  void** const BufferPos)
 {
        uint16_t TotalResponseSize;
 
@@ -396,7 +401,9 @@ static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t*
  *
  *  \return Number of bytes added to the response buffer
  */
-static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID, const void* AttributeValue, void** ResponseBuffer)
+static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID,
+                                           const void* AttributeValue,
+                                           void** ResponseBuffer)
 {
        /* Retrieve the size of the attribute value from its container header */
        uint8_t  AttributeHeaderLength;
@@ -424,7 +431,8 @@ static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID, const voi
  *
  *  \return Pointer to the start of the Attribute's value if found within the table, NULL otherwise
  */
-static void* SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable, const uint16_t AttributeID)
+static void* SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable,
+                                   const uint16_t AttributeID)
 {
        void* CurrTableItemData;
        
@@ -449,7 +457,8 @@ static void* SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable
  *
  *  \return True if all the UUIDs given in the UUID list appear in the given attribute table, false otherwise
  */
-static bool SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs,
+static bool SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES],
+                                   const uint8_t TotalUUIDs,
                                               const ServiceAttributeTable_t* CurrAttributeTable)
 {
        const void* CurrAttribute;
@@ -481,8 +490,10 @@ static bool SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES], const ui
  *
  *  \return True if all the UUIDs given in the UUID list appear in the given attribute table, false otherwise
  */
-static void SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs,
-                               uint16_t* const UUIDMatchFlags, const void* CurrAttribute)
+static void SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES],
+                               const uint8_t TotalUUIDs,
+                               uint16_t* const UUIDMatchFlags,
+                               const void* CurrAttribute)
 {
        uint8_t CurrAttributeType = (pgm_read_byte(CurrAttribute) & ~0x07);
 
@@ -536,7 +547,8 @@ static void SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_
  *
  *  \return Total number of Attribute ranges stored in the Data Element Sequence
  */
-static uint8_t SDP_GetAttributeList(uint16_t AttributeList[][2], const void** const CurrentParameter)
+static uint8_t SDP_GetAttributeList(uint16_t AttributeList[][2],
+                                    const void** const CurrentParameter)
 {
        uint8_t ElementHeaderSize;
        uint8_t TotalAttributes = 0;
@@ -578,7 +590,8 @@ static uint8_t SDP_GetAttributeList(uint16_t AttributeList[][2], const void** co
  *
  *  \return Total number of UUIDs stored in the Data Element Sequence
  */
-static uint8_t SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], const void** const CurrentParameter)
+static uint8_t SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES],
+                               const void** const CurrentParameter)
 {
        uint8_t ElementHeaderSize;
        uint8_t TotalUUIDs = 0;
@@ -629,7 +642,8 @@ static uint8_t SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], const void**
  *
  *  \return Size in bytes of the entire attribute container, including the header
  */
-static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData, uint8_t* const HeaderSize)
+static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData,
+                                                   uint8_t* const HeaderSize)
 {
        /* Fetch the size of the Data Element structure from the header */
        uint8_t SizeIndex = (pgm_read_byte(AttributeData) & 0x07);
@@ -668,7 +682,8 @@ static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeDa
  *
  *  \return Size in bytes of the Data Element container's contents, minus the header
  */
-static uint32_t SDP_GetDataElementSize(const void** const DataElementHeader, uint8_t* const ElementHeaderSize)
+static uint32_t SDP_GetDataElementSize(const void** const DataElementHeader,
+                                       uint8_t* const ElementHeaderSize)
 {
        /* Fetch the size of the Data Element structure from the header, increment the current buffer pos */
        uint8_t  SizeIndex = (SDP_ReadData8(DataElementHeader) & 0x07); 
index 548f3d5..2df8c22 100644 (file)
                 *  \param[in, out] BufferPos  Current position in the buffer where the data is to be written to
                 *  \param[in]      Data       Data to write to the buffer
                 */
-               static inline void SDP_WriteData8(void** BufferPos, uint8_t Data)
+               static inline void SDP_WriteData8(void** BufferPos,
+                                                 const uint8_t Data)
                {
                        *((uint8_t*)*BufferPos) = Data;
                        *BufferPos += sizeof(uint8_t);
                 *  \param[in, out] BufferPos  Current position in the buffer where the data is to be written to
                 *  \param[in]      Data       Data to write to the buffer
                 */
-               static inline void SDP_WriteData16(void** BufferPos, uint16_t Data)
+               static inline void SDP_WriteData16(void** BufferPos,
+                                                  const uint16_t Data)
                {
                        *((uint16_t*)*BufferPos) = SwapEndian_16(Data);
                        *BufferPos += sizeof(uint16_t);
                 *  \param[in, out] BufferPos  Current position in the buffer where the data is to be written to
                 *  \param[in]      Data       Data to write to the buffer
                 */
-               static inline void SDP_WriteData32(void** BufferPos, uint32_t Data)
+               static inline void SDP_WriteData32(void** BufferPos,
+                                                  const uint32_t Data)
                {
                        *((uint32_t*)*BufferPos) = SwapEndian_32(Data);
                        *BufferPos += sizeof(uint32_t);
                }
                
        /* Function Prototypes: */
-               void SDP_ProcessPacket(void* Data, Bluetooth_Channel_t* const Channel);
+               void SDP_ProcessPacket(void* Data,
+                                      Bluetooth_Channel_t* const Channel);
 
                #if defined(INCLUDE_FROM_SERVICEDISCOVERYPROTOCOL_C)
-                       static void     SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel);
-                       static void     SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel);
-                       static void     SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel);
-
-                       static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t* AttributeTable, uint16_t AttributeList[][2],
-                                                                         const uint8_t TotalAttributes, void** const BufferPos);
-                       static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID, const void* AttributeValue, void** ResponseBuffer);
-                       static void*    SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable, const uint16_t AttributeID);
-
-                       static bool     SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs,
+                       static void     SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader,
+                                                                Bluetooth_Channel_t* const Channel);
+                       static void     SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader,
+                                                                   Bluetooth_Channel_t* const Channel);
+                       static void     SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHeader,
+                                                                         Bluetooth_Channel_t* const Channel);
+
+                       static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t* AttributeTable,
+                                                                         uint16_t AttributeList[][2],
+                                                                         const uint8_t TotalAttributes,
+                                                                         void** const BufferPos);
+                       static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID,
+                                                                  const void* AttributeValue,
+                                                                  void** ResponseBuffer);
+                       static void*    SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable,
+                                                             const uint16_t AttributeID);
+
+                       static bool     SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES],
+                                                              const uint8_t TotalUUIDs,
                                                               const ServiceAttributeTable_t* CurrAttributeTable);
-                       static void     SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs,
-                                                          uint16_t* const UUIDMatchFlags, const void* CurrAttribute);
-
-                       static uint8_t  SDP_GetAttributeList(uint16_t AttributeList[][2], const void** const CurrentParameter);
-                       static uint8_t  SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], const void** const CurrentParameter);
-
-                       static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData, uint8_t* const HeaderSize);
-                       static uint32_t SDP_GetDataElementSize(const void** const AttributeHeader, uint8_t* const ElementHeaderSize);
+                       static void     SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES],
+                                                          const uint8_t TotalUUIDs,
+                                                          uint16_t* const UUIDMatchFlags,
+                                                          const void* CurrAttribute);
+
+                       static uint8_t  SDP_GetAttributeList(uint16_t AttributeList[][2],
+                                                            const void** const CurrentParameter);
+                       static uint8_t  SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES],
+                                                       const void** const CurrentParameter);
+
+                       static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData,
+                                                                          uint8_t* const HeaderSize);
+                       static uint32_t SDP_GetDataElementSize(const void** const AttributeHeader,
+                                                              uint8_t* const ElementHeaderSize);
                #endif
 
 #endif
index f477ac2..66a5b8e 100644 (file)
@@ -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);
index 8d0674e..89ac019 100644 (file)
                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
index cc7c98b..bda99bd 100644 (file)
@@ -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;
 
index 3ffc051..da73ff8 100644 (file)
@@ -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
index cf6369b..95a0a63 100644 (file)
@@ -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);
index debbf76..d98c265 100644 (file)
@@ -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"
index dc09f84..91a2be5 100644 (file)
@@ -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);
index eb8ec59..6b4df37 100644 (file)
@@ -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
index 428b91a..09cace9 100644 (file)
@@ -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
index 301f6de..666879c 100644 (file)
@@ -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"
index 500b7cb..76b3b49 100644 (file)
@@ -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);
index 9c81902..f518550 100644 (file)
@@ -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"
index 1338f65..ecae67c 100644 (file)
                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
index 129c50a..b94bbca 100644 (file)
@@ -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;
 
index aa34994..5c1e80b 100644 (file)
        
        /* 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
index 2739fc9..985aeeb 100644 (file)
@@ -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)
        {
index 14d8d97..7aabe9f 100644 (file)
                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
index 6e7b284..bf20bca 100644 (file)
@@ -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"
index f196dad..b9c5aed 100644 (file)
@@ -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);
index f551f2f..327ae45 100644 (file)
@@ -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;
 
index 684c743..bd12a39 100644 (file)
@@ -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
index efe1421..1b9c12a 100644 (file)
@@ -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"
index 2c11f11..3a80c8e 100644 (file)
@@ -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);
index 5f3effa..0248959 100644 (file)
@@ -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;
index cbc5456..8c3bd33 100644 (file)
                #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
index b6f3efa..f12c95e 100644 (file)
@@ -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"
index 99bbd4a..78583f0 100644 (file)
@@ -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);
 
index 5200372..cd142ef 100644 (file)
@@ -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;
 
index a2f15c5..960d538 100644 (file)
                #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
index 1d18f11..1da5b4d 100644 (file)
@@ -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"
index 46b47f9..08187f9 100644 (file)
@@ -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
index 5304509..a99a956 100644 (file)
@@ -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;
 
index a57ddaf..c91a801 100644 (file)
                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
index 686eb5f..73f0c2c 100644 (file)
@@ -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"));
 
index d7b893e..61e5eb5 100644 (file)
                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
index 8bec8e5..4c250cd 100644 (file)
@@ -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"
index 4227b53..cf785e3 100644 (file)
@@ -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
index 95a41f1..243c570 100644 (file)
@@ -172,7 +172,9 @@ USB_Descriptor_String_t PROGMEM SerialString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index f946899..f991aa0 100644 (file)
@@ -73,7 +73,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 430c915..2df8710 100644 (file)
@@ -109,8 +109,11 @@ void ISPTarget_ChangeTargetResetLine(const bool ResetTarget)
  *  \return V2 Protocol status \ref STATUS_CMD_OK if the no timeout occurred, \ref STATUS_RDY_BSY_TOUT or
  *          \ref STATUS_CMD_TOUT otherwise
  */
-uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode, const uint16_t PollAddress, const uint8_t PollValue,
-                                      const uint8_t DelayMS, const uint8_t ReadMemCommand)
+uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode,
+                                      const uint16_t PollAddress,
+                                      const uint8_t PollValue,
+                                      const uint8_t DelayMS,
+                                      const uint8_t ReadMemCommand)
 {
        uint8_t ProgrammingStatus  = STATUS_CMD_OK;
 
index 34d623e..869e0e5 100644 (file)
        /* Function Prototypes: */
                uint8_t ISPTarget_GetSPIPrescalerMask(void);
                void    ISPTarget_ChangeTargetResetLine(const bool ResetTarget);
-               uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode, const uint16_t PollAddress,
-                                                     const uint8_t PollValue, const uint8_t DelayMS,
+               uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode,
+                                                     const uint16_t PollAddress,
+                                                     const uint8_t PollValue,
+                                                     const uint8_t DelayMS,
                                                      const uint8_t ReadMemCommand);
                uint8_t ISPTarget_WaitWhileTargetBusy(void);
                void    ISPTarget_LoadExtendedAddress(void);
index bc3ed18..56b18f6 100644 (file)
@@ -151,7 +151,8 @@ uint8_t V2Params_GetParameterValue(const uint8_t ParamID)
  *
  *  \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise
  */
-void V2Params_SetParameterValue(const uint8_t ParamID, const uint8_t Value)
+void V2Params_SetParameterValue(const uint8_t ParamID,
+                                const uint8_t Value)
 {
        ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);
 
index d93aadd..4b7e189 100644 (file)
@@ -75,7 +75,8 @@
        
                uint8_t V2Params_GetParameterPrivileges(const uint8_t ParamID);
                uint8_t V2Params_GetParameterValue(const uint8_t ParamID);
-               void    V2Params_SetParameterValue(const uint8_t ParamID, const uint8_t Value);
+               void    V2Params_SetParameterValue(const uint8_t ParamID,
+                                                  const uint8_t Value);
                
                #if defined(INCLUDE_FROM_V2PROTOCOL_PARAMS_C)
                        static ParameterItem_t* V2Params_GetParamFromTable(const uint8_t ParamID);
index 150f642..d45e42a 100644 (file)
@@ -127,7 +127,9 @@ bool TINYNVM_WaitWhileNVMControllerBusy(void)
  *
  *  \return Boolean true if the command sequence complete successfully
  */
-bool TINYNVM_ReadMemory(const uint16_t ReadAddress, uint8_t* ReadBuffer, uint16_t ReadSize)
+bool TINYNVM_ReadMemory(const uint16_t ReadAddress,
+                        uint8_t* ReadBuffer,
+                        uint16_t ReadSize)
 {
        /* Wait until the NVM controller is no longer busy */
        if (!(TINYNVM_WaitWhileNVMControllerBusy()))
@@ -158,7 +160,9 @@ bool TINYNVM_ReadMemory(const uint16_t ReadAddress, uint8_t* ReadBuffer, uint16_
  *
  *  \return Boolean true if the command sequence complete successfully
  */
-bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint16_t WriteLength)
+bool TINYNVM_WriteMemory(const uint16_t WriteAddress,
+                         uint8_t* WriteBuffer,
+                         uint16_t WriteLength)
 {
        /* Wait until the NVM controller is no longer busy */
        if (!(TINYNVM_WaitWhileNVMControllerBusy()))
@@ -203,7 +207,8 @@ bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint
  *
  *  \return Boolean true if the command sequence complete successfully
  */
-bool TINYNVM_EraseMemory(const uint8_t EraseCommand, const uint16_t Address)
+bool TINYNVM_EraseMemory(const uint8_t EraseCommand,
+                         const uint16_t Address)
 {
        /* Wait until the NVM controller is no longer busy */
        if (!(TINYNVM_WaitWhileNVMControllerBusy()))
index 2daca16..cbb2c27 100644 (file)
        /* Function Prototypes: */              
                bool TINYNVM_WaitWhileNVMBusBusy(void);
                bool TINYNVM_WaitWhileNVMControllerBusy(void);
-               bool TINYNVM_ReadMemory(const uint16_t ReadAddress, uint8_t* ReadBuffer, uint16_t ReadLength);
-               bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint16_t WriteLength);
-               bool TINYNVM_EraseMemory(const uint8_t EraseCommand, const uint16_t Address);
+               bool TINYNVM_ReadMemory(const uint16_t ReadAddress,
+                                       uint8_t* ReadBuffer,
+                                       uint16_t ReadLength);
+               bool TINYNVM_WriteMemory(const uint16_t WriteAddress,
+                                        uint8_t* WriteBuffer,
+                                        uint16_t WriteLength);
+               bool TINYNVM_EraseMemory(const uint8_t EraseCommand,
+                                        const uint16_t Address);
 
                #if (defined(INCLUDE_FROM_TINYNVM_C) && defined(ENABLE_XPROG_PROTOCOL))
                        static void TINYNVM_SendReadNVMRegister(const uint8_t Address);
index 3ca9dd9..6a9e791 100644 (file)
@@ -212,7 +212,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 07a3613..8012ebd 100644 (file)
@@ -77,7 +77,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 0ffe792..1d6e07f 100644 (file)
                 *  \param[in,out] Buffer  Pointer to a ring buffer structure to insert into
                 *  \param[in]     Data    Data element to insert into the buffer
                 */
-               static inline void RingBuffer_AtomicInsert(RingBuff_t* const Buffer, RingBuff_Data_t Data)
+               static inline void RingBuffer_AtomicInsert(RingBuff_t* const Buffer,
+                                                          const RingBuff_Data_t Data)
                {
                        ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
                        {
                 *  \param[in,out] Buffer  Pointer to a ring buffer structure to insert into
                 *  \param[in]     Data    Data element to insert into the buffer
                 */
-               static inline void RingBuffer_Insert(RingBuff_t* const Buffer, RingBuff_Data_t Data)
+               static inline void RingBuffer_Insert(RingBuff_t* const Buffer,
+                                                    const RingBuff_Data_t Data)
                {
                        *Buffer->In = Data;
                        
index 640c832..9ce300a 100644 (file)
@@ -283,7 +283,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 9933d06..fc648de 100644 (file)
@@ -75,7 +75,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index d6ffde8..cd2b0d3 100644 (file)
@@ -176,7 +176,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 4402593..d78bbba 100644 (file)
@@ -82,7 +82,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index f54b25b..b274a10 100644 (file)
@@ -48,7 +48,9 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
-void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                  const uint32_t BlockAddress,
+                                  uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -182,7 +184,9 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
-void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                 const uint32_t BlockAddress,
+                                 uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -290,7 +294,9 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
  *  \param[in] TotalBlocks   Number of blocks of data to write
  *  \param[in] BufferPtr     Pointer to the data source RAM buffer
  */
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, const uint8_t* BufferPtr)
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                      uint16_t TotalBlocks,
+                                      const uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -389,7 +395,9 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t Tota
  *  \param[in] TotalBlocks   Number of blocks of data to read
  *  \param[out] BufferPtr    Pointer to the data destination RAM buffer
  */
-void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                     uint16_t TotalBlocks,
+                                     uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index 8f62219..406ae62 100644 (file)
                
        /* Function Prototypes: */
                #if defined(USB_CAN_BE_DEVICE)
-                       void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+                       void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                         const uint32_t BlockAddress,
                                                                                          uint16_t TotalBlocks);
-                       void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+                       void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                        const uint32_t BlockAddress,
                                                                                         uint16_t TotalBlocks);
-                       void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+                       void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                                             uint16_t TotalBlocks,
                                                                                                  const uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
-                       void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+                       void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                                            uint16_t TotalBlocks,
                                                                                                 uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                        void DataflashManager_ResetDataflashProtections(void);
                        bool DataflashManager_CheckDataflashOperation(void);
index 74f6811..0bf6abd 100644 (file)
@@ -248,7 +248,8 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  *  \param[in] IsDataRead  Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
  */
-static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead)
+static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                      const bool IsDataRead)
 {
        uint32_t BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
        uint16_t TotalBlocks  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
index 3927a4f..22c3a1d 100644 (file)
@@ -80,7 +80,8 @@
                                static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                                static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                                static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-                               static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead);
+                               static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                                     const bool IsDataRead);
                        #endif
                #endif
                
index dff45fc..dfb8a9f 100644 (file)
@@ -72,7 +72,7 @@
                #define LEDMASK_USB_BUSY          LEDS_LED2
                
        /* External Variables: */
-               extern FILE DiskStream;
+               extern FILE  DiskStream;
                extern FATFS DiskFATState;
        
        /* Function Prototypes: */
index decd2b0..c43cfc8 100644 (file)
@@ -87,7 +87,8 @@
                                PORTC = (PORTC & ~LEDS_ALL_LEDS) | LEDMask;
                        }
                        
-                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask)
+                       static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
+                                                          const uint8_t ActiveMask)
                        {
                                PORTC = (PORTC & ~LEDMask) | ActiveMask;
                        }
index 67d0deb..316ad45 100644 (file)
@@ -224,7 +224,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 017e3fe..387034f 100644 (file)
@@ -77,7 +77,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index c544ba6..219ead1 100644 (file)
@@ -196,7 +196,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 02a14b4..85d0737 100644 (file)
@@ -64,7 +64,8 @@
                #define KEYBOARD_EPSIZE              8
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 8be527b..c1b2103 100644 (file)
@@ -50,7 +50,8 @@ void BitBuffer_Init(BitBuffer_t* const Buffer)
 }
 
 /** Function to store the given bit into the given bit buffer. */
-void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer, const bool Bit)
+void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer,
+                            const bool Bit)
 {
        /* If the bit to store is true, set the next bit in the buffer */
        if (Bit)
index dff4d2e..973c7c2 100644 (file)
@@ -82,7 +82,8 @@
                 *  \param[in,out] Buffer  Bit buffer to store a bit into
                 *  \param[in] Bit  Bit to store into the buffer
                 */
-               void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer, const bool Bit) ATTR_NON_NULL_PTR_ARG(1);
+               void BitBuffer_StoreNextBit(BitBuffer_t* const Buffer,
+                                           const bool Bit) ATTR_NON_NULL_PTR_ARG(1);
                
                /** Retrieves a bit from the next location inside a given bit buffer.
                 *
index e404eaf..4c0d7a1 100644 (file)
@@ -171,8 +171,11 @@ void EVENT_USB_Device_StartOfFrame(void)
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
 
@@ -210,8 +213,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData        Pointer to the report buffer where the received report is stored
  *  \param[in] ReportSize        Size in bytes of the report received from the host
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports
 }
index 4922b7b..946ef2e 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
                                                                                                                  
 #endif
index dcc6e73..c76dc52 100644 (file)
@@ -151,7 +151,8 @@ void Read_Joystick_Status(void)
  *  \param[in] Report  Report data to send.
  *  \param[in] ReportSize  Report length in bytes.
  */
-void Send_Command_Report(uint8_t* const Report, const uint16_t ReportSize)
+void Send_Command_Report(uint8_t* const Report,
+                         const uint16_t ReportSize)
 {
        memcpy(CmdBuffer, Report, 8);
        WriteNextReport(CmdBuffer, ReportSize);
@@ -212,7 +213,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)
 {
        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
 }
@@ -245,7 +247,8 @@ void DiscardNextReport(void)
  *  \param[in] ReportOUTData  Buffer containing the report to send to the device
  *  \param[in] ReportLength  Length of the report to send
  */
-void WriteNextReport(uint8_t* const ReportOUTData, const uint16_t ReportLength)
+void WriteNextReport(uint8_t* const ReportOUTData,
+                     const uint16_t ReportLength)
 {
        /* Select and unfreeze HID data OUT pipe */
        Pipe_SelectPipe(HID_DATA_OUT_PIPE);
index aba2616..57aae09 100644 (file)
@@ -82,7 +82,8 @@
                void SetupHardware(void);
 
                void Read_Joystick_Status(void);
-        void Send_Command_Report(uint8_t* const Report, const uint16_t ReportSize);
+        void Send_Command_Report(uint8_t* const Report,
+                                        const uint16_t ReportSize);
         void Send_Command(uint8_t* const Command);
 
                void HID_Host_Task(void);
                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 DiscardNextReport(void);
-               void WriteNextReport(uint8_t* const ReportOUTData, const uint16_t ReportLength);
+               void WriteNextReport(uint8_t* const ReportOUTData,
+                                    const uint16_t ReportLength);
                
 #endif
index ca353d5..e792aec 100644 (file)
@@ -153,7 +153,9 @@ USB_Descriptor_String_t PROGMEM RelayBoard_SerialString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 7b217fb..f6357f8 100644 (file)
@@ -54,6 +54,8 @@
                } RelayBoard_USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress);
 
 #endif
index 00a4d70..564d5ee 100644 (file)
@@ -237,7 +237,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index a2ab585..ff0d25c 100644 (file)
@@ -54,7 +54,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 003160f..a85aa61 100644 (file)
@@ -7,7 +7,9 @@
 
 #include "DS1307.h"
 
-void DS1307_SetDate(uint8_t Day, uint8_t Month, uint8_t Year)
+void DS1307_SetDate(const uint8_t Day,
+                    const uint8_t Month,
+                    const uint8_t Year)
 {
 #if defined(DUMMY_RTC)
        return;
@@ -32,7 +34,9 @@ void DS1307_SetDate(uint8_t Day, uint8_t Month, uint8_t Year)
        }
 }
 
-void DS1307_SetTime(uint8_t Hour, uint8_t Minute, uint8_t Second)
+void DS1307_SetTime(const uint8_t Hour,
+                    const uint8_t Minute,
+                    const uint8_t Second)
 {
 #if defined(DUMMY_RTC)
        return;
@@ -59,7 +63,9 @@ void DS1307_SetTime(uint8_t Hour, uint8_t Minute, uint8_t Second)
        }
 }
                
-void DS1307_GetDate(uint8_t* Day, uint8_t* Month, uint8_t* Year)
+void DS1307_GetDate(uint8_t* const Day,
+                    uint8_t* const Month,
+                    uint8_t* const Year)
 {
 #if defined(DUMMY_RTC)
        *Day   = 1;
@@ -91,7 +97,9 @@ void DS1307_GetDate(uint8_t* Day, uint8_t* Month, uint8_t* Year)
        *Year   = (CurrentRTCDate.Byte3.Fields.TenYear  * 10) + CurrentRTCDate.Byte3.Fields.Year;
 }
 
-void DS1307_GetTime(uint8_t* Hour, uint8_t* Minute, uint8_t* Second)
+void DS1307_GetTime(uint8_t* const Hour,
+                    uint8_t* const Minute,
+                    uint8_t* const Second)
 {
 #if defined(DUMMY_RTC)
        *Hour   = 1;
index 58eac8e..d07bff4 100644 (file)
                #define DS1307_ADDRESS_WRITE  0b11010000
 
        /* Function Prototypes: */
-               void DS1307_SetDate(uint8_t Day, uint8_t Month, uint8_t Year);
-               void DS1307_SetTime(uint8_t Hour, uint8_t Minute, uint8_t Second);
-               
-               void DS1307_GetDate(uint8_t* Day, uint8_t* Month, uint8_t* Year);
-               void DS1307_GetTime(uint8_t* Hour, uint8_t* Minute, uint8_t* Second);
+               void DS1307_SetDate(const uint8_t Day,
+                                   const uint8_t Month,
+                                   const uint8_t Year);
+               void DS1307_SetTime(const uint8_t Hour,
+                                   const uint8_t Minute,
+                                   const uint8_t Second);
+               void DS1307_GetDate(uint8_t* const Day,
+                                   uint8_t* const Month,
+                                   uint8_t* const Year);
+               void DS1307_GetTime(uint8_t* const Hour,
+                                   uint8_t* const Minute,
+                                   uint8_t* const Second);
 
 #endif
index 48c4fa7..1750e15 100644 (file)
@@ -47,7 +47,9 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
-void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                  const uint32_t BlockAddress,
+                                  uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -181,7 +183,9 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
-void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                 const uint32_t BlockAddress,
+                                 uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -289,7 +293,9 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
  *  \param[in] TotalBlocks   Number of blocks of data to write
  *  \param[in] BufferPtr     Pointer to the data source RAM buffer
  */
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, const uint8_t* BufferPtr)
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                      uint16_t TotalBlocks,
+                                      const uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -388,7 +394,9 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t Tota
  *  \param[in] TotalBlocks   Number of blocks of data to read
  *  \param[out] BufferPtr    Pointer to the data destination RAM buffer
  */
-void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                     uint16_t TotalBlocks,
+                                     uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index 3c75c4c..70dd88d 100644 (file)
                #define VIRTUAL_MEMORY_BLOCKS               (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                 const uint32_t BlockAddress,
                                                  uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                const uint32_t BlockAddress,
                                                 uint16_t TotalBlocks);
-               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                                     uint16_t TotalBlocks,
                                                      const uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
-               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                                    uint16_t TotalBlocks,
                                                     uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                void DataflashManager_ResetDataflashProtections(void);
                bool DataflashManager_CheckDataflashOperation(void);
index fb841e3..390441a 100644 (file)
@@ -247,7 +247,8 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  *  \param[in] IsDataRead  Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
  */
-static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead)
+static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                      const bool IsDataRead)
 {
        uint32_t BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
        uint16_t TotalBlocks  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
index fd73918..c5504b7 100644 (file)
@@ -80,7 +80,8 @@
                        static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead);
+                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                             const bool IsDataRead);
                #endif
                
 #endif
index e7c7c76..dd707bc 100644 (file)
@@ -279,8 +279,11 @@ bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSI
  *
  *  \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent
  */
-bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                         const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize)
+bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                         uint8_t* const ReportID,
+                                         const uint8_t ReportType,
+                                         void* ReportData,
+                                         uint16_t* const ReportSize)
 {
        Device_Report_t* ReportParams = (Device_Report_t*)ReportData;
 
@@ -301,8 +304,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
  *  \param[in] ReportData  Pointer to a buffer where the created report has been stored
  *  \param[in] ReportSize  Size in bytes of the received HID report
  */
-void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID,
-                                          const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize)
+void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                          const uint8_t ReportID,
+                                          const uint8_t ReportType,
+                                          const void* ReportData,
+                                          const uint16_t ReportSize)
 {
        Device_Report_t* ReportParams = (Device_Report_t*)ReportData;
        
index 48a051f..45cb3be 100644 (file)
                void EVENT_USB_Device_UnhandledControlRequest(void);
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
-                                                 const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize);
-               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, 
-                                                         const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize);
+               bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                        uint8_t* const ReportID,
+                                                 const uint8_t ReportType,
+                                                        void* ReportData,
+                                                        uint16_t* const ReportSize);
+               void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
+                                                         const uint8_t ReportID, 
+                                                         const uint8_t ReportType,
+                                                         const void* ReportData,
+                                                         const uint16_t ReportSize);
 
 #endif
index c60da31..16d3429 100644 (file)
@@ -224,7 +224,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 07a3613..8012ebd 100644 (file)
@@ -77,7 +77,8 @@
                } USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 0ffe792..1d6e07f 100644 (file)
                 *  \param[in,out] Buffer  Pointer to a ring buffer structure to insert into
                 *  \param[in]     Data    Data element to insert into the buffer
                 */
-               static inline void RingBuffer_AtomicInsert(RingBuff_t* const Buffer, RingBuff_Data_t Data)
+               static inline void RingBuffer_AtomicInsert(RingBuff_t* const Buffer,
+                                                          const RingBuff_Data_t Data)
                {
                        ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
                        {
                 *  \param[in,out] Buffer  Pointer to a ring buffer structure to insert into
                 *  \param[in]     Data    Data element to insert into the buffer
                 */
-               static inline void RingBuffer_Insert(RingBuff_t* const Buffer, RingBuff_Data_t Data)
+               static inline void RingBuffer_Insert(RingBuff_t* const Buffer,
+                                                    const RingBuff_Data_t Data)
                {
                        *Buffer->In = Data;
                        
index a13ee01..b7d15e4 100644 (file)
@@ -66,7 +66,8 @@
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
index 7f82253..2260b50 100644 (file)
@@ -170,13 +170,15 @@ void DHCPClientApp_Callback(void)
 /** Fills the DHCP packet response with the appropriate BOOTP header for DHCP. This fills out all the required
  *  fields, leaving only the additional DHCP options to be added to the packet before it is sent to the DHCP server.
  *
- *  \param[out] DHCPHeader  Location in the packet buffer where the BOOTP header should be written to
+ *  \param[out] DHCPHeader       Location in the packet buffer where the BOOTP header should be written to
  *  \param[in]  DHCPMessageType  DHCP Message type, such as DHCP_DISCOVER
- *  \param[in]  AppState    Application state of the current UDP connection
+ *  \param[in]  AppState         Application state of the current UDP connection
  *
  *  \return Size in bytes of the created DHCP packet
  */
-static uint16_t DHCPClientApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader, const uint8_t DHCPMessageType, uip_udp_appstate_t* AppState)
+static uint16_t DHCPClientApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader,
+                                             const uint8_t DHCPMessageType,
+                                             uip_udp_appstate_t* const AppState)
 {
        /* Erase existing packet data so that we start will all 0x00 DHCP header data */
        memset(DHCPHeader, 0, sizeof(DHCP_Header_t));
@@ -215,7 +217,10 @@ static uint16_t DHCPClientApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader, co
  *
  *  \return Number of bytes added to the DHCP packet
  */
-static uint8_t DHCPClientApp_SetOption(uint8_t* DHCPOptionList, uint8_t Option, uint8_t DataLen, void* OptionData)
+static uint8_t DHCPClientApp_SetOption(uint8_t* DHCPOptionList,
+                                       const uint8_t Option,
+                                       const uint8_t DataLen,
+                                       void* const OptionData)
 {
        /* Skip through the DHCP options list until the terminator option is found */
        while (*DHCPOptionList != DHCP_OPTION_END)
@@ -239,7 +244,9 @@ static uint8_t DHCPClientApp_SetOption(uint8_t* DHCPOptionList, uint8_t Option,
  *
  *  \return Boolean true if the option was found in the DHCP packet's options list, false otherwise
  */
-static bool DHCPClientApp_GetOption(const uint8_t* DHCPOptionList, const uint8_t Option, void* const Destination)
+static bool DHCPClientApp_GetOption(const uint8_t* DHCPOptionList,
+                                    const uint8_t Option,
+                                    void* const Destination)
 {
        /* Look through the incoming DHCP packet's options list for the requested option */
        while (*DHCPOptionList != DHCP_OPTION_END)
index 02d30c8..710f4b6 100644 (file)
                void DHCPClientApp_Callback(void);
                
                #if defined(INCLUDE_FROM_DHCPCLIENTAPP_C)
-                       static uint16_t DHCPClientApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader, const uint8_t DHCPMessageType,
-                                                                    uip_udp_appstate_t* AppState);
-                       static uint8_t  DHCPClientApp_SetOption(uint8_t* DHCPOptionList, uint8_t Option, uint8_t DataLen,
-                                                               void* OptionData);
-                       static bool     DHCPClientApp_GetOption(const uint8_t* DHCPOptionList, const uint8_t Option, void* const Destination);
+                       static uint16_t DHCPClientApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader,
+                                                                    const uint8_t DHCPMessageType,
+                                                                    uip_udp_appstate_t* const AppState);
+                       static uint8_t  DHCPClientApp_SetOption(uint8_t* DHCPOptionList,
+                                                               const uint8_t Option,
+                                                               const uint8_t DataLen,
+                                                               void* const OptionData);
+                       static bool     DHCPClientApp_GetOption(const uint8_t* DHCPOptionList,
+                                                               const uint8_t Option,
+                                                               void* const Destination);
                #endif
 #endif
index 48c4fa7..1750e15 100644 (file)
@@ -47,7 +47,9 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
-void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                  const uint32_t BlockAddress,
+                                  uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -181,7 +183,9 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
-void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
+void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                 const uint32_t BlockAddress,
+                                 uint16_t TotalBlocks)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -289,7 +293,9 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
  *  \param[in] TotalBlocks   Number of blocks of data to write
  *  \param[in] BufferPtr     Pointer to the data source RAM buffer
  */
-void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, const uint8_t* BufferPtr)
+void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                      uint16_t TotalBlocks,
+                                      const uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -388,7 +394,9 @@ void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t Tota
  *  \param[in] TotalBlocks   Number of blocks of data to read
  *  \param[out] BufferPtr    Pointer to the data destination RAM buffer
  */
-void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks, uint8_t* BufferPtr)
+void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                     uint16_t TotalBlocks,
+                                     uint8_t* BufferPtr)
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index ebf0bd3..20f21c6 100644 (file)
                #define VIRTUAL_MEMORY_BLOCKS               (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                 const uint32_t BlockAddress,
                                                  uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                const uint32_t BlockAddress,
                                                 uint16_t TotalBlocks);
-               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress,
+                                                     uint16_t TotalBlocks,
                                                      const uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
-               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
+               void DataflashManager_ReadBlocks_RAM(const uint32_t BlockAddress,
+                                                    uint16_t TotalBlocks,
                                                     uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                void DataflashManager_ResetDataflashProtections(void);
                bool DataflashManager_CheckDataflashOperation(void);
index cdc37c9..7c40a3d 100644 (file)
@@ -247,7 +247,8 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInte
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  *  \param[in] IsDataRead  Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
  */
-static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead)
+static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                      const bool IsDataRead)
 {
        uint32_t BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
        uint16_t TotalBlocks  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
index d0c485b..3171c48 100644 (file)
@@ -79,7 +79,8 @@
                        static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
-                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const bool IsDataRead);
+                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
+                                                             const bool IsDataRead);
                #endif
                
 #endif
index 1b30f6a..ab2be12 100644 (file)
@@ -52,7 +52,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
index 397cb56..c85f456 100644 (file)
@@ -172,7 +172,9 @@ USB_Descriptor_String_t PROGMEM AVRISP_SerialString =
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
  */
-uint16_t AVRISP_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
+                              const uint8_t wIndex,
+                              void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 7731aca..9700351 100644 (file)
@@ -73,6 +73,8 @@
                } AVRISP_USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t AVRISP_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress);
+               uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
+                                             const uint8_t wIndex,
+                                             void** const DescriptorAddress);
 
 #endif
index 0ffe792..1d6e07f 100644 (file)
                 *  \param[in,out] Buffer  Pointer to a ring buffer structure to insert into
                 *  \param[in]     Data    Data element to insert into the buffer
                 */
-               static inline void RingBuffer_AtomicInsert(RingBuff_t* const Buffer, RingBuff_Data_t Data)
+               static inline void RingBuffer_AtomicInsert(RingBuff_t* const Buffer,
+                                                          const RingBuff_Data_t Data)
                {
                        ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
                        {
                 *  \param[in,out] Buffer  Pointer to a ring buffer structure to insert into
                 *  \param[in]     Data    Data element to insert into the buffer
                 */
-               static inline void RingBuffer_Insert(RingBuff_t* const Buffer, RingBuff_Data_t Data)
+               static inline void RingBuffer_Insert(RingBuff_t* const Buffer,
+                                                    const RingBuff_Data_t Data)
                {
                        *Buffer->In = Data;
                        
index d0b03c0..7203b3a 100644 (file)
@@ -60,6 +60,6 @@
                }
 
        /* Function Prototypes: */
-               void    SoftUART_Init(void);
+               void SoftUART_Init(void);
 
 #endif
\ No newline at end of file
index 159f386..9871305 100644 (file)
@@ -221,7 +221,9 @@ USB_Descriptor_String_t PROGMEM USART_ProductString =
 /** Descriptor retrieval function for the USART Bridge descriptors. This function is in turn called by the GetDescriptor
  *  callback function in the main source file, to retrieve the device's descriptors when in USART bridge mode.
  */
-uint16_t USART_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t USART_GetDescriptor(const uint16_t wValue,
+                             const uint8_t wIndex,
+                             void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
index 5654a3b..194dbe7 100644 (file)
@@ -77,6 +77,8 @@
                } USART_USB_Descriptor_Configuration_t;
 
        /* Function Prototypes: */
-               uint16_t USART_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress);
+               uint16_t USART_GetDescriptor(const uint16_t wValue,
+                                            const uint8_t wIndex,
+                                            void** const DescriptorAddress);
 
 #endif
index 2e8e6a8..2835481 100644 (file)
@@ -240,8 +240,16 @@ void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCI
  *  to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function
  *  is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
  *  USB host.
+ *
+ *  \param[in]  wValue  Descriptor type and index to retrieve
+ *  \param[in]  wIndex  Sub-index to retrieve (such as a localized string language)
+ *  \param[out] DescriptorAddress  Address of the retrieved descriptor
+ *
+ *  \return Length of the retrieved descriptor in bytes, or NO_DESCRIPTOR if the descriptor was not found
  */
-uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
+uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                    const uint8_t wIndex,
+                                    void** const DescriptorAddress)
 {
        /* Return the correct descriptors based on the selected mode */
        if (CurrentFirmwareMode == MODE_USART_BRIDGE)
index fcb1776..ee747ee 100644 (file)
@@ -93,6 +93,8 @@
 
                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
 
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif