Add missing const qualifiers to class drivers.
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 21 Jul 2010 14:00:51 +0000 (14:00 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 21 Jul 2010 14:00:51 +0000 (14:00 +0000)
Indent core library function parameters so that there is only one parameter per line, to increase readability.

79 files changed:
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/Lib/DataflashManager.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.h
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.h
LUFA/Common/Common.h
LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h
LUFA/Drivers/Board/BENITO/LEDs.h
LUFA/Drivers/Board/BUMBLEB/LEDs.h
LUFA/Drivers/Board/Dataflash.h
LUFA/Drivers/Board/EVK527/Dataflash.h
LUFA/Drivers/Board/EVK527/LEDs.h
LUFA/Drivers/Board/JMDBU2/LEDs.h
LUFA/Drivers/Board/LEDs.h
LUFA/Drivers/Board/RZUSBSTICK/LEDs.h
LUFA/Drivers/Board/STK525/Dataflash.h
LUFA/Drivers/Board/STK525/LEDs.h
LUFA/Drivers/Board/STK526/Dataflash.h
LUFA/Drivers/Board/STK526/LEDs.h
LUFA/Drivers/Board/TEENSY/LEDs.h
LUFA/Drivers/Board/USBKEY/Dataflash.h
LUFA/Drivers/Board/USBKEY/LEDs.h
LUFA/Drivers/Board/USBTINYMKII/LEDs.h
LUFA/Drivers/Board/XPLAIN/Dataflash.h
LUFA/Drivers/Board/XPLAIN/LEDs.h
LUFA/Drivers/Peripheral/AVRU4U6U7/TWI.h
LUFA/Drivers/Peripheral/Serial.c
LUFA/Drivers/Peripheral/Serial.h
LUFA/Drivers/Peripheral/SerialStream.c
LUFA/Drivers/Peripheral/SerialStream.h
LUFA/Drivers/Peripheral/TWI.c
LUFA/Drivers/USB/Class/Device/Audio.c
LUFA/Drivers/USB/Class/Device/CDC.c
LUFA/Drivers/USB/Class/Device/CDC.h
LUFA/Drivers/USB/Class/Device/HID.h
LUFA/Drivers/USB/Class/Device/MIDI.c
LUFA/Drivers/USB/Class/Device/RNDIS.c
LUFA/Drivers/USB/Class/Device/RNDIS.h
LUFA/Drivers/USB/Class/Host/CDC.c
LUFA/Drivers/USB/Class/Host/CDC.h
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/Drivers/USB/Class/Host/HID.h
LUFA/Drivers/USB/Class/Host/HIDParser.c
LUFA/Drivers/USB/Class/Host/HIDParser.h
LUFA/Drivers/USB/Class/Host/MIDI.c
LUFA/Drivers/USB/Class/Host/MIDI.h
LUFA/Drivers/USB/Class/Host/MassStorage.c
LUFA/Drivers/USB/Class/Host/MassStorage.h
LUFA/Drivers/USB/Class/Host/Printer.c
LUFA/Drivers/USB/Class/Host/Printer.h
LUFA/Drivers/USB/Class/Host/RNDIS.c
LUFA/Drivers/USB/Class/Host/RNDIS.h
LUFA/Drivers/USB/Class/Host/StillImage.c
LUFA/Drivers/USB/Class/Host/StillImage.h
LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h
LUFA/Drivers/USB/HighLevel/Events.h
LUFA/Drivers/USB/HighLevel/HostStandardReq.c
LUFA/Drivers/USB/HighLevel/HostStandardReq.h
LUFA/Drivers/USB/LowLevel/Device.h
LUFA/Drivers/USB/LowLevel/Endpoint.c
LUFA/Drivers/USB/LowLevel/Endpoint.h
LUFA/Drivers/USB/LowLevel/Host.c
LUFA/Drivers/USB/LowLevel/Host.h
LUFA/Drivers/USB/LowLevel/OTG.h
LUFA/Drivers/USB/LowLevel/Pipe.c
LUFA/Drivers/USB/LowLevel/Pipe.h
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c
LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c
LUFA/Drivers/USB/LowLevel/USBController.h
LUFA/ManPages/ChangeLog.txt
LUFA/Scheduler/Scheduler.c
LUFA/Scheduler/Scheduler.h
LUFA/makefile
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.h

index 4f34d75..bf0b330 100644 (file)
@@ -47,7 +47,7 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
  *  \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* 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);
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -181,7 +181,7 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, co
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
  *  \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* 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);
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index d159b26..f3e1b65 100644 (file)
@@ -67,9 +67,9 @@
                #define VIRTUAL_MEMORY_BLOCKS               (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
                
        /* Function Prototypes: */
                #define VIRTUAL_MEMORY_BLOCKS               (VIRTUAL_MEMORY_BYTES / VIRTUAL_MEMORY_BLOCK_SIZE)
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
                                                  uint16_t TotalBlocks);
                                                  uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* 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,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                                                 uint16_t TotalBlocks);
                void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
index 24d7859..0bc92c1 100644 (file)
@@ -86,7 +86,7 @@ SCSI_Request_Sense_Response_t SenseData =
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
-bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Set initial sense data, before the requested command is processed */
        SCSI_SET_SENSE(SCSI_SENSE_KEY_GOOD,
 {
        /* Set initial sense data, before the requested command is processed */
        SCSI_SET_SENSE(SCSI_SENSE_KEY_GOOD,
@@ -136,7 +136,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
-static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint16_t AllocationLength  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
        uint16_t BytesTransferred  = (AllocationLength < sizeof(InquiryData))? AllocationLength :
 {
        uint16_t AllocationLength  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
        uint16_t BytesTransferred  = (AllocationLength < sizeof(InquiryData))? AllocationLength :
@@ -173,7 +173,7 @@ static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
-static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint8_t  AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];
        uint8_t  BytesTransferred = (AllocationLength < sizeof(SenseData))? AllocationLength : sizeof(SenseData);
 {
        uint8_t  AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];
        uint8_t  BytesTransferred = (AllocationLength < sizeof(SenseData))? AllocationLength : sizeof(SenseData);
@@ -193,7 +193,7 @@ static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInf
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
-static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
        uint32_t MediaBlockSize        = VIRTUAL_MEMORY_BLOCK_SIZE;
 {
        uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
        uint32_t MediaBlockSize        = VIRTUAL_MEMORY_BLOCK_SIZE;
@@ -212,7 +212,7 @@ static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterface
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
-static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Check to see if the SELF TEST bit is not set */
        if (!(MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & (1 << 2)))
 {
        /* Check to see if the SELF TEST bit is not set */
        if (!(MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & (1 << 2)))
@@ -247,7 +247,7 @@ static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceI
  *  \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)
  */
  *  \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* 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]);
 {
        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 90a4e1c..dab3ebb 100644 (file)
                #define DEVICE_TYPE_CDROM   0x05
                
        /* Function Prototypes: */
                #define DEVICE_TYPE_CDROM   0x05
                
        /* Function Prototypes: */
-               bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
+               bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                
                #if defined(INCLUDE_FROM_SCSI_C)
                
                #if defined(INCLUDE_FROM_SCSI_C)
-                       static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static void SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static void SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static void SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static void SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const bool IsDataRead);
+                       static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+                       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);
                #endif
                
 #endif
                #endif
                
 #endif
index 89c426b..f3a0ea1 100644 (file)
@@ -47,7 +47,7 @@
  *  \param[in] BlockAddress  Data block starting address for the write sequence
  *  \param[in] TotalBlocks   Number of blocks of data to write
  */
  *  \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* 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);
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
@@ -181,7 +181,7 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, co
  *  \param[in] BlockAddress  Data block starting address for the read sequence
  *  \param[in] TotalBlocks   Number of blocks of data to read
  */
  *  \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* 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);
 {
        uint16_t CurrDFPage          = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE);
        uint16_t CurrDFPageByte      = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE);
index 248fa32..585af0d 100644 (file)
@@ -70,9 +70,9 @@
                #define LUN_MEDIA_BLOCKS                   (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
                
        /* Function Prototypes: */
                #define LUN_MEDIA_BLOCKS                   (VIRTUAL_MEMORY_BLOCKS / TOTAL_LUNS)
                
        /* Function Prototypes: */
-               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress,
+               void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo, const uint32_t BlockAddress,
                                                  uint16_t TotalBlocks);
                                                  uint16_t TotalBlocks);
-               void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* 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,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
                                                 uint16_t TotalBlocks);
                void DataflashManager_WriteBlocks_RAM(const uint32_t BlockAddress, uint16_t TotalBlocks,
                                                      uint8_t* BufferPtr) ATTR_NON_NULL_PTR_ARG(3);
index 35a0ea7..fb9bda1 100644 (file)
@@ -86,7 +86,7 @@ SCSI_Request_Sense_Response_t SenseData =
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
  *
  *  \param[in] MSInterfaceInfo  Pointer to the Mass Storage class interface structure that the command is associated with
  */
-bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        bool CommandSuccess = false;
 
 {
        bool CommandSuccess = false;
 
@@ -146,7 +146,7 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
-static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint16_t AllocationLength  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
        uint16_t BytesTransferred  = (AllocationLength < sizeof(InquiryData))? AllocationLength :
 {
        uint16_t AllocationLength  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[3]);
        uint16_t BytesTransferred  = (AllocationLength < sizeof(InquiryData))? AllocationLength :
@@ -187,7 +187,7 @@ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
-static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint8_t  AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];
        uint8_t  BytesTransferred = (AllocationLength < sizeof(SenseData))? AllocationLength : sizeof(SenseData);
 {
        uint8_t  AllocationLength = MSInterfaceInfo->State.CommandBlock.SCSICommandData[4];
        uint8_t  BytesTransferred = (AllocationLength < sizeof(SenseData))? AllocationLength : sizeof(SenseData);
@@ -211,7 +211,7 @@ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInf
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
-static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
        uint32_t MediaBlockSize        = VIRTUAL_MEMORY_BLOCK_SIZE;
 {
        uint32_t LastBlockAddressInLUN = (LUN_MEDIA_BLOCKS - 1);
        uint32_t MediaBlockSize        = VIRTUAL_MEMORY_BLOCK_SIZE;
@@ -234,7 +234,7 @@ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterface
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
-static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
+static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        uint8_t ReturnByte;
 
 {
        uint8_t ReturnByte;
 
@@ -300,7 +300,7 @@ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceI
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
  *
  *  \return Boolean true if the command completed successfully, false otherwise.
  */
-static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* 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;
 {
        uint32_t BlockAddress;
        uint16_t TotalBlocks;
index f7e957a..125bce4 100644 (file)
                #define DEVICE_TYPE_CDROM   0x05
                
        /* Function Prototypes: */
                #define DEVICE_TYPE_CDROM   0x05
                
        /* Function Prototypes: */
-               bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
+               bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                
                #if defined(INCLUDE_FROM_SCSI_C)
                
                #if defined(INCLUDE_FROM_SCSI_C)
-                       static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
-                       static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const bool IsDataRead);
+                       static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
+                       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);
                #endif
                
 #endif
                #endif
                
 #endif
index e52aae8..594dcf8 100644 (file)
@@ -64,7 +64,7 @@
                #include "BoardTypes.h"
 
        /* Public Interface - May be used in end-application: */
                #include "BoardTypes.h"
 
        /* Public Interface - May be used in end-application: */
-               /* Macros: */           
+               /* Macros: */
                        /** Macro for encasing other multi-statement macros. This should be used along with an opening brace
                         *  before the start of any multi-statement macro, so that the macros contents as a whole are treated
                         *  as a discrete block and not as a list of separate statements which may cause problems when used as
                        /** Macro for encasing other multi-statement macros. This should be used along with an opening brace
                         *  before the start of any multi-statement macro, so that the macros contents as a whole are treated
                         *  as a discrete block and not as a list of separate statements which may cause problems when used as
                         *
                         *  \param[in] Word  Word of data whose bytes are to be swapped.
                         */
                         *
                         *  \param[in] Word  Word of data whose bytes are to be swapped.
                         */
-                       static inline uint16_t SwapEndian_16(uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
-                       static inline uint16_t SwapEndian_16(uint16_t Word)
+                       static inline uint16_t SwapEndian_16(const uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
+                       static inline uint16_t SwapEndian_16(const uint16_t Word)
                        {
                                uint8_t Temp;
 
                        {
                                uint8_t Temp;
 
                         *
                         *  \param[in] DWord  Double word of data whose bytes are to be swapped.
                         */
                         *
                         *  \param[in] DWord  Double word of data whose bytes are to be swapped.
                         */
-                       static inline uint32_t SwapEndian_32(uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
-                       static inline uint32_t SwapEndian_32(uint32_t DWord)
+                       static inline uint32_t SwapEndian_32(const uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST;
+                       static inline uint32_t SwapEndian_32(const uint32_t DWord)
                        {
                                uint8_t Temp;
 
                        {
                                uint8_t Temp;
 
                         *  \param[in,out] Data   Pointer to a number containing an even number of bytes to be reversed.
                         *  \param[in]     Bytes  Length of the data in bytes.
                         */
                         *  \param[in,out] Data   Pointer to a number containing an even number of bytes to be reversed.
                         *  \param[in]     Bytes  Length of the data in bytes.
                         */
-                       static inline void SwapEndian_n(void* Data, uint8_t Bytes);
-                       static inline void SwapEndian_n(void* Data, uint8_t Bytes)
+                       static inline void SwapEndian_n(void* Data,
+                                                       uint8_t Bytes) ATTR_NON_NULL_PTR_ARG(1);
+                       static inline void SwapEndian_n(void* Data,
+                                                       uint8_t Bytes)
                        {
                                uint8_t* CurrDataPos = (uint8_t*)Data;
                        
                        {
                                uint8_t* CurrDataPos = (uint8_t*)Data;
                        
index bbbc457..b0fa0f6 100644 (file)
                                PORTD = (PORTD & ~LEDS_ALL_LEDS) | (LEDMask & LEDS_ALL_LEDS);
                        }
                        
                                PORTD = (PORTD & ~LEDS_ALL_LEDS) | (LEDMask & LEDS_ALL_LEDS);
                        }
                        
-                       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)
                        {
                                PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
                        }
                        {
                                PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
                        }
index ea3691f..37c1387 100644 (file)
                                PORTC = ((PORTC | LEDS_ALL_LEDS) & ~LEDMask);
                        }
                        
                                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 | ActiveMask) & ~LEDMask);
                        }
                        {
                                PORTC = ((PORTC | ActiveMask) & ~LEDMask);
                        }
index 36cc98a..1453da4 100644 (file)
                                PORTB = ((PORTB & ~LEDS_ALL_LEDS) | LedMask);
                        }
                
                                PORTB = ((PORTB & ~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)
                        {
                                PORTB = ((PORTB & ~LedMask) | ActiveMask);
                        }
                        {
                                PORTB = ((PORTB & ~LedMask) | ActiveMask);
                        }
index eb0bebd..c09c4a8 100644 (file)
                         *  \param[in] PageAddress  Page address within the selected dataflash IC.
                         *  \param[in] BufferByte   Address within the dataflash's buffer.
                         */
                         *  \param[in] PageAddress  Page address within the selected dataflash IC.
                         *  \param[in] BufferByte   Address within the dataflash's buffer.
                         */
-                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte);
+                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                     const uint16_t BufferByte);
 
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
 
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
index 034ee2b..4f25d6e 100644 (file)
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
-                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
+                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                     const uint16_t BufferByte)
                        {       
                                Dataflash_SendByte(PageAddress >> 5);
                                Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
                        {       
                                Dataflash_SendByte(PageAddress >> 5);
                                Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
index 6fbefd0..7612ba0 100644 (file)
                                PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
                        }
                        
                                PORTD = ((PORTD & ~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)
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
index 9280402..1acf2a9 100644 (file)
                                PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
                        }
                        
                                PORTD = ((PORTD & ~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)
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
index 0aebbde..07289bc 100644 (file)
                 *  \param[in] LEDMask     Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file).
                 *  \param[in] ActiveMask  Mask of whether the LEDs in the LED mask should be turned on or off.
                 */
                 *  \param[in] LEDMask     Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file).
                 *  \param[in] ActiveMask  Mask of whether the LEDs in the LED mask should be turned on or off.
                 */
-               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);
                
                /** Toggles all LEDs in the LED mask, leaving all others in their current states.
                 *
                
                /** Toggles all LEDs in the LED mask, leaving all others in their current states.
                 *
index b28b0c1..6abd0e3 100644 (file)
                                        ~((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT));
                        }
                        
                                        ~((LEDMask & LEDS_PORTE_LEDS) << LEDS_PORTE_MASK_SHIFT));
                        }
                        
-                       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)
                        {
                                PORTD = (((PORTD & ~(LEDMask & LEDS_LED1)) |  (ActiveMask & LEDS_LED1)) |
                                         ((PORTD |  (LEDMask & LEDS_LED2)) & ~(ActiveMask & LEDS_LED2)));
                        {
                                PORTD = (((PORTD & ~(LEDMask & LEDS_LED1)) |  (ActiveMask & LEDS_LED1)) |
                                         ((PORTD |  (LEDMask & LEDS_LED2)) & ~(ActiveMask & LEDS_LED2)));
index e64c9bc..c69d0b3 100644 (file)
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
-                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
+                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                     const uint16_t BufferByte)
                        {       
                                Dataflash_SendByte(PageAddress >> 6);
                                Dataflash_SendByte((PageAddress << 2) | (BufferByte >> 8));
                        {       
                                Dataflash_SendByte(PageAddress >> 6);
                                Dataflash_SendByte((PageAddress << 2) | (BufferByte >> 8));
index 7684588..d2d1bbb 100644 (file)
                                PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
                        }
                        
                                PORTD = ((PORTD & ~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)
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
index bba04f3..a863f35 100644 (file)
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
-                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
+                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                     const uint16_t BufferByte)
                        {       
                                Dataflash_SendByte(PageAddress >> 5);
                                Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
                        {       
                                Dataflash_SendByte(PageAddress >> 5);
                                Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
index 597b68a..2d20e54 100644 (file)
                                PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
                        }
                        
                                PORTD = ((PORTD & ~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)
                        {
                                PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
                        }
                        {
                                PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS));
                        }
index 3e3b671..be6640c 100644 (file)
                                PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
                        }
                        
                                PORTD = ((PORTD | 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)
                        {
                                PORTD = ((PORTD | LEDMask) & ~ActiveMask);
                        }
                        {
                                PORTD = ((PORTD | LEDMask) & ~ActiveMask);
                        }
index 25d2090..a87dfd0 100644 (file)
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
-                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
+                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                     const uint16_t BufferByte)
                        {       
                                PageAddress >>= 1;
                                
                        {       
                                PageAddress >>= 1;
                                
index d0577bf..86981f5 100644 (file)
                                PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
                        }
                        
                                PORTD = ((PORTD & ~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)
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
                        {
                                PORTD = ((PORTD & ~LEDMask) | ActiveMask);
                        }
index 2588ef7..6be7706 100644 (file)
                                PORTB = ((PORTB & ~LEDS_ALL_LEDS) | LedMask);
                        }
                
                                PORTB = ((PORTB & ~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)
                        {
                                PORTB = ((PORTB & ~LedMask) | ActiveMask);
                        }
                        {
                                PORTB = ((PORTB & ~LedMask) | ActiveMask);
                        }
index 8ca50b3..91b526d 100644 (file)
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
                         *  \param[in] PageAddress  Page address within the selected dataflash IC
                         *  \param[in] BufferByte   Address within the dataflash's buffer
                         */
-                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress, const uint16_t BufferByte)
+                       static inline void Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                     const uint16_t BufferByte)
                        {
                                Dataflash_SendByte(PageAddress >> 5);
                                Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
                        {
                                Dataflash_SendByte(PageAddress >> 5);
                                Dataflash_SendByte((PageAddress << 3) | (BufferByte >> 8));
index 9e3c80b..00f7bc2 100644 (file)
                                PORTB = ((PORTB | LEDS_ALL_LEDS) & ~LEDMask);
                        }
                        
                                PORTB = ((PORTB | 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)
                        {
                                PORTB = ((PORTB | (LEDMask & LEDS_ALL_LEDS)) & (~ActiveMask & LEDS_ALL_LEDS));
                        }
                        {
                                PORTB = ((PORTB | (LEDMask & LEDS_ALL_LEDS)) & (~ActiveMask & LEDS_ALL_LEDS));
                        }
index 32d8c25..8b289fb 100644 (file)
@@ -99,7 +99,7 @@
                         *
                         *  \return Boolean true if the recipient ACKed the byte, false otherwise
                         */
                         *
                         *  \return Boolean true if the recipient ACKed the byte, false otherwise
                         */
-                       static inline bool TWI_SendByte(uint8_t Byte)
+                       static inline bool TWI_SendByte(const uint8_t Byte)
                        {
                                TWDR = Byte;
                                TWCR = ((1 << TWINT) | (1 << TWEN));    
                        {
                                TWDR = Byte;
                                TWCR = ((1 << TWINT) | (1 << TWEN));    
                         *
                         *  \return Boolean true if the byte reception successfully completed, false otherwise
                         */
                         *
                         *  \return Boolean true if the byte reception successfully completed, false otherwise
                         */
-                       static inline bool TWI_ReceiveByte(uint8_t* Byte, bool LastByte)
+                       static inline bool TWI_ReceiveByte(uint8_t* const Byte,
+                                                          const bool LastByte)
                        {
                                uint8_t TWCRMask = ((1 << TWINT) | (1 << TWEN));
                                
                        {
                                uint8_t TWCRMask = ((1 << TWINT) | (1 << TWEN));
                                
                         *
                         *  \return Boolean true if the device is ready for data, false otherwise
                         */
                         *
                         *  \return Boolean true if the device is ready for data, false otherwise
                         */
-                       bool TWI_StartTransmission(uint8_t SlaveAddress, uint8_t TimeoutMS);
+                       bool TWI_StartTransmission(const uint8_t SlaveAddress,
+                                                  const uint8_t TimeoutMS);
 
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
 
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
index 0d97e28..b1141de 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "Serial.h"
 
 
 #include "Serial.h"
 
-void Serial_TxString_P(const char *FlashStringPtr)
+void Serial_TxString_P(const charFlashStringPtr)
 {
        uint8_t CurrByte;
 
 {
        uint8_t CurrByte;
 
@@ -41,7 +41,7 @@ void Serial_TxString_P(const char *FlashStringPtr)
        }
 }
 
        }
 }
 
-void Serial_TxString(const char *StringPtr)
+void Serial_TxString(const charStringPtr)
 {
        uint8_t CurrByte;
 
 {
        uint8_t CurrByte;
 
index 103c7db..83bdbbf 100644 (file)
                         *
                         *  \param[in] FlashStringPtr  Pointer to a string located in program space.
                         */
                         *
                         *  \param[in] FlashStringPtr  Pointer to a string located in program space.
                         */
-                       void Serial_TxString_P(const char *FlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);
+                       void Serial_TxString_P(const charFlashStringPtr) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Transmits a given string located in SRAM memory through the USART.
                         *
                         *  \param[in] StringPtr  Pointer to a string located in SRAM space.
                         */
 
                        /** Transmits a given string located in SRAM memory through the USART.
                         *
                         *  \param[in] StringPtr  Pointer to a string located in SRAM space.
                         */
-                       void Serial_TxString(const char *StringPtr) ATTR_NON_NULL_PTR_ARG(1);
+                       void Serial_TxString(const charStringPtr) ATTR_NON_NULL_PTR_ARG(1);
 
                /* Inline Functions: */
                        /** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to
 
                /* Inline Functions: */
                        /** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to
                         *  \param[in] BaudRate     Serial baud rate, in bits per second.
                         *  \param[in] DoubleSpeed  Enables double speed mode when set, halving the sample time to double the baud rate.
                         */
                         *  \param[in] BaudRate     Serial baud rate, in bits per second.
                         *  \param[in] DoubleSpeed  Enables double speed mode when set, halving the sample time to double the baud rate.
                         */
-                       static inline void Serial_Init(const uint32_t BaudRate, const bool DoubleSpeed)
+                       static inline void Serial_Init(const uint32_t BaudRate,
+                                                      const bool DoubleSpeed)
                        {
                                UCSR1A = (DoubleSpeed ? (1 << U2X1) : 0);
                                UCSR1B = ((1 << TXEN1)  | (1 << RXEN1));
                        {
                                UCSR1A = (DoubleSpeed ? (1 << U2X1) : 0);
                                UCSR1B = ((1 << TXEN1)  | (1 << RXEN1));
index 998f473..36a0548 100644 (file)
@@ -33,7 +33,8 @@
 
 FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW);
 
 
 FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW);
 
-static int SerialStream_TxByte(char DataByte, FILE *Stream)
+static int SerialStream_TxByte(char DataByte,
+                               FILE *Stream)
 {
        (void)Stream;
        
 {
        (void)Stream;
        
index 2b73628..9a40048 100644 (file)
@@ -74,7 +74,8 @@
 
                /* Function Prototypes: */
                #if defined(__INCLUDE_FROM_SERIALSTREAM_C)
 
                /* Function Prototypes: */
                #if defined(__INCLUDE_FROM_SERIALSTREAM_C)
-                       static int SerialStream_TxByte(char DataByte, FILE *Stream) ATTR_NON_NULL_PTR_ARG(2);
+                       static int SerialStream_TxByte(char DataByte,
+                                                      FILE *Stream) ATTR_NON_NULL_PTR_ARG(2);
                        static int SerialStream_RxByte(FILE *Stream) ATTR_NON_NULL_PTR_ARG(1);
                #endif
        #endif
                        static int SerialStream_RxByte(FILE *Stream) ATTR_NON_NULL_PTR_ARG(1);
                #endif
        #endif
@@ -87,7 +88,8 @@
                         *  \param[in] BaudRate     Baud rate to configure the USART to.
                         *  \param[in] DoubleSpeed  Enables double speed mode when set, halving the sample time to double the baud rate.
                         */
                         *  \param[in] BaudRate     Baud rate to configure the USART to.
                         *  \param[in] DoubleSpeed  Enables double speed mode when set, halving the sample time to double the baud rate.
                         */
-                       static inline void SerialStream_Init(const uint32_t BaudRate, const bool DoubleSpeed)
+                       static inline void SerialStream_Init(const uint32_t BaudRate,
+                                                            const bool DoubleSpeed)
                        {
                                Serial_Init(BaudRate, DoubleSpeed);
                                
                        {
                                Serial_Init(BaudRate, DoubleSpeed);
                                
index bd6e853..b8aec48 100644 (file)
@@ -7,7 +7,8 @@
 
 #include "TWI.h"
 
 
 #include "TWI.h"
 
-bool TWI_StartTransmission(uint8_t SlaveAddress, uint8_t TimeoutMS)
+bool TWI_StartTransmission(const uint8_t SlaveAddress,
+                           const uint8_t TimeoutMS)
 {
        for (;;)
        {
 {
        for (;;)
        {
index 241fd7f..1569316 100644 (file)
@@ -59,7 +59,7 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
        }
 }
 
        }
 }
 
-bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* AudioInterfaceInfo)
+bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
 {
        memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State));
 
 {
        memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State));
 
index a9f40d0..453d21d 100644 (file)
@@ -41,7 +41,7 @@ void CDC_Device_Event_Stub(void)
 
 }
 
 
 }
 
-void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
+void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
 {
        if (!(Endpoint_IsSETUPReceived()))
          return;
 {
        if (!(Endpoint_IsSETUPReceived()))
          return;
@@ -96,7 +96,7 @@ void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceIn
        }
 }
 
        }
 }
 
-bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
+bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
 {
        memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State));
 
 {
        memset(&CDCInterfaceInfo->State, 0x00, sizeof(CDCInterfaceInfo->State));
 
@@ -124,7 +124,7 @@ bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
        return true;
 }
 
        return true;
 }
 
-void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
+void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return;
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return;
@@ -137,7 +137,9 @@ void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
        CDC_Device_Flush(CDCInterfaceInfo);
 }
 
        CDC_Device_Flush(CDCInterfaceInfo);
 }
 
-uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, char* const Data, const uint16_t Length)
+uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                              char* const Data,
+                              const uint16_t Length)
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return ENDPOINT_RWSTREAM_DeviceDisconnected;
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return ENDPOINT_RWSTREAM_DeviceDisconnected;
@@ -146,7 +148,8 @@ uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo
        return Endpoint_Write_Stream_LE(Data, Length, NO_STREAM_CALLBACK);
 }
 
        return Endpoint_Write_Stream_LE(Data, Length, NO_STREAM_CALLBACK);
 }
 
-uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Data)
+uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                            const uint8_t Data)
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return ENDPOINT_RWSTREAM_DeviceDisconnected;
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return ENDPOINT_RWSTREAM_DeviceDisconnected;
@@ -219,7 +222,7 @@ uint16_t CDC_Device_BytesReceived(USB_ClassInfo_CDC_Device_t* const CDCInterface
        }
 }
 
        }
 }
 
-uint8_t CDC_Device_ReceiveByte(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)
+uint8_t CDC_Device_ReceiveByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return 0;
 {
        if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
          return 0;
@@ -257,19 +260,22 @@ void CDC_Device_SendControlLineStateChange(USB_ClassInfo_CDC_Device_t* const CDC
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
-void CDC_Device_CreateStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, FILE* const Stream)
+void CDC_Device_CreateStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                             FILE* const Stream)
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Device_putchar, CDC_Device_getchar, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Device_putchar, CDC_Device_getchar, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
-void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, FILE* const Stream)
+void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                     FILE* const Stream)
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Device_putchar, CDC_Device_getchar_Blocking, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Device_putchar, CDC_Device_getchar_Blocking, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
-static int CDC_Device_putchar(char c, FILE* Stream)
+static int CDC_Device_putchar(char c,
+                              FILE* Stream)
 {
        return CDC_Device_SendByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
 }
 {
        return CDC_Device_SendByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
 }
index 86543d4..9e92d5f 100644 (file)
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in]     Duration          Duration of the break that has been sent by the host, in milliseconds.
                         */
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in]     Duration          Duration of the break that has been sent by the host, in milliseconds.
                         */
-                       void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1);
+                       void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                                       const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sends a given string to the attached USB host, if connected. If a host is not connected when the function is called, the
                         *  string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the
 
                        /** Sends a given string to the attached USB host, if connected. If a host is not connected when the function is called, the
                         *  string is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, char* const Data, const uint16_t Length)
-                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       uint8_t CDC_Device_SendString(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                                     char* const Data,
+                                                     const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                        
                        /** Sends a given byte to the attached USB host, if connected. If a host is not connected when the function is called, the
                         *  byte is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the
                        
                        /** Sends a given byte to the attached USB host, if connected. If a host is not connected when the function is called, the
                         *  byte is discarded. Bytes will be queued for transmission to the host until either the endpoint bank becomes full, or the
                         *
                         *  \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_WaitUntilReady_ErrorCodes_t enum.
                         */
-                       uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                                   const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** Determines the number of bytes received by the CDC interface from the host, waiting to be read.
                         *
                        
                        /** Determines the number of bytes received by the CDC interface from the host, waiting to be read.
                         *
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
-                       void CDC_Device_CreateStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, FILE* const Stream)
-                                                    ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       void CDC_Device_CreateStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                                    FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Identical to CDC_Device_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
 
                        /** Identical to CDC_Device_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
-                       void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, FILE* const Stream)
-                                                            ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       void CDC_Device_CreateBlockingStream(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                                            FILE* const Stream) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_CDC_CLASS_DEVICE_C)
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_CDC_CLASS_DEVICE_C)
-                               static int CDC_Device_putchar(char c, FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
+                               static int CDC_Device_putchar(char c,
+                                                             FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
                                static int CDC_Device_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
                                static int CDC_Device_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
                                
                                void CDC_Device_Event_Stub(void);
                                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
                                static int CDC_Device_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
                                static int CDC_Device_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
                                
                                void CDC_Device_Event_Stub(void);
                                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
-                                                                                                                 ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
+                                                                         ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
                                void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
                                void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
-                                                                                                                        ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
-                               void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo, const uint8_t Duration)
-                                                               ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
+                                                                            ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Device_Event_Stub);
+                               void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
+                                                               const uint8_t Duration) ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1)
+                                                               ATTR_ALIAS(CDC_Device_Event_Stub);
                        #endif
 
        #endif
                        #endif
 
        #endif
index 6a6198e..638dac1 100644 (file)
                         *  \return Boolean true to force the sending of the report even if it is identical to the previous report and still within
                         *          the idle period (useful for devices which report relative movement), false otherwise.
                         */
                         *  \return Boolean true to force the sending of the report even if it is identical to the previous report and still within
                         *          the idle period (useful for devices which report relative movement), false otherwise.
                         */
-                       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) ATTR_NON_NULL_PTR_ARG(1)
+                       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) ATTR_NON_NULL_PTR_ARG(1)
                                                                 ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(4) ATTR_NON_NULL_PTR_ARG(5);
                        
                        /** HID class driver callback for the user processing of a received HID OUT report. This callback may fire in response to
                                                                 ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(4) ATTR_NON_NULL_PTR_ARG(5);
                        
                        /** HID class driver callback for the user processing of a received HID OUT report. This callback may fire in response to
                         *  \param[in]     ReportData        Pointer to a buffer where the received HID report is stored.
                         *  \param[in]     ReportSize        Size in bytes of the received report from the host.
                         */
                         *  \param[in]     ReportData        Pointer to a buffer where the received HID report is stored.
                         *  \param[in]     ReportSize        Size in bytes of the received report 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)
-                                                                 ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(4);
+                       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) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(4);
 
                /* Inline Functions: */
                        /** Indicates that a millisecond of idle time has elapsed on the given HID interface, and the interface's idle count should be
 
                /* Inline Functions: */
                        /** Indicates that a millisecond of idle time has elapsed on the given HID interface, and the interface's idle count should be
index 5703794..5f0bb24 100644 (file)
@@ -62,7 +62,8 @@ bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInter
        return true;
 }
 
        return true;
 }
 
-uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, const MIDI_EventPacket_t* const Event)
+uint8_t MIDI_Device_SendEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo,
+                                    const MIDI_EventPacket_t* const Event)
 {
        if (USB_DeviceState != DEVICE_STATE_Configured)
          return ENDPOINT_RWSTREAM_DeviceDisconnected;
 {
        if (USB_DeviceState != DEVICE_STATE_Configured)
          return ENDPOINT_RWSTREAM_DeviceDisconnected;
@@ -103,7 +104,8 @@ uint8_t MIDI_Device_Flush(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
        return ENDPOINT_READYWAIT_NoError;
 }
 
        return ENDPOINT_READYWAIT_NoError;
 }
 
-bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
+bool MIDI_Device_ReceiveEventPacket(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo,
+                                    MIDI_EventPacket_t* const Event)
 {
        if (USB_DeviceState != DEVICE_STATE_Configured)
          return false;
 {
        if (USB_DeviceState != DEVICE_STATE_Configured)
          return false;
index 44995ce..ff790b7 100644 (file)
@@ -333,8 +333,11 @@ void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const
 }
 
 static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
 }
 
 static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
-                                          const uint32_t OId, void* const QueryData, const uint16_t QuerySize,
-                                          void* ResponseData, uint16_t* const ResponseSize)
+                                          const uint32_t OId,
+                                          void* const QueryData,
+                                          const uint16_t QuerySize,
+                                          void* ResponseData,
+                                          uint16_t* const ResponseSize)
 {
        (void)QueryData;
        (void)QuerySize;
 {
        (void)QueryData;
        (void)QuerySize;
@@ -447,8 +450,10 @@ static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RN
        }
 }
 
        }
 }
 
-static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId,
-                                        const void* SetData, const uint16_t SetSize)
+static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
+                                        const uint32_t OId,
+                                        const void* SetData,
+                                        const uint16_t SetSize)
 {
        (void)SetSize;
 
 {
        (void)SetSize;
 
index 7c9bc87..8af6563 100644 (file)
                        static void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
                                                                            ATTR_NON_NULL_PTR_ARG(1);
                        static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, 
                        static void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
                                                                            ATTR_NON_NULL_PTR_ARG(1);
                        static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, 
-                                                                 const uint32_t OId, void* const QueryData, const uint16_t QuerySize,
-                                                                                             void* ResponseData, uint16_t* const ResponseSize) ATTR_NON_NULL_PTR_ARG(1)
+                                                                 const uint32_t OId,
+                                                      void* const QueryData,
+                                                      const uint16_t QuerySize,
+                                                                                             void* ResponseData,
+                                                      uint16_t* const ResponseSize) ATTR_NON_NULL_PTR_ARG(1)
                                                                  ATTR_NON_NULL_PTR_ARG(5) ATTR_NON_NULL_PTR_ARG(6);
                                                                  ATTR_NON_NULL_PTR_ARG(5) ATTR_NON_NULL_PTR_ARG(6);
-                       static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId,
-                                                               const void* SetData, const uint16_t SetSize) ATTR_NON_NULL_PTR_ARG(1)
+                       static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
+                                                    const uint32_t OId,
+                                                               const void* SetData,
+                                                    const uint16_t SetSize) ATTR_NON_NULL_PTR_ARG(1)
                                                                ATTR_NON_NULL_PTR_ARG(3);
                #endif
                
                                                                ATTR_NON_NULL_PTR_ARG(3);
                #endif
                
index 9521a85..cf344be 100644 (file)
@@ -36,7 +36,8 @@
 #define  __INCLUDE_FROM_CDC_DRIVER
 #include "CDC.h"
 
 #define  __INCLUDE_FROM_CDC_DRIVER
 #include "CDC.h"
 
-uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, uint16_t ConfigDescriptorSize,
+uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                uint16_t ConfigDescriptorSize,
                                 void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
                                 void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
@@ -261,7 +262,8 @@ uint8_t CDC_Host_SendControlLineStateChange(USB_ClassInfo_CDC_Host_t* const CDCI
        return USB_Host_SendControlRequest(NULL);
 }
 
        return USB_Host_SendControlRequest(NULL);
 }
 
-uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Duration)
+uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                           const uint8_t Duration)
 {
        USB_ControlRequest = (USB_Request_Header_t)
        {
 {
        USB_ControlRequest = (USB_Request_Header_t)
        {
@@ -277,7 +279,9 @@ uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, con
        return USB_Host_SendControlRequest(NULL);
 }
 
        return USB_Host_SendControlRequest(NULL);
 }
 
-uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, char* Data, const uint16_t Length)
+uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                            char* const Data,
+                            const uint16_t Length)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
          return PIPE_READYWAIT_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
          return PIPE_READYWAIT_DeviceDisconnected;
@@ -293,7 +297,8 @@ uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, ch
        return ErrorCode;
 }
 
        return ErrorCode;
 }
 
-uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Data)
+uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                          const uint8_t Data)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
          return PIPE_READYWAIT_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(CDCInterfaceInfo->State.IsActive))
          return PIPE_READYWAIT_DeviceDisconnected;
@@ -399,19 +404,22 @@ uint8_t CDC_Host_Flush(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
        return PIPE_READYWAIT_NoError;
 }
 
        return PIPE_READYWAIT_NoError;
 }
 
-void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream)
+void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                           FILE* const Stream)
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Host_putchar, CDC_Host_getchar, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Host_putchar, CDC_Host_getchar, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
-void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream)
+void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                   FILE* const Stream)
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Host_putchar, CDC_Host_getchar_Blocking, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
 {
        *Stream = (FILE)FDEV_SETUP_STREAM(CDC_Host_putchar, CDC_Host_getchar_Blocking, _FDEV_SETUP_RW);
        fdev_set_udata(Stream, CDCInterfaceInfo);
 }
 
-static int CDC_Host_putchar(char c, FILE* Stream)
+static int CDC_Host_putchar(char c,
+                            FILE* Stream)
 {
        return CDC_Host_SendByte((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
 }
 {
        return CDC_Host_SendByte((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
 }
index 1c69a31..6402428 100644 (file)
                         *
                         *  \return A value from the \ref CDCHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref CDCHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, uint16_t ConfigDescriptorSize,
+                       uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                                       uint16_t ConfigDescriptorSize,
                                                        void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
                        
                        /** Sets the line encoding for the attached device's virtual serial port. This should be called when the LineEncoding
                                                        void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
                        
                        /** Sets the line encoding for the attached device's virtual serial port. This should be called when the LineEncoding
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
-                       uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t CDC_Host_SendBreak(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                                  const uint8_t Duration) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** Sends a given string to the attached USB device, if connected. If a device is not connected when the function is called, the
                         *  string is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
                        
                        /** Sends a given string to the attached USB device, if connected. If a device is not connected when the function is called, the
                         *  string is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, char* Data, const uint16_t Length)
-                                                   ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       uint8_t CDC_Host_SendString(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                                   char* const Data,
+                                                   const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                        
                        /** Sends a given byte to the attached USB device, if connected. If a device is not connected when the function is called, the
                         *  byte is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
                        
                        /** Sends a given byte to the attached USB device, if connected. If a device is not connected when the function is called, the
                         *  byte is discarded. Bytes will be queued for transmission to the device until either the pipe bank becomes full, or the
                         *
                         *  \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_WaitUntilReady_ErrorCodes_t enum.
                         */
-                       uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                                 const uint8_t Data) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Determines the number of bytes received by the CDC interface from the device, waiting to be read.
                         *
 
                        /** Determines the number of bytes received by the CDC interface from the device, waiting to be read.
                         *
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
-                       void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream);
+                       void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                                  FILE* const Stream);
 
                        /** Identical to CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
 
                        /** Identical to CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
                         *  the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         *  \param[in,out] Stream            Pointer to a FILE structure where the created stream should be placed.
                         */
-                       void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo, FILE* const Stream);
+                       void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
+                                                          FILE* const Stream);
 
                        /** CDC class driver event for a control line state change on a CDC host interface. This event fires each time the device notifies
                         *  the host of a control line state change (containing the virtual serial control line states, such as DCD) and may be hooked in the
 
                        /** CDC class driver event for a control line state change on a CDC host interface. This event fires each time the device notifies
                         *  the host of a control line state change (containing the virtual serial control line states, such as DCD) and may be hooked in the
 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_CDC_CLASS_HOST_C)
 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_CDC_CLASS_HOST_C)
-                               static int CDC_Host_putchar(char c, FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
+                               static int CDC_Host_putchar(char c,
+                                                           FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
                                static int CDC_Host_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
                                static int CDC_Host_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
 
                                static int CDC_Host_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
                                static int CDC_Host_getchar_Blocking(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
 
index 9415c86..66c044b 100644 (file)
@@ -36,7 +36,8 @@
 #define  __INCLUDE_FROM_HID_DRIVER
 #include "HID.h"
 
 #define  __INCLUDE_FROM_HID_DRIVER
 #include "HID.h"
 
-uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, uint16_t ConfigDescriptorSize,
+uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
+                                uint16_t ConfigDescriptorSize,
                                 void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
                                 void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
@@ -153,7 +154,9 @@ static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescri
 }
 
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
 }
 
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
-uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, const uint8_t ReportID, void* Buffer)
+uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
+                                   const uint8_t ReportID,
+                                   void* Buffer)
 {
        USB_ControlRequest = (USB_Request_Header_t)
        {
 {
        USB_ControlRequest = (USB_Request_Header_t)
        {
@@ -170,7 +173,8 @@ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceI
 }                                                                                         
 #endif
                                                                                   
 }                                                                                         
 #endif
                                                                                   
-uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, void* Buffer)
+uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
+                               void* Buffer)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
          return PIPE_READYWAIT_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
          return PIPE_READYWAIT_DeviceDisconnected;
@@ -215,7 +219,9 @@ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                 const uint8_t ReportID,
 #endif
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                 const uint8_t ReportID,
 #endif
-                                const uint8_t ReportType, void* Buffer, const uint16_t ReportSize)
+                                const uint8_t ReportType,
+                                void* Buffer,
+                                const uint16_t ReportSize)
 {
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
        if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
 {
 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
        if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))
index e898b31..88d1664 100644 (file)
                         *
                         *  \return A value from the \ref HIDHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref HIDHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, uint16_t ConfigDescriptorSize,
+                       uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
+                                                       uint16_t ConfigDescriptorSize,
                                                        void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
 
                                                        void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
 
                         *
                         *  \return An error code from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return An error code from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, void* Buffer)
-                                                      ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
+                                                      void* Buffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                        /** Receives a HID IN report from the attached device, by the report ID.
 
                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                        /** Receives a HID IN report from the attached device, by the report ID.
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
-                       uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, const uint8_t ReportID,
+                       uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
+                                                          const uint8_t ReportID,
                                                           void* Buffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
                        #endif
                        
                                                           void* Buffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
                        #endif
                        
                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                                        const uint8_t ReportID,
                        #endif
                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                                        const uint8_t ReportID,
                        #endif
-                                                       const uint8_t ReportType, void* Buffer, const uint16_t ReportSize) ATTR_NON_NULL_PTR_ARG(1)
+                                                       const uint8_t ReportType,
+                                                       void* Buffer,
+                                                       const uint16_t ReportSize) ATTR_NON_NULL_PTR_ARG(1)
                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                                        ATTR_NON_NULL_PTR_ARG(4);
                        #else
                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                                        ATTR_NON_NULL_PTR_ARG(4);
                        #else
index 7116ed8..1492112 100644 (file)
@@ -34,7 +34,9 @@
 
 #include "HIDParser.h"
 
 
 #include "HIDParser.h"
 
-uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID_ReportInfo_t* const ParserData)
+uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
+                             uint16_t ReportSize,
+                             HID_ReportInfo_t* const ParserData)
 {
        HID_StateTable_t      StateTable[HID_STATETABLE_STACK_DEPTH];
        HID_StateTable_t*     CurrStateTable          = &StateTable[0];
 {
        HID_StateTable_t      StateTable[HID_STATETABLE_STACK_DEPTH];
        HID_StateTable_t*     CurrStateTable          = &StateTable[0];
@@ -284,7 +286,8 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID
        return HID_PARSE_Successful;
 }
 
        return HID_PARSE_Successful;
 }
 
-bool USB_GetHIDReportItemInfo(const uint8_t* ReportData, HID_ReportItem_t* const ReportItem)
+bool USB_GetHIDReportItemInfo(const uint8_t* ReportData,
+                              HID_ReportItem_t* const ReportItem)
 {
        uint16_t DataBitsRem  = ReportItem->Attributes.BitSize;
        uint16_t CurrentBit   = ReportItem->BitOffset;
 {
        uint16_t DataBitsRem  = ReportItem->Attributes.BitSize;
        uint16_t CurrentBit   = ReportItem->BitOffset;
@@ -313,7 +316,8 @@ bool USB_GetHIDReportItemInfo(const uint8_t* ReportData, HID_ReportItem_t* const
        return true;
 }
 
        return true;
 }
 
-void USB_SetHIDReportItemInfo(uint8_t* ReportData, HID_ReportItem_t* const ReportItem)
+void USB_SetHIDReportItemInfo(uint8_t* ReportData,
+                              HID_ReportItem_t* const ReportItem)
 {
        uint16_t DataBitsRem  = ReportItem->Attributes.BitSize;
        uint16_t CurrentBit   = ReportItem->BitOffset;
 {
        uint16_t DataBitsRem  = ReportItem->Attributes.BitSize;
        uint16_t CurrentBit   = ReportItem->BitOffset;
@@ -337,7 +341,9 @@ void USB_SetHIDReportItemInfo(uint8_t* ReportData, HID_ReportItem_t* const Repor
        }
 }
 
        }
 }
 
-uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, const uint8_t ReportID, const uint8_t ReportType)
+uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData,
+                              const uint8_t ReportID,
+                              const uint8_t ReportType)
 {
        for (uint8_t i = 0; i < HID_MAX_REPORT_IDS; i++)
        {
 {
        for (uint8_t i = 0; i < HID_MAX_REPORT_IDS; i++)
        {
index 9ec90c6..5f8fa37 100644 (file)
                         *
                         *  \return A value in the \ref HID_Parse_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value in the \ref HID_Parse_ErrorCodes_t enum.
                         */
-                       uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, uint16_t ReportSize, HID_ReportInfo_t* const ParserData)
-                                                    ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
+                       uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
+                                                    uint16_t ReportSize,
+                                                    HID_ReportInfo_t* const ParserData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Extracts the given report item's value out of the given HID report and places it into the Value
                         *  member of the report item's \ref HID_ReportItem_t structure.
 
                        /** Extracts the given report item's value out of the given HID report and places it into the Value
                         *  member of the report item's \ref HID_ReportItem_t structure.
                         *
                         *  \returns Boolean true if the item to retrieve was located in the given report, false otherwise.
                         */
                         *
                         *  \returns Boolean true if the item to retrieve was located in the given report, false otherwise.
                         */
-                       bool USB_GetHIDReportItemInfo(const uint8_t* ReportData, HID_ReportItem_t* const ReportItem)
-                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       bool USB_GetHIDReportItemInfo(const uint8_t* ReportData,
+                                                     HID_ReportItem_t* const ReportItem) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Retrieves the given report item's value out of the Value member of the report item's
                         *  \ref HID_ReportItem_t structure and places it into the correct position in the HID report
 
                        /** Retrieves the given report item's value out of the Value member of the report item's
                         *  \ref HID_ReportItem_t structure and places it into the correct position in the HID report
                         *  \param[out] ReportData  Buffer holding the current OUT or FEATURE report data.
                         *  \param[in]  ReportItem  Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array.
                         */
                         *  \param[out] ReportData  Buffer holding the current OUT or FEATURE report data.
                         *  \param[in]  ReportItem  Pointer to the report item of interest in a \ref HID_ReportInfo_t ReportItem array.
                         */
-                       void USB_SetHIDReportItemInfo(uint8_t* ReportData, HID_ReportItem_t* const ReportItem)
-                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
-                                                                                 
+                       void USB_SetHIDReportItemInfo(uint8_t* ReportData,
+                                                     HID_ReportItem_t* const ReportItem) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+
                        /** Retrieves the size of a given HID report in bytes from it's Report ID.
                         *
                         *  \param[in] ParserData  Pointer to a \ref HID_ReportInfo_t instance containing the parser output.
                        /** Retrieves the size of a given HID report in bytes from it's Report ID.
                         *
                         *  \param[in] ParserData  Pointer to a \ref HID_ReportInfo_t instance containing the parser output.
                         *
                         *  \return Size of the report in bytes, or 0 if the report does not exist.
                         */
                         *
                         *  \return Size of the report in bytes, or 0 if the report does not exist.
                         */
-                       uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData, const uint8_t ReportID,
+                       uint16_t USB_GetHIDReportSize(HID_ReportInfo_t* const ParserData,
+                                                     const uint8_t ReportID,
                                                      const uint8_t ReportType) ATTR_CONST ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Callback routine for the HID Report Parser. This callback <b>must</b> be implemented by the user code when
                                                      const uint8_t ReportType) ATTR_CONST ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Callback routine for the HID Report Parser. This callback <b>must</b> be implemented by the user code when
index 50b7b3e..fd7f13c 100644 (file)
@@ -36,7 +36,8 @@
 #define  __INCLUDE_FROM_MIDI_DRIVER
 #include "MIDI.h"
 
 #define  __INCLUDE_FROM_MIDI_DRIVER
 #include "MIDI.h"
 
-uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, uint16_t ConfigDescriptorSize,
+uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo,
+                                 uint16_t ConfigDescriptorSize,
                                  void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
                                  void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
@@ -144,7 +145,8 @@ uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
        return PIPE_READYWAIT_NoError;
 }
 
        return PIPE_READYWAIT_NoError;
 }
 
-uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
+uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo,
+                                  MIDI_EventPacket_t* const Event)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
@@ -165,7 +167,8 @@ uint8_t MIDI_Host_SendEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterface
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-bool MIDI_Host_ReceiveEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, MIDI_EventPacket_t* const Event)
+bool MIDI_Host_ReceiveEventPacket(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo,
+                                  MIDI_EventPacket_t* const Event)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
index 1d76dd3..0d126b8 100644 (file)
                         *
                         *  \return A value from the \ref MIDIHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref MIDIHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo, uint16_t ConfigDescriptorSize,
+                       uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo,
+                                                        uint16_t ConfigDescriptorSize,
                                                         void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Sends a MIDI event packet to the device. If no device is connected, the event packet is discarded.
                                                         void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Sends a MIDI event packet to the device. If no device is connected, the event packet is discarded.
index a96d47d..82746cd 100644 (file)
@@ -36,7 +36,8 @@
 #define  __INCLUDE_FROM_MS_DRIVER
 #include "MassStorage.h"
 
 #define  __INCLUDE_FROM_MS_DRIVER
 #include "MassStorage.h"
 
-uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize,
+uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                               uint16_t ConfigDescriptorSize,
                                                           void* DeviceConfigDescriptor)
 {
        uint8_t FoundEndpoints = 0;
                                                           void* DeviceConfigDescriptor)
 {
        uint8_t FoundEndpoints = 0;
@@ -129,7 +130,8 @@ static uint8_t DCOMP_MS_NextMSInterfaceEndpoint(void* const CurrentDescriptor)
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
-static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, MS_CommandBlockWrapper_t* const SCSICommandBlock,
+static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                   MS_CommandBlockWrapper_t* const SCSICommandBlock,
                                    const void* const BufferPtr)
 {
        uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
                                    const void* const BufferPtr)
 {
        uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
@@ -216,7 +218,8 @@ static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInte
 }
 
 static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
 }
 
 static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
-                                       MS_CommandBlockWrapper_t* const SCSICommandBlock, void* BufferPtr)
+                                       MS_CommandBlockWrapper_t* const SCSICommandBlock,
+                                       void* BufferPtr)
 {
        uint8_t  ErrorCode = PIPE_RWSTREAM_NoError;
        uint16_t BytesRem  = SCSICommandBlock->DataTransferLength;
 {
        uint8_t  ErrorCode = PIPE_RWSTREAM_NoError;
        uint16_t BytesRem  = SCSICommandBlock->DataTransferLength;
@@ -301,7 +304,8 @@ uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
        return USB_Host_SendControlRequest(NULL);
 }
 
        return USB_Host_SendControlRequest(NULL);
 }
 
-uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_t* const MaxLUNIndex)
+uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                          uint8_t* const MaxLUNIndex)
 {
        uint8_t ErrorCode = HOST_SENDCONTROL_Successful;
 
 {
        uint8_t ErrorCode = HOST_SENDCONTROL_Successful;
 
@@ -325,7 +329,8 @@ uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_
        return ErrorCode;
 }
 
        return ErrorCode;
 }
 
-uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                               const uint8_t LUNIndex,
                                SCSI_Inquiry_Response_t* const InquiryData)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
                                SCSI_Inquiry_Response_t* const InquiryData)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
@@ -361,7 +366,8 @@ uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, c
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex)
+uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                              const uint8_t LUNIndex)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
@@ -396,7 +402,8 @@ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, co
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                   const uint8_t LUNIndex,
                                    SCSI_Capacity_t* const DeviceCapacity)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
                                    SCSI_Capacity_t* const DeviceCapacity)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
@@ -439,7 +446,8 @@ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                             const uint8_t LUNIndex,
                              SCSI_Request_Sense_Response_t* const SenseData)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
                              SCSI_Request_Sense_Response_t* const SenseData)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
@@ -475,7 +483,8 @@ uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, con
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                          const uint8_t LUNIndex,
                                           const bool PreventRemoval)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
                                           const bool PreventRemoval)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
@@ -511,8 +520,12 @@ uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInter
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress,
-                                 const uint8_t Blocks, const uint16_t BlockSize, void* BlockBuffer)
+uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                 const uint8_t LUNIndex,
+                                 const uint32_t BlockAddress,
+                                 const uint8_t Blocks,
+                                 const uint16_t BlockSize,
+                                 void* BlockBuffer)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
@@ -551,8 +564,12 @@ uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress,
-                                  const uint8_t Blocks, const uint16_t BlockSize, const void* BlockBuffer)
+uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                  const uint8_t LUNIndex,
+                                  const uint32_t BlockAddress,
+                                  const uint8_t Blocks,
+                                  const uint16_t BlockSize,
+                                  const void* BlockBuffer)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MSInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
index 881f54e..a6b32c7 100644 (file)
                         *
                         *  \return A value from the \ref MSHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref MSHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize,
+                       uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                      uint16_t ConfigDescriptorSize,
                                                       void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface
                                                       void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
-                       uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_t* const MaxLUNIndex)
-                                                 ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                 uint8_t* const MaxLUNIndex) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Retrieves the Mass Storage device's inquiry data for the specified LUN, indicating the device characteristics and
                         *  properties.
 
                        /** Retrieves the Mass Storage device's inquiry data for the specified LUN, indicating the device characteristics and
                         *  properties.
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED.
                         */
-                       uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+                       uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                      const uint8_t LUNIndex,
                                                       SCSI_Inquiry_Response_t* const InquiryData) ATTR_NON_NULL_PTR_ARG(1)
                                                       ATTR_NON_NULL_PTR_ARG(3);
 
                                                       SCSI_Inquiry_Response_t* const InquiryData) ATTR_NON_NULL_PTR_ARG(1)
                                                       ATTR_NON_NULL_PTR_ARG(3);
 
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
-                       uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex)
-                                                     ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                     const uint8_t LUNIndex) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Retrieves the total capacity of the attached USB Mass Storage device, in blocks, and block size.
                         *
 
                        /** Retrieves the total capacity of the attached USB Mass Storage device, in blocks, and block size.
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
-                       uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+                       uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                          const uint8_t LUNIndex,
                                                           SCSI_Capacity_t* const DeviceCapacity) ATTR_NON_NULL_PTR_ARG(1)
                                                           ATTR_NON_NULL_PTR_ARG(3);
                
                                                           SCSI_Capacity_t* const DeviceCapacity) ATTR_NON_NULL_PTR_ARG(1)
                                                           ATTR_NON_NULL_PTR_ARG(3);
                
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
-                       uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+                       uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                    const uint8_t LUNIndex,
                                                     SCSI_Request_Sense_Response_t* const SenseData) ATTR_NON_NULL_PTR_ARG(1)
                                                     ATTR_NON_NULL_PTR_ARG(3);
                
                                                     SCSI_Request_Sense_Response_t* const SenseData) ATTR_NON_NULL_PTR_ARG(1)
                                                     ATTR_NON_NULL_PTR_ARG(3);
                
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
-                       uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
+                       uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                                 const uint8_t LUNIndex,
                                                                  const bool PreventRemoval) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** Reads blocks of data from the attached Mass Storage device's medium.
                                                                  const bool PreventRemoval) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** Reads blocks of data from the attached Mass Storage device's medium.
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
-                       uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
-                                                        const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize,
+                       uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                        const uint8_t LUNIndex,
+                                                        const uint32_t BlockAddress,
+                                                        const uint8_t Blocks,
+                                                        const uint16_t BlockSize,
                                                         void* BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);
                
                        /** Writes blocks of data to the attached Mass Storage device's medium.
                                                         void* BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);
                
                        /** Writes blocks of data to the attached Mass Storage device's medium.
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready.
                         */
-                       uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,
-                                                         const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize,
+                       uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
+                                                         const uint8_t LUNIndex,
+                                                         const uint32_t BlockAddress,
+                                                         const uint8_t Blocks,
+                                                         const uint16_t BlockSize,
                                                          const void* BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);
 
                /* Inline Functions: */
                                                          const void* BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);
 
                /* Inline Functions: */
                                                                   const void* const BufferPtr) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, 
                                                                   const void* const BufferPtr) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, 
-                                                       MS_CommandBlockWrapper_t* const SCSICommandBlock, void* BufferPtr)
-                                                                       ATTR_NON_NULL_PTR_ARG(1)  ATTR_NON_NULL_PTR_ARG(2);
+                                                                      MS_CommandBlockWrapper_t* const SCSICommandBlock,
+                                                                      void* BufferPtr) ATTR_NON_NULL_PTR_ARG(1)  ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                         MS_CommandStatusWrapper_t* const SCSICommandStatus)
                                                                         ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                         MS_CommandStatusWrapper_t* const SCSICommandStatus)
                                                                         ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
index 428ea66..31ba6c6 100644 (file)
@@ -36,7 +36,8 @@
 #define  __INCLUDE_FROM_PRINTER_DRIVER
 #include "Printer.h"
 
 #define  __INCLUDE_FROM_PRINTER_DRIVER
 #include "Printer.h"
 
-uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint16_t ConfigDescriptorSize,
+uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                                 uint16_t ConfigDescriptorSize,
                                                             void* DeviceConfigDescriptor)
 {
        uint8_t FoundEndpoints = 0;
                                                             void* DeviceConfigDescriptor)
 {
        uint8_t FoundEndpoints = 0;
@@ -148,7 +149,8 @@ uint8_t PRNT_Host_SetBidirectionalMode(USB_ClassInfo_PRNT_Host_t* const PRNTInte
        return HOST_SENDCONTROL_Successful;
 }
 
        return HOST_SENDCONTROL_Successful;
 }
 
-uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint8_t* const PortStatus)
+uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                                uint8_t* const PortStatus)
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
@@ -180,7 +182,9 @@ uint8_t PRNT_Host_SoftReset(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
        return USB_Host_SendControlRequest(NULL);
 }
 
        return USB_Host_SendControlRequest(NULL);
 }
 
-uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, void* PrinterCommands, const uint16_t CommandSize)
+uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                           void* PrinterCommands,
+                           const uint16_t CommandSize)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -205,7 +209,9 @@ uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, v
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, char* DeviceIDString, const uint16_t BufferSize)
+uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                              char* const DeviceIDString,
+                              const uint16_t BufferSize)
 {
        uint8_t  ErrorCode = HOST_SENDCONTROL_Successful;
        uint16_t DeviceIDStringLength = 0;
 {
        uint8_t  ErrorCode = HOST_SENDCONTROL_Successful;
        uint16_t DeviceIDStringLength = 0;
index 83ec2c1..6bb6648 100644 (file)
                         *
                         *  \return A value from the \ref PRNTHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref PRNTHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint16_t ConfigDescriptorSize,
+                       uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                                                        uint16_t ConfigDescriptorSize,
                                                         void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
                        
                        /** Configures the printer to enable Bidirectional mode, if it is not already in this mode. This should be called
                                                         void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
                        
                        /** Configures the printer to enable Bidirectional mode, if it is not already in this mode. This should be called
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
-                       uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, uint8_t* const PortStatus)
+                       uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                                                       uint8_t* const PortStatus)
                                                        ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Soft-resets the attached printer, readying it for new commands.
                                                        ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Soft-resets the attached printer, readying it for new commands.
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, void* PrinterCommands, 
+                       uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                                                  void* PrinterCommands, 
                                                   const uint16_t CommandSize) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Retrieves the attached printer device's ID string, formatted according to IEEE 1284. This string is sent as a
                                                   const uint16_t CommandSize) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Retrieves the attached printer device's ID string, formatted according to IEEE 1284. This string is sent as a
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo, char* DeviceIDString,
+                       uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
+                                                     char* const DeviceIDString,
                                                      const uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                /* Inline Functions: */
                                                      const uint16_t BufferSize) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                /* Inline Functions: */
index bd6c863..b189535 100644 (file)
@@ -36,8 +36,9 @@
 #define  __INCLUDE_FROM_RNDIS_DRIVER
 #include "RNDIS.h"
 
 #define  __INCLUDE_FROM_RNDIS_DRIVER
 #include "RNDIS.h"
 
-uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, uint16_t ConfigDescriptorSize,
-                                void* ConfigDescriptorData)
+uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                  uint16_t ConfigDescriptorSize,
+                                  void* ConfigDescriptorData)
 {
        uint8_t FoundEndpoints = 0;
 
 {
        uint8_t FoundEndpoints = 0;
 
@@ -195,7 +196,8 @@ static uint8_t DCOMP_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDe
 }
 
 static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
 }
 
 static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
-                                             void* Buffer, const uint16_t Length)
+                                             void* Buffer,
+                                             const uint16_t Length)
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
@@ -211,7 +213,8 @@ static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const R
 }
 
 static uint8_t RNDIS_GetEncapsulatedResponse(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
 }
 
 static uint8_t RNDIS_GetEncapsulatedResponse(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
-                                             void* Buffer, const uint16_t Length)
+                                             void* Buffer,
+                                             const uint16_t Length)
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
@@ -287,8 +290,10 @@ uint8_t RNDIS_Host_InitializeDevice(USB_ClassInfo_RNDIS_Host_t* const RNDISInter
        return HOST_SENDCONTROL_Successful;
 }
 
        return HOST_SENDCONTROL_Successful;
 }
 
-uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, const uint32_t Oid,
-                                    void* Buffer, const uint16_t Length)
+uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                    const uint32_t Oid,
+                                    void* Buffer,
+                                    const uint16_t Length)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -329,8 +334,10 @@ uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInter
        return HOST_SENDCONTROL_Successful;
 }
 
        return HOST_SENDCONTROL_Successful;
 }
 
-uint8_t RNDIS_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, const uint32_t Oid,
-                                      void* Buffer, const uint16_t MaxLength)
+uint8_t RNDIS_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                      const uint32_t Oid,
+                                      void* Buffer,
+                                      const uint16_t MaxLength)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -390,7 +397,9 @@ bool RNDIS_Host_IsPacketReceived(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfac
        return PacketWaiting;
 }
 
        return PacketWaiting;
 }
 
-uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t* const PacketLength)
+uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                              void* Buffer,
+                              uint16_t* const PacketLength)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -434,7 +443,9 @@ uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceIn
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, const uint16_t PacketLength)
+uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                              void* Buffer,
+                              const uint16_t PacketLength)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
index 1695d67..34bbbb1 100644 (file)
 
                /* Macros: */
                        /** Additional error code for RNDIS functions when a device returns a logical command failure. */
 
                /* Macros: */
                        /** Additional error code for RNDIS functions when a device returns a logical command failure. */
-                       #define RNDIS_COMMAND_FAILED                  0xC0      
+                       #define RNDIS_COMMAND_FAILED                  0xC0
 
                /* Function Prototypes: */
                        /** Host interface configuration routine, to configure a given RNDIS host interface instance using the Configuration
 
                /* Function Prototypes: */
                        /** Host interface configuration routine, to configure a given RNDIS host interface instance using the Configuration
                         *
                         *  \return A value from the \ref RNDISHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref RNDISHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, uint16_t ConfigDescriptorSize,
-                                                       void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
+                       uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                                         uint16_t ConfigDescriptorSize,
+                                                         void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Sends a RNDIS KEEPALIVE command to the device, to ensure that it does not enter standby mode after periods
                         *  of long inactivity.
 
                        /** Sends a RNDIS KEEPALIVE command to the device, to ensure that it does not enter standby mode after periods
                         *  of long inactivity.
                         *  \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a
                         *          logical command failure.
                         */
                         *  \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_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, const uint32_t Oid, void* Buffer,
-                                                           const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)  ATTR_NON_NULL_PTR_ARG(3);
+                       uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                                           const uint32_t Oid,
+                                                           void* Buffer,
+                                                           const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Gets a given RNDIS property of an attached RNDIS device.
                         *
 
                        /** Gets a given RNDIS property of an attached RNDIS device.
                         *
                         *  \return A value from the USB_Host_SendControlErrorCodes_t enum or RNDIS_COMMAND_FAILED if the device returned a
                         *          logical command failure.
                         */
                         *  \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_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, const uint32_t Oid, void* Buffer,
+                       uint8_t RNDIS_Host_QueryRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                                             const uint32_t Oid,
+                                                             void* Buffer,
                                                              const uint16_t MaxLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Determines if a packet is currently waiting for the host to read in and process.
                                                              const uint16_t MaxLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Determines if a packet is currently waiting for the host to read in and process.
                         *
                         *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, uint16_t* const PacketLength)
-                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2) ATTR_NON_NULL_PTR_ARG(3);
+                       uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                                     void* Buffer,
+                                                     uint16_t* const PacketLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2)
+                                                     ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.
                         *
 
                        /** Sends the given packet to the attached RNDIS device, after adding a RNDIS packet message header.
                         *
                         *
                         *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, void* Buffer, const uint16_t PacketLength)
-                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+                       uint8_t RNDIS_Host_SendPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
+                                                     void* Buffer,
+                                                     const uint16_t PacketLength) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                /* Inline Functions: */
                        /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should
 
                /* Inline Functions: */
                        /** General management task for a given RNDIS host class interface, required for the correct operation of the interface. This should
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_RNDIS_CLASS_HOST_C)
                                static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_RNDIS_CLASS_HOST_C)
                                static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo, 
-                                                                            void* Buffer, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
+                                                                            void* Buffer,
+                                                                            const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
                                                                             ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t RNDIS_GetEncapsulatedResponse(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
                                                                             ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t RNDIS_GetEncapsulatedResponse(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
-                                                                            void* Buffer, const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
+                                                                            void* Buffer,
+                                                                            const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
                                                                             ATTR_NON_NULL_PTR_ARG(2);
 
                                static uint8_t DCOMP_RNDIS_Host_NextRNDISControlInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t DCOMP_RNDIS_Host_NextRNDISDataInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t DCOMP_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
                                                                             ATTR_NON_NULL_PTR_ARG(2);
 
                                static uint8_t DCOMP_RNDIS_Host_NextRNDISControlInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t DCOMP_RNDIS_Host_NextRNDISDataInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t DCOMP_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                       #endif  
+                       #endif
        #endif
        #endif
-                               
+
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
                        }
        /* Disable C linkage for C++ Compilers: */
                #if defined(__cplusplus)
                        }
index 7eea01f..42c3fec 100644 (file)
@@ -36,7 +36,8 @@
 #define  __INCLUDE_FROM_SI_DRIVER
 #include "StillImage.h"
 
 #define  __INCLUDE_FROM_SI_DRIVER
 #include "StillImage.h"
 
-uint8_t SImage_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, uint16_t ConfigDescriptorSize,
+uint8_t SImage_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                   uint16_t ConfigDescriptorSize,
                                    void* DeviceConfigDescriptor)
 {
        uint8_t  FoundEndpoints = 0;
                                    void* DeviceConfigDescriptor)
 {
        uint8_t  FoundEndpoints = 0;
@@ -144,7 +145,8 @@ uint8_t DCOMP_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor)
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
-uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)
+uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                    SI_PIMA_Container_t* const PIMAHeader)
 {
        uint8_t ErrorCode;
        
 {
        uint8_t ErrorCode;
        
@@ -174,7 +176,8 @@ uint8_t SImage_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceIn
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t SImage_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)
+uint8_t SImage_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                       SI_PIMA_Container_t* const PIMAHeader)
 {
        uint16_t TimeoutMSRem = COMMAND_DATA_TIMEOUT_MS;
 
 {
        uint16_t TimeoutMSRem = COMMAND_DATA_TIMEOUT_MS;
 
@@ -238,7 +241,9 @@ uint8_t SImage_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfac
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer, const uint16_t Bytes)
+uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                             void* Buffer,
+                             const uint16_t Bytes)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -256,7 +261,9 @@ uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, voi
        return ErrorCode;
 }
 
        return ErrorCode;
 }
 
-uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer, const uint16_t Bytes)
+uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                             void* Buffer,
+                             const uint16_t Bytes)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -273,7 +280,7 @@ uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, voi
        return ErrorCode;
 }
 
        return ErrorCode;
 }
 
-bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* SIInterfaceInfo)
+bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
 {
        bool IsEventReceived = false;
 
 {
        bool IsEventReceived = false;
 
@@ -291,7 +298,8 @@ bool SImage_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* SIInterfaceInfo)
        return IsEventReceived;
 }
 
        return IsEventReceived;
 }
 
-uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, SI_PIMA_Container_t* const PIMAHeader)
+uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                       SI_PIMA_Container_t* const PIMAHeader)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
@@ -370,8 +378,10 @@ uint8_t SImage_Host_CloseSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
        return PIPE_RWSTREAM_NoError;
 }
 
        return PIPE_RWSTREAM_NoError;
 }
 
-uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, const uint16_t Operation,
-                                const uint8_t TotalParams, uint32_t* const Params)
+uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                const uint16_t Operation,
+                                const uint8_t TotalParams,
+                                uint32_t* const Params)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
          return HOST_SENDCONTROL_DeviceDisconnected;
index 5a14359..a15091b 100644 (file)
                         *
                         *  \return A value from the \ref SIHost_EnumerationFailure_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref SIHost_EnumerationFailure_ErrorCodes_t enum.
                         */
-                       uint8_t SImage_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, uint16_t ConfigDescriptorSize,
-                                               void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
+                       uint8_t SImage_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                                          uint16_t ConfigDescriptorSize,
+                                                          void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);
 
                        /** Opens a new PIMA session with the attached device. This should be used before any session-orientated PIMA commands
                         *  are issued to the device. Only one session can be open at the one time.
 
                        /** Opens a new PIMA session with the attached device. This should be used before any session-orientated PIMA commands
                         *  are issued to the device. Only one session can be open at the one time.
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
                         *          returned a logical command failure.
                         */
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum, or \ref SI_ERROR_LOGICAL_CMD_FAILED if the device
                         *          returned a logical command failure.
                         */
-                       uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, const uint16_t Operation,
-                                                       const uint8_t TotalParams, uint32_t* const Params) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t SImage_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                                       const uint16_t Operation,
+                                                       const uint8_t TotalParams,
+                                                       uint32_t* const Params) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Receives and checks a response block from the attached PIMA device, once a command has been issued and all data
                         *  associated with the command has been transferred.
 
                        /** Receives and checks a response block from the attached PIMA device, once a command has been issued and all data
                         *  associated with the command has been transferred.
-                        *      
+                        *
                         *  \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the
                         *       call will fail.
                         *
                         *  \pre This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the
                         *       call will fail.
                         *
                         *          returned a logical command failure.
                         */
                        uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
                         *          returned a logical command failure.
                         */
                        uint8_t SImage_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
-                                                                  SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
+                                                              SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
                                                               ATTR_NON_NULL_PTR_ARG(2);
                        
                        /** Sends arbitrary data to the attached device, for use in the data phase of PIMA commands which require data
                                                               ATTR_NON_NULL_PTR_ARG(2);
                        
                        /** Sends arbitrary data to the attached device, for use in the data phase of PIMA commands which require data
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer,
+                       uint8_t SImage_Host_SendData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                                    void* Buffer,
                                                     const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Receives arbitrary data from the attached device, for use in the data phase of PIMA commands which require data
                                                     const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Receives arbitrary data from the attached device, for use in the data phase of PIMA commands which require data
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo, void* Buffer,
+                       uint8_t SImage_Host_ReadData(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
+                                                    void* Buffer,
                                                     const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                
                /* Inline Functions: */
                                                     const uint16_t Bytes) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                
                /* Inline Functions: */
index 9d4a2b3..61dda2c 100644 (file)
                         *  }
                         *  \endcode
                         */
                         *  }
                         *  \endcode
                         */
-                       uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine);
+                       uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
+                                                         void** const CurrConfigLoc,
+                                                         ConfigComparatorPtr_t const ComparatorRoutine);
 
                /* Inline Functions: */
                        /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
 
                /* Inline Functions: */
                        /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
                         * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
                         * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
                         */
                         * \param[in,out] BytesRem       Pointer to the number of bytes remaining of the configuration descriptor.
                         * \param[in,out] CurrConfigLoc  Pointer to the current descriptor inside the configuration descriptor.
                         */
-                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, void** CurrConfigLoc) 
-                                                                ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);                                                                       
-                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem, void** CurrConfigLoc)
+                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
+                                                                void** CurrConfigLoc) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);                                                                         
+                       static inline void USB_GetNextDescriptor(uint16_t* const BytesRem,
+                                                                void** CurrConfigLoc)
                        {
                                uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
                                
                        {
                                uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
                                
index ab63c7b..42b0ec7 100644 (file)
                         *  \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
                         *        \ref Group_USBManagement documentation).
                         */
                         *  \note This event does not exist if the USB_DEVICE_ONLY token is supplied to the compiler (see
                         *        \ref Group_USBManagement documentation).
                         */
-                       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);
 
                        /** Event for USB device enumeration completion. This event fires when a the USB interface is
                         *  in host mode and an attached USB device has been completely enumerated and is ready to be
 
                        /** Event for USB device enumeration completion. This event fires when a the USB interface is
                         *  in host mode and an attached USB device has been completely enumerated and is ready to be
                                        void EVENT_USB_Host_DeviceAttached(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Host_DeviceUnattached(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Host_DeviceEnumerationComplete(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Host_DeviceAttached(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Host_DeviceUnattached(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Host_DeviceEnumerationComplete(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
-                                       void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
-                                                                              ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
+                                       void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
+                                                                const uint8_t SubErrorCode)
+                                                                                   ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                #endif
 
                                #if defined(USB_CAN_BE_DEVICE)
                                #endif
 
                                #if defined(USB_CAN_BE_DEVICE)
index cc6dc41..182cd69 100644 (file)
@@ -36,7 +36,7 @@
 #define  __INCLUDE_FROM_HOSTSTDREQ_C
 #include "HostStandardReq.h"
 
 #define  __INCLUDE_FROM_HOSTSTDREQ_C
 #include "HostStandardReq.h"
 
-uint8_t USB_Host_SendControlRequest(void* BufferPtr)
+uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
 {
        uint8_t* HeaderStream   = (uint8_t*)&USB_ControlRequest;
        uint8_t* DataStream     = (uint8_t*)BufferPtr;
 {
        uint8_t* HeaderStream   = (uint8_t*)&USB_ControlRequest;
        uint8_t* DataStream     = (uint8_t*)BufferPtr;
index 4a527fa..358f3d3 100644 (file)
@@ -91,7 +91,7 @@
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
-                       uint8_t USB_Host_SendControlRequest(void* BufferPtr);
+                       uint8_t USB_Host_SendControlRequest(void* const BufferPtr);
                        
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                        
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
index 02dd8cf..c6c2e9f 100644 (file)
                        void USB_Device_SendRemoteWakeup(void);
                                                        
                /* Pseudo-Function Macros: */
                        void USB_Device_SendRemoteWakeup(void);
                                                        
                /* Pseudo-Function Macros: */
-                       #if defined(__DOXYGEN__)                                
+                       #if defined(__DOXYGEN__)
                                /** Enables the device mode Start Of Frame events. When enabled, this causes the
                                 *  \ref EVENT_USB_Device_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus,
                                 *  at the start of each USB frame when enumerated in device mode.
                                /** Enables the device mode Start Of Frame events. When enabled, this causes the
                                 *  \ref EVENT_USB_Device_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus,
                                 *  at the start of each USB frame when enumerated in device mode.
                         *
                         *  \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise.
                         */
                         *
                         *  \return Size in bytes of the descriptor if it exists, zero or \ref NO_DESCRIPTOR otherwise.
                         */
-                       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
                        #if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
                                                            , uint8_t* MemoryAddressSpace
                        #if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
                                                            , uint8_t* MemoryAddressSpace
-                       #endif                  
-                                                           )
-                                                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+                       #endif
+                                                           ) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
-               /* Macros: */           
+               /* Macros: */
                        #define USB_Device_SetLowSpeed()          MACROS{ UDCON |=  (1 << LSM);   }MACROE
                        #define USB_Device_SetFullSpeed()         MACROS{ UDCON &= ~(1 << LSM);   }MACROE
                        
                        #define USB_Device_SetLowSpeed()          MACROS{ UDCON |=  (1 << LSM);   }MACROE
                        #define USB_Device_SetFullSpeed()         MACROS{ UDCON &= ~(1 << LSM);   }MACROE
                        
index d22a50d..4eecdc5 100644 (file)
@@ -45,7 +45,9 @@ uint8_t Endpoint_BytesToEPSizeMaskDynamic(const uint16_t Size)
        return Endpoint_BytesToEPSizeMask(Size);
 }
 
        return Endpoint_BytesToEPSizeMask(Size);
 }
 
-bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number, const uint8_t UECFG0XData, const uint8_t UECFG1XData)
+bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
+                                    const uint8_t UECFG0XData,
+                                    const uint8_t UECFG1XData)
 {
        Endpoint_SelectEndpoint(Number);
        Endpoint_EnableEndpoint();
 {
        Endpoint_SelectEndpoint(Number);
        Endpoint_EnableEndpoint();
@@ -115,7 +117,7 @@ uint8_t Endpoint_WaitUntilReady(void)
                else
                {
                        if (Endpoint_IsOUTReceived())
                else
                {
                        if (Endpoint_IsOUTReceived())
-                         return ENDPOINT_READYWAIT_NoError;            
+                         return ENDPOINT_READYWAIT_NoError;
                }
                
                if (USB_DeviceState == DEVICE_STATE_Unattached)
                }
                
                if (USB_DeviceState == DEVICE_STATE_Unattached)
index 8ed794d..88aae1e 100644 (file)
                                         *  be used in the device. Different USB AVR models support different amounts of endpoints,
                                         *  this value reflects the maximum number of endpoints for the currently selected AVR model.
                                         */
                                         *  be used in the device. Different USB AVR models support different amounts of endpoints,
                                         *  this value reflects the maximum number of endpoints for the currently selected AVR model.
                                         */
-                                       #define ENDPOINT_TOTAL_ENDPOINTS          7
+                                       #define ENDPOINT_TOTAL_ENDPOINTS      7
                                #else
                                #else
-                                       #define ENDPOINT_TOTAL_ENDPOINTS          5                     
+                                       #define ENDPOINT_TOTAL_ENDPOINTS      5
                                #endif
                        #else
                                #endif
                        #else
-                               #define ENDPOINT_TOTAL_ENDPOINTS              1
+                               #define ENDPOINT_TOTAL_ENDPOINTS          1
                        #endif
                        
                /* Pseudo-Function Macros: */
                        #endif
                        
                /* Pseudo-Function Macros: */
                                 *
                                 *  \param[in] EndpointNumber Endpoint number to select.
                                 */
                                 *
                                 *  \param[in] EndpointNumber Endpoint number to select.
                                 */
-                               static inline void Endpoint_SelectEndpoint(uint8_t EndpointNumber);
+                               static inline void Endpoint_SelectEndpoint(const uint8_t EndpointNumber);
                                
                                /** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's
                                 *  In and Out pointers to the bank's contents.
                                 *
                                 *  \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset.
                                 */
                                
                                /** Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's
                                 *  In and Out pointers to the bank's contents.
                                 *
                                 *  \param[in] EndpointNumber Endpoint number whose FIFO buffers are to be reset.
                                 */
-                               static inline void Endpoint_ResetFIFO(uint8_t EndpointNumber);
+                               static inline void Endpoint_ResetFIFO(const uint8_t EndpointNumber);
                                
                                /** Enables the currently selected endpoint so that data can be sent and received through it to
                                 *  and from a host.
                                
                                /** Enables the currently selected endpoint so that data can be sent and received through it to
                                 *  and from a host.
                                 *
                                 *  \return Boolean true if the specified endpoint has interrupted, false otherwise.
                                 */
                                 *
                                 *  \return Boolean true if the specified endpoint has interrupted, false otherwise.
                                 */
-                               static inline bool Endpoint_HasEndpointInterrupted(uint8_t EndpointNumber);
+                               static inline bool Endpoint_HasEndpointInterrupted(const uint8_t EndpointNumber);
                                
                                /** Determines if the selected IN endpoint is ready for a new packet.
                                 *
                                
                                /** Determines if the selected IN endpoint is ready for a new packet.
                                 *
                                 *
                                 *  \ingroup Group_EndpointPacketManagement
                                 *
                                 *
                                 *  \ingroup Group_EndpointPacketManagement
                                 *
-                                *  \note This is not applicable for non CONTROL type endpoints.                         
+                                *  \note This is not applicable for non CONTROL type endpoints. 
                                 */
                                static inline void Endpoint_ClearSETUP(void);
                                
                                 */
                                static inline void Endpoint_ClearSETUP(void);
                                
                                 *
                                 *  \param[in] DirectionMask  New endpoint direction, as a ENDPOINT_DIR_* mask.
                                 */
                                 *
                                 *  \param[in] DirectionMask  New endpoint direction, as a ENDPOINT_DIR_* mask.
                                 */
-                               static inline void Endpoint_SetEndpointDirection(uint8_t DirectionMask);
+                               static inline void Endpoint_SetEndpointDirection(const uint8_t DirectionMask);
                        #else
                                #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
                                        #define Endpoint_BytesInEndpoint()        UEBCX
                                #elif defined(USB_SERIES_4_AVR)
                        #else
                                #if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
                                        #define Endpoint_BytesInEndpoint()        UEBCX
                                #elif defined(USB_SERIES_4_AVR)
-                                       #define Endpoint_BytesInEndpoint()        (((uint16_t)UEBCHX << 8) | UEBCLX)                            
+                                       #define Endpoint_BytesInEndpoint()        (((uint16_t)UEBCHX << 8) | UEBCLX)
                                #elif defined(USB_SERIES_2_AVR)
                                        #define Endpoint_BytesInEndpoint()        UEBCLX
                                #endif
                                #elif defined(USB_SERIES_2_AVR)
                                        #define Endpoint_BytesInEndpoint()        UEBCLX
                                #endif
                        #if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
                                #define __CALLBACK_PARAM     , StreamCallbackPtr_t Callback
                        #else
                        #if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
                                #define __CALLBACK_PARAM     , StreamCallbackPtr_t Callback
                        #else
-                               #define __CALLBACK_PARAM                        
+                               #define __CALLBACK_PARAM
                        #endif
                
                        /** Configures the specified endpoint number with the given endpoint type, direction, bank size
                        #endif
                
                        /** Configures the specified endpoint number with the given endpoint type, direction, bank size
                         *
                         *  \return Boolean true if the configuration succeeded, false otherwise.
                         */
                         *
                         *  \return Boolean true if the configuration succeeded, false otherwise.
                         */
-                       bool Endpoint_ConfigureEndpoint(const uint8_t  Number, const uint8_t Type, const uint8_t Direction,
-                                                       const uint16_t Size, const uint8_t Banks);
+                       bool Endpoint_ConfigureEndpoint(const uint8_t  Number,
+                                                       const uint8_t Type,
+                                                       const uint8_t Direction,
+                                                       const uint16_t Size,
+                                                       const uint8_t Banks);
 
                        /** Spin-loops until the currently selected non-control endpoint is ready for the next packet of data
                         *  to be read or written to it.
 
                        /** Spin-loops until the currently selected non-control endpoint is ready for the next packet of data
                         *  to be read or written to it.
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Discard_Stream(uint16_t Length __CALLBACK_PARAM);
+                       uint8_t Endpoint_Discard_Stream(uint16_t Length
+                                                       __CALLBACK_PARAM);
 
                        /** Writes the given number of bytes to the endpoint from the given buffer in little endian,
                         *  sending full packets to the host as needed. The last packet filled is not automatically sent;
 
                        /** Writes the given number of bytes to the endpoint from the given buffer in little endian,
                         *  sending full packets to the host as needed. The last packet filled is not automatically sent;
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Stream_LE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Stream_LE(const void* Buffer,
+                                                        uint16_t Length
+                                                        __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE().
                         *
 
                        /** EEPROM buffer source version of \ref Endpoint_Write_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_EStream_LE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_EStream_LE(const void* Buffer,
+                                                         uint16_t Length
+                                                         __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE().
                         *
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_PStream_LE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_PStream_LE(const void* Buffer,
+                                                         uint16_t Length
+                                                         __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Writes the given number of bytes to the endpoint from the given buffer in big endian,
                         *  sending full packets to the host as needed. The last packet filled is not automatically sent;
 
                        /** Writes the given number of bytes to the endpoint from the given buffer in big endian,
                         *  sending full packets to the host as needed. The last packet filled is not automatically sent;
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Stream_BE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Stream_BE(const void* Buffer,
+                                                        uint16_t Length
+                                                        __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE().
                         *
 
                        /** EEPROM buffer source version of \ref Endpoint_Write_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_EStream_BE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_EStream_BE(const void* Buffer,
+                                                         uint16_t Length
+                                                         __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE().
                         *
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_PStream_BE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_PStream_BE(const void* Buffer,
+                                                         uint16_t Length
+                                                         __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Reads the given number of bytes from the endpoint from the given buffer in little endian,
                         *  discarding fully read packets from the host as needed. The last packet is not automatically
 
                        /** Reads the given number of bytes from the endpoint from the given buffer in little endian,
                         *  discarding fully read packets from the host as needed. The last packet is not automatically
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_Stream_LE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Read_Stream_LE(void* Buffer,
+                                                       uint16_t Length
+                                                       __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Endpoint_Read_Stream_LE().
                         *
 
                        /** EEPROM buffer source version of \ref Endpoint_Read_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_EStream_LE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Read_EStream_LE(void* Buffer,
+                                                        uint16_t Length
+                                                        __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** Reads the given number of bytes from the endpoint from the given buffer in big endian,
                         *  discarding fully read packets from the host as needed. The last packet is not automatically
                        
                        /** Reads the given number of bytes from the endpoint from the given buffer in big endian,
                         *  discarding fully read packets from the host as needed. The last packet is not automatically
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_Stream_BE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Read_Stream_BE(void* Buffer,
+                                                       uint16_t Length
+                                                       __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Endpoint_Read_Stream_BE().
                         *
 
                        /** EEPROM buffer source version of \ref Endpoint_Read_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_EStream_BE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Read_EStream_BE(void* Buffer,
+                                                        uint16_t Length
+                                                        __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,
                         *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
 
                        /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,
                         *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.
                         *
 
                        /** EEPROM buffer source version of Endpoint_Write_Control_Stream_LE.
                         *
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Control_EStream_LE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Control_EStream_LE(const void* Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE().
                         *
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Control_PStream_LE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Control_PStream_LE(const void* Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
                         *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
 
                        /** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,
                         *  sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Control_Stream_BE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Control_Stream_BE(const void* Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().
                         *
 
                        /** EEPROM buffer source version of \ref Endpoint_Write_Control_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Control_EStream_BE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Control_EStream_BE(const void* Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().
                         *
 
                        /** FLASH buffer source version of \ref Endpoint_Write_Control_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Write_Control_PStream_BE(const void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Write_Control_PStream_BE(const void* Buffer,
+                                                                 uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
                         *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
 
                        /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,
                         *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().
                         *
 
                        /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_Control_EStream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Endpoint_Read_Control_EStream_LE(void* Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
                         *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
 
                        /** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,
                         *  discarding fully read packets from the host as needed. The device IN acknowledgement is not
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);                
+                       uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer,
+                                                               uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().
                         *
                        
                        /** EEPROM buffer source version of \ref Endpoint_Read_Control_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Endpoint_ControlStream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Endpoint_Read_Control_EStream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);               
+                       uint8_t Endpoint_Read_Control_EStream_BE(void* Buffer,
+                                                                uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                                                                        (__builtin_constant_p(Size) ?       \
                                                                         Endpoint_BytesToEPSizeMask(Size) : \
                                                                         Endpoint_BytesToEPSizeMaskDynamic(Size))))
                                                                        (__builtin_constant_p(Size) ?       \
                                                                         Endpoint_BytesToEPSizeMask(Size) : \
                                                                         Endpoint_BytesToEPSizeMaskDynamic(Size))))
-                                                                                                       
+                       
                /* Function Prototypes: */
                        void    Endpoint_ClearEndpoints(void);
                        uint8_t Endpoint_BytesToEPSizeMaskDynamic(const uint16_t Size);
                /* Function Prototypes: */
                        void    Endpoint_ClearEndpoints(void);
                        uint8_t Endpoint_BytesToEPSizeMaskDynamic(const uint16_t Size);
-                       bool    Endpoint_ConfigureEndpoint_Prv(const uint8_t Number, const uint8_t UECFG0XData, const uint8_t UECFG1XData);
+                       bool    Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
+                                                              const uint8_t UECFG0XData,
+                                                              const uint8_t UECFG1XData);
                        
                /* Inline Functions: */
                        static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
                        
                /* Inline Functions: */
                        static inline uint8_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
index f00e6dd..5b7a714 100644 (file)
@@ -305,7 +305,9 @@ uint8_t USB_Host_GetDeviceDescriptor(void* const DeviceDescriptorPtr)
        return USB_Host_SendControlRequest(DeviceDescriptorPtr);
 }
 
        return USB_Host_SendControlRequest(DeviceDescriptorPtr);
 }
 
-uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index, void* const Buffer, const uint8_t BufferLength)
+uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
+                                           void* const Buffer,
+                                           const uint8_t BufferLength)
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
 {
        USB_ControlRequest = (USB_Request_Header_t)
                {
index 04d702e..d83431b 100644 (file)
                                #define USB_Host_SuspendBus()              MACROS{ UHCON &= ~(1 << SOFEN);          }MACROE 
                                
                                #define USB_Host_IsBusSuspended()                ((UHCON &   (1 << SOFEN)) ? false : true)
                                #define USB_Host_SuspendBus()              MACROS{ UHCON &= ~(1 << SOFEN);          }MACROE 
                                
                                #define USB_Host_IsBusSuspended()                ((UHCON &   (1 << SOFEN)) ? false : true)
-                       
+
                                #define USB_Host_IsDeviceFullSpeed()             ((USBSTA &  (1 << SPEED)) ? true : false)
 
                                #define USB_Host_IsRemoteWakeupSent()            ((UHINT &   (1 << RXRSMI)) ? true : false)
                                #define USB_Host_IsDeviceFullSpeed()             ((USBSTA &  (1 << SPEED)) ? true : false)
 
                                #define USB_Host_IsRemoteWakeupSent()            ((UHINT &   (1 << RXRSMI)) ? true : false)
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
-                       uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index, void* const Buffer, const uint8_t BufferLength);
+                       uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
+                                                                  void* const Buffer,
+                                                                  const uint8_t BufferLength);
                        
                        /** Clears a stall condition on the given pipe, via a ClearFeature request to the attached device.
                         *
                        
                        /** Clears a stall condition on the given pipe, via a ClearFeature request to the attached device.
                         *
                         *  \param[in] EndpointIndex  Index of the endpoint to clear.
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         *  \param[in] EndpointIndex  Index of the endpoint to clear.
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
-                        */                     
+                        */
                        uint8_t USB_Host_ClearPipeStall(uint8_t EndpointIndex);
 
                /* Enums: */
                        uint8_t USB_Host_ClearPipeStall(uint8_t EndpointIndex);
 
                /* Enums: */
                                                                      */
                                HOST_ENUMERROR_ControlError     = 3, /**< One of the enumeration control requests failed to
                                                                      *   complete successfully.
                                                                      */
                                HOST_ENUMERROR_ControlError     = 3, /**< One of the enumeration control requests failed to
                                                                      *   complete successfully.
-                                                                                                         */
+                                                                     */
                                HOST_ENUMERROR_PipeConfigError  = 4, /**< The default control pipe (address 0) failed to
                                                                      *   configure correctly.
                                                                      */
                                HOST_ENUMERROR_PipeConfigError  = 4, /**< The default control pipe (address 0) failed to
                                                                      *   configure correctly.
                                                                      */
index 0218998..0e32346 100644 (file)
                                 *  \param[in] SRPTypeMask  Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or
                                 *                          \ref USB_OTG_STP_DATA.
                                 */
                                 *  \param[in] SRPTypeMask  Mask indicating the type of SRP to use, either \ref USB_OTG_SRP_VBUS or
                                 *                          \ref USB_OTG_STP_DATA.
                                 */
-                               static inline void USB_OTG_Device_InitiateSRP(uint8_t SRPTypeMask);
+                               static inline void USB_OTG_Device_InitiateSRP(const uint8_t SRPTypeMask);
 
                                /** Accepts a HNP from a connected device, indicating that both devices should exchange
                                 *  device/host roles.
 
                                /** Accepts a HNP from a connected device, indicating that both devices should exchange
                                 *  device/host roles.
index 6f1d516..f70f018 100644 (file)
 
 uint8_t USB_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;
 
 
 uint8_t USB_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;
 
-bool Pipe_ConfigurePipe(const uint8_t Number, const uint8_t Type, const uint8_t Token, const uint8_t EndpointNumber,
-                                               const uint16_t Size, const uint8_t Banks)
+bool Pipe_ConfigurePipe(const uint8_t Number,
+                        const uint8_t Type,
+                        const uint8_t Token,
+                        const uint8_t EndpointNumber,
+                        const uint16_t Size,
+                        const uint8_t Banks)
 {
        Pipe_SelectPipe(Number);
        Pipe_EnablePipe();
 {
        Pipe_SelectPipe(Number);
        Pipe_EnablePipe();
index da296dc..0714aa8 100644 (file)
                        #if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
                                #define __CALLBACK_PARAM     , StreamCallbackPtr_t Callback
                        #else
                        #if !defined(NO_STREAM_CALLBACKS) || defined(__DOXYGEN__)
                                #define __CALLBACK_PARAM     , StreamCallbackPtr_t Callback
                        #else
-                               #define __CALLBACK_PARAM                        
+                               #define __CALLBACK_PARAM
                        #endif
 
                        /** Configures the specified pipe number with the given pipe type, token, target endpoint number in the
                        #endif
 
                        /** Configures the specified pipe number with the given pipe type, token, target endpoint number in the
                         *
                         *  \return Boolean true if the configuration is successful, false otherwise.
                         */
                         *
                         *  \return Boolean true if the configuration is successful, false otherwise.
                         */
-                       bool Pipe_ConfigurePipe(const uint8_t  Number, const uint8_t Type, const uint8_t Token, const uint8_t EndpointNumber,
-                                               const uint16_t Size, const uint8_t Banks);
+                       bool Pipe_ConfigurePipe(const uint8_t  Number,
+                                               const uint8_t Type,
+                                               const uint8_t Token,
+                                               const uint8_t EndpointNumber,
+                                               const uint16_t Size,
+                                               const uint8_t Banks);
 
                        /** Spin-loops until the currently selected non-control pipe is ready for the next packed of data to be read 
                         *  or written to it, aborting in the case of an error condition (such as a timeout or device disconnect).
 
                        /** Spin-loops until the currently selected non-control pipe is ready for the next packed of data to be read 
                         *  or written to it, aborting in the case of an error condition (such as a timeout or device disconnect).
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Discard_Stream(uint16_t Length __CALLBACK_PARAM);
+                       uint8_t Pipe_Discard_Stream(uint16_t Length
+                                                   __CALLBACK_PARAM);
 
                        /** Writes the given number of bytes to the pipe from the given buffer in little endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
 
                        /** Writes the given number of bytes to the pipe from the given buffer in little endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Write_Stream_LE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);                            
+                       uint8_t Pipe_Write_Stream_LE(const void* Buffer,
+                                                    uint16_t Length
+                                                    __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Pipe_Write_Stream_LE().
                         *
 
                        /** EEPROM buffer source version of \ref Pipe_Write_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Write_EStream_LE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Write_EStream_LE(const void* Buffer,
+                                                     uint16_t Length
+                                                     __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** FLASH buffer source version of \ref Pipe_Write_Stream_LE().
                         *
                        
                        /** FLASH buffer source version of \ref Pipe_Write_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Write_PStream_LE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
-                                               
+                       uint8_t Pipe_Write_PStream_LE(const void* Buffer,
+                                                     uint16_t Length
+                                                     __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       
                        /** Writes the given number of bytes to the pipe from the given buffer in big endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
                         *  the user is responsible for manually sending the last written packet to the host via the
                        /** Writes the given number of bytes to the pipe from the given buffer in big endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
                         *  the user is responsible for manually sending the last written packet to the host via the
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Write_Stream_BE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Write_Stream_BE(const void* Buffer,
+                                                    uint16_t Length
+                                                    __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Pipe_Write_Stream_BE().
                         *
 
                        /** EEPROM buffer source version of \ref Pipe_Write_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Write_EStream_BE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Write_EStream_BE(const void* Buffer,
+                                                     uint16_t Length
+                                                     __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** FLASH buffer source version of \ref Pipe_Write_Stream_BE().
                         *
                        
                        /** FLASH buffer source version of \ref Pipe_Write_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Write_PStream_BE(const void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Write_PStream_BE(const void* Buffer,
+                                                     uint16_t Length
+                                                     __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Reads the given number of bytes from the pipe into the given buffer in little endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
 
                        /** Reads the given number of bytes from the pipe into the given buffer in little endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Read_Stream_LE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Read_Stream_LE(void* Buffer,
+                                                   uint16_t Length
+                                                   __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** EEPROM buffer source version of \ref Pipe_Read_Stream_LE().
                         *
 
                        /** EEPROM buffer source version of \ref Pipe_Read_Stream_LE().
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Read_EStream_LE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Read_EStream_LE(void* Buffer,
+                                                    uint16_t Length
+                                                    __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Reads the given number of bytes from the pipe into the given buffer in big endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
 
                        /** Reads the given number of bytes from the pipe into the given buffer in big endian,
                         *  sending full packets to the device as needed. The last packet filled is not automatically sent;
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Read_Stream_BE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Read_Stream_BE(void* Buffer,
+                                                   uint16_t Length
+                                                   __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
                        
                        /** EEPROM buffer source version of \ref Pipe_Read_Stream_BE().
                         *
                        
                        /** EEPROM buffer source version of \ref Pipe_Read_Stream_BE().
                         *
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
                         *
                         *  \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
                         */
-                       uint8_t Pipe_Read_EStream_BE(void* Buffer, uint16_t Length __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Pipe_Read_EStream_BE(void* Buffer,
+                                                    uint16_t Length
+                                                    __CALLBACK_PARAM) ATTR_NON_NULL_PTR_ARG(1);
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                        void Pipe_ClearPipes(void);
 
                /* Inline Functions: */
                        void Pipe_ClearPipes(void);
 
                /* Inline Functions: */
-                       static inline uint8_t Pipe_BytesToEPSizeMask(uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
-                       static inline uint8_t Pipe_BytesToEPSizeMask(uint16_t Bytes)
+                       static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST ATTR_ALWAYS_INLINE;
+                       static inline uint8_t Pipe_BytesToEPSizeMask(const uint16_t Bytes)
                        {
                                if (Bytes <= 8)
                                  return (0 << EPSIZE0);
                        {
                                if (Bytes <= 8)
                                  return (0 << EPSIZE0);
index db97644..43abe6e 100644 (file)
@@ -1,4 +1,5 @@
-uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length)
+uint8_t TEMPLATE_FUNC_NAME (void* Buffer,
+                            uint16_t Length)
 {
        uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        
 {
        uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        
index 91f4e96..dc2c37d 100644 (file)
@@ -1,4 +1,5 @@
-uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
+uint8_t TEMPLATE_FUNC_NAME (const void* Buffer,
+                            uint16_t Length)
 {
        uint8_t* DataStream     = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        bool     LastPacketFull = false;
 {
        uint8_t* DataStream     = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        bool     LastPacketFull = false;
index 4e9c324..fc9df95 100644 (file)
@@ -1,4 +1,6 @@
-uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, uint16_t Length __CALLBACK_PARAM)
+uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer,
+                            uint16_t Length
+                            __CALLBACK_PARAM)
 {
        uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        uint8_t  ErrorCode;
 {
        uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        uint8_t  ErrorCode;
index 4fa83f5..fb64dd8 100644 (file)
@@ -1,4 +1,6 @@
-uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, uint16_t Length __CALLBACK_PARAM)
+uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer,
+                            uint16_t Length
+                            __CALLBACK_PARAM)
 {
        uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        uint8_t  ErrorCode;
 {
        uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
        uint8_t  ErrorCode;
index ef670a4..5542bb0 100644 (file)
@@ -92,7 +92,7 @@
                #if (F_CLOCK == 8000000)
                        #if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__) || \
                             defined(__AVR_ATmega8U2__) || defined(__AVR_ATmega16U2__) || \
                #if (F_CLOCK == 8000000)
                        #if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__) || \
                             defined(__AVR_ATmega8U2__) || defined(__AVR_ATmega16U2__) || \
-                                defined(__AVR_ATmega32U2__))
+                            defined(__AVR_ATmega32U2__))
                                #define USB_PLL_PSC                0
                        #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
                                #define USB_PLL_PSC                0
                                #define USB_PLL_PSC                0
                        #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
                                #define USB_PLL_PSC                0
                #elif (F_CLOCK == 16000000)
                        #if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__) || \
                             defined(__AVR_ATmega8U2__) || defined(__AVR_ATmega16U2__) || \
                #elif (F_CLOCK == 16000000)
                        #if (defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__) || \
                             defined(__AVR_ATmega8U2__) || defined(__AVR_ATmega16U2__) || \
-                                defined(__AVR_ATmega32U2__))
+                            defined(__AVR_ATmega32U2__))
                                #define USB_PLL_PSC                (1 << PLLP0)
                        #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
                                #define USB_PLL_PSC                (1 << PINDIV)
                                #define USB_PLL_PSC                (1 << PLLP0)
                        #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
                                #define USB_PLL_PSC                (1 << PINDIV)
                        void USB_Init(
                                       #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
                                       const uint8_t Mode
                        void USB_Init(
                                       #if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
                                       const uint8_t Mode
-                                                  #endif
+                                      #endif
 
                                       #if (defined(USB_CAN_BE_BOTH) && !defined(USE_STATIC_OPTIONS)) || defined(__DOXYGEN__)
                                       ,
 
                                       #if (defined(USB_CAN_BE_BOTH) && !defined(USE_STATIC_OPTIONS)) || defined(__DOXYGEN__)
                                       ,
-                                                  #elif (!defined(USB_CAN_BE_BOTH) && defined(USE_STATIC_OPTIONS))
-                                                  void
+                                      #elif (!defined(USB_CAN_BE_BOTH) && defined(USE_STATIC_OPTIONS))
+                                      void
                                       #endif
                                       #endif
-                                                  
+
                                       #if !defined(USE_STATIC_OPTIONS) || defined(__DOXYGEN__)
                                       const uint8_t Options
                                       #endif
                                       #if !defined(USE_STATIC_OPTIONS) || defined(__DOXYGEN__)
                                       const uint8_t Options
                                       #endif
                        enum USB_InitErrorCodes_t
                        {
                                USB_INITERROR_NoUSBModeSpecified       = 0, /**< Indicates that \ref USB_Init() was called with an
                        enum USB_InitErrorCodes_t
                        {
                                USB_INITERROR_NoUSBModeSpecified       = 0, /**< Indicates that \ref USB_Init() was called with an
-                                                                        *   invalid or missing Mode parameter.
-                                                                        */
+                                                                            *   invalid or missing Mode parameter.
+                                                                            */
                        };
 
                /* Global Variables: */
                        };
 
                /* Global Variables: */
                                #define USB_REG_Off()          MACROS{ UHWCON  &= ~(1 << UVREGE);               }MACROE
                        #else
                                #define USB_REG_On()           MACROS{ REGCR   &= ~(1 << REGDIS);               }MACROE
                                #define USB_REG_Off()          MACROS{ UHWCON  &= ~(1 << UVREGE);               }MACROE
                        #else
                                #define USB_REG_On()           MACROS{ REGCR   &= ~(1 << REGDIS);               }MACROE
-                               #define USB_REG_Off()          MACROS{ REGCR   |=  (1 << REGDIS);               }MACROE                 
+                               #define USB_REG_Off()          MACROS{ REGCR   |=  (1 << REGDIS);               }MACROE
                        #endif
                        
                        #define USB_OTGPAD_On()            MACROS{ USBCON  |=  (1 << OTGPADE);              }MACROE
                        #endif
                        
                        #define USB_OTGPAD_On()            MACROS{ USBCON  |=  (1 << OTGPADE);              }MACROE
index 5764598..c29d825 100644 (file)
@@ -34,6 +34,7 @@
   *  - The USBtoSerial project now flushes received data via a flush timer, so that several bytes can be transmitted at once
   *  - Removed the automated checking of event names in the demo, project and bootloader makefiles due to inconsistancies between the
   *    behaviour of the command line tools used to perform the check on each platform
   *  - The USBtoSerial project now flushes received data via a flush timer, so that several bytes can be transmitted at once
   *  - Removed the automated checking of event names in the demo, project and bootloader makefiles due to inconsistancies between the
   *    behaviour of the command line tools used to perform the check on each platform
+  *  - Internal USB driver source files renamed and moved to ease future possible architecture ports
   *
   *  <b>Fixed:</b>
   *  - Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from
   *
   *  <b>Fixed:</b>
   *  - Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from
index 11ba5cc..7113ee3 100644 (file)
@@ -33,7 +33,8 @@
 volatile SchedulerDelayCounter_t Scheduler_TickCounter;
 volatile uint8_t                 Scheduler_TotalTasks;
 
 volatile SchedulerDelayCounter_t Scheduler_TickCounter;
 volatile uint8_t                 Scheduler_TotalTasks;
 
-bool Scheduler_HasDelayElapsed(const uint16_t Delay, SchedulerDelayCounter_t* const DelayCounter)
+bool Scheduler_HasDelayElapsed(const uint16_t Delay,
+                               SchedulerDelayCounter_t* const DelayCounter)
 {
        SchedulerDelayCounter_t CurrentTickValue_LCL;
        SchedulerDelayCounter_t DelayCounter_LCL;
 {
        SchedulerDelayCounter_t CurrentTickValue_LCL;
        SchedulerDelayCounter_t DelayCounter_LCL;
@@ -65,7 +66,8 @@ bool Scheduler_HasDelayElapsed(const uint16_t Delay, SchedulerDelayCounter_t* co
        return false;
 }
 
        return false;
 }
 
-void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus)
+void Scheduler_SetTaskMode(const TaskPtr_t Task,
+                           const bool TaskStatus)
 {
        TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
                                        
 {
        TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
                                        
@@ -81,7 +83,8 @@ void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus)
        }
 }
 
        }
 }
 
-void Scheduler_SetGroupTaskMode(const uint8_t GroupID, const bool TaskStatus)
+void Scheduler_SetGroupTaskMode(const uint8_t GroupID,
+                                const bool TaskStatus)
 {
        TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
                                        
 {
        TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
                                        
index 4b6ffa9..d9fe3b8 100644 (file)
                                TaskPtr_t Task;       /**< Pointer to the task to execute. */
                                bool      TaskStatus; /**< Status of the task (either TASK_RUN or TASK_STOP). */
                                uint8_t   GroupID;    /**< Group ID of the task so that its status can be changed as a group. */
                                TaskPtr_t Task;       /**< Pointer to the task to execute. */
                                bool      TaskStatus; /**< Status of the task (either TASK_RUN or TASK_STOP). */
                                uint8_t   GroupID;    /**< Group ID of the task so that its status can be changed as a group. */
-                       } TaskEntry_t;                  
+                       } TaskEntry_t;
 
                /* Global Variables: */
                        /** Task entry list, containing the scheduler tasks, task statuses and group IDs. Each entry is of type
 
                /* Global Variables: */
                        /** Task entry list, containing the scheduler tasks, task statuses and group IDs. Each entry is of type
                         *  Usage Example:
                         *  \code
                         *      static SchedulerDelayCounter_t DelayCounter = 10000; // Force immediate run on start-up
                         *  Usage Example:
                         *  \code
                         *      static SchedulerDelayCounter_t DelayCounter = 10000; // Force immediate run on start-up
-                        *                               
+                        *
                         *      // Task runs every 10000 ticks, 10 seconds for this demo
                         *      if (Scheduler_HasDelayElapsed(10000, &DelayCounter))
                         *      {
                         *      // Task runs every 10000 ticks, 10 seconds for this demo
                         *      if (Scheduler_HasDelayElapsed(10000, &DelayCounter))
                         *      {
                         */
                        bool Scheduler_HasDelayElapsed(const uint16_t Delay,
                                                       SchedulerDelayCounter_t* const DelayCounter)
                         */
                        bool Scheduler_HasDelayElapsed(const uint16_t Delay,
                                                       SchedulerDelayCounter_t* const DelayCounter)
-                                                                                  ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(2);
+                                                      ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(2);
                        
                        /** Sets the task mode for a given task.
                         *
                         *  \param[in] Task        Name of the task whose status is to be changed.
                         *  \param[in] TaskStatus  New task status for the task (\ref TASK_RUN or \ref TASK_STOP).
                         */
                        
                        /** Sets the task mode for a given task.
                         *
                         *  \param[in] Task        Name of the task whose status is to be changed.
                         *  \param[in] TaskStatus  New task status for the task (\ref TASK_RUN or \ref TASK_STOP).
                         */
-                       void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus);
+                       void Scheduler_SetTaskMode(const TaskPtr_t Task,
+                                                  const bool TaskStatus);
                        
                        /** Sets the task mode for a given task group ID, allowing for an entire group of tasks to have their
                         *  statuses changed at once.
                        
                        /** Sets the task mode for a given task group ID, allowing for an entire group of tasks to have their
                         *  statuses changed at once.
                         *  \param[in] GroupID     Value of the task group ID whose status is to be changed.
                         *  \param[in] TaskStatus  New task status for tasks in the specified group (\ref TASK_RUN or \ref TASK_STOP).
                         */
                         *  \param[in] GroupID     Value of the task group ID whose status is to be changed.
                         *  \param[in] TaskStatus  New task status for tasks in the specified group (\ref TASK_RUN or \ref TASK_STOP).
                         */
-                       void Scheduler_SetGroupTaskMode(const uint8_t GroupID, const bool TaskStatus);
+                       void Scheduler_SetGroupTaskMode(const uint8_t GroupID,
+                                                       const bool TaskStatus);
 
 
-       /* Private Interface - For use in library only: */              
+       /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
                /* Macros: */
                        #define TOTAL_TASKS                       (sizeof(Scheduler_TaskList) / sizeof(TaskEntry_t))
        #if !defined(__DOXYGEN__)
                /* Macros: */
                        #define TOTAL_TASKS                       (sizeof(Scheduler_TaskList) / sizeof(TaskEntry_t))
index 2ecfde1..0ce283e 100644 (file)
@@ -51,15 +51,15 @@ LUFA_SRC_SCHEDULER    = $(LUFA_ROOT_PATH)/Scheduler/Scheduler.c
 
 # Check to see if the LUFA_PATH variable has not been set (the makefile is not being included from a project makefile)
 ifeq ($(origin LUFA_PATH), undefined)
 
 # Check to see if the LUFA_PATH variable has not been set (the makefile is not being included from a project makefile)
 ifeq ($(origin LUFA_PATH), undefined)
-   LUFA_SRC_FILES        = $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)       \
-                           $(LUFA_SRC_TEMPERATURE) $(LUFA_SRC_SERIAL) \
-                           $(LUFA_SRC_SERIALSTREAM) $(LUFA_SRC_TWI)   \
-                           $(LUFA_SRC_SCHEDULER)
+   LUFA_SRC_ALL_FILES  = $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)       \
+                         $(LUFA_SRC_TEMPERATURE) $(LUFA_SRC_SERIAL) \
+                         $(LUFA_SRC_SERIALSTREAM) $(LUFA_SRC_TWI)   \
+                         $(LUFA_SRC_SCHEDULER)
 
    all:
 
    clean:
 
    all:
 
    clean:
-       rm -f $(LUFA_SRC_FILES:%.c=%.o)
+       rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
        
    clean_list:
 
        
    clean_list:
 
index 1e15e59..3927a4f 100644 (file)
@@ -73,7 +73,7 @@
                
        /* Function Prototypes: */
                #if defined(USB_CAN_BE_DEVICE)
                
        /* Function Prototypes: */
                #if defined(USB_CAN_BE_DEVICE)
-                       bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
+                       bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        
                        #if defined(INCLUDE_FROM_SCSI_C)
                                static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                        
                        #if defined(INCLUDE_FROM_SCSI_C)
                                static void SCSI_Command_Inquiry(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);