Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_* functi...
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 4 Apr 2011 12:52:30 +0000 (12:52 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 4 Apr 2011 12:52:30 +0000 (12:52 +0000)
Renamed all low level Pipe_Read_*, Pipe_Write_* and Pipe_Discard_* functions to use the number of bits instead of a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures.

46 files changed:
Bootloaders/CDC/BootloaderCDC.c
Bootloaders/DFU/BootloaderDFU.c
Bootloaders/HID/BootloaderHID.c
Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c
Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/DataflashManager.c
Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/DataflashManager.c
Demos/Device/ClassDriver/VirtualSerialMassStorage/Lib/SCSI.c
Demos/Device/Incomplete/Sideshow/Lib/SideshowCommands.c
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
Demos/Device/LowLevel/AudioInput/AudioInput.c
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
Demos/Device/LowLevel/Keyboard/Keyboard.c
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c
Demos/Device/LowLevel/MassStorage/Lib/SCSI.c
Demos/Device/LowLevel/MassStorage/MassStorage.c
Demos/Device/LowLevel/Mouse/Mouse.c
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
LUFA/Drivers/USB/Class/Device/Audio.h
LUFA/Drivers/USB/Class/Device/CDC.c
LUFA/Drivers/USB/Class/Device/HID.c
LUFA/Drivers/USB/Class/Device/MassStorage.c
LUFA/Drivers/USB/Class/Host/CDC.c
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/Drivers/USB/Class/Host/Printer.c
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
LUFA/Drivers/USB/Core/DeviceStandardReq.c
LUFA/Drivers/USB/Core/EndpointStream.c
LUFA/Drivers/USB/Core/HostStandardReq.c
LUFA/Drivers/USB/Core/PipeStream.c
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/MigrationInformation.txt
Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
Projects/AVRISP-MKII/Lib/V2Protocol.c
Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.c
Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
Projects/TempDataLogger/Lib/DataflashManager.c
Projects/TempDataLogger/Lib/SCSI.c
Projects/Webserver/Lib/DataflashManager.c
Projects/Webserver/Lib/SCSI.c

index 99e0ccb..8e6a58b 100644 (file)
@@ -301,7 +301,7 @@ static uint8_t FetchNextCommandByte(void)
        }
 
        /* Fetch the next byte from the OUT endpoint */
        }
 
        /* Fetch the next byte from the OUT endpoint */
-       return Endpoint_Read_Byte();
+       return Endpoint_Read_8();
 }
 
 /** Writes the next response byte to the CDC data IN endpoint, and sends the endpoint back if needed to free up the
 }
 
 /** Writes the next response byte to the CDC data IN endpoint, and sends the endpoint back if needed to free up the
@@ -327,7 +327,7 @@ static void WriteNextResponseByte(const uint8_t Response)
        }
 
        /* Write the next byte to the IN endpoint */
        }
 
        /* Write the next byte to the IN endpoint */
-       Endpoint_Write_Byte(Response);
+       Endpoint_Write_8(Response);
 }
 
 /** Task to read in AVR910 commands from the CDC data OUT endpoint, process them, perform the required actions
 }
 
 /** Task to read in AVR910 commands from the CDC data OUT endpoint, process them, perform the required actions
index 717c934..f9bc4e0 100644 (file)
@@ -203,7 +203,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                }
 
                                /* First byte of the data stage is the DNLOAD request's command */
                                }
 
                                /* First byte of the data stage is the DNLOAD request's command */
-                               SentCommand.Command = Endpoint_Read_Byte();
+                               SentCommand.Command = Endpoint_Read_8();
 
                                /* One byte of the data stage is the command, so subtract it from the total data bytes */
                                SentCommand.DataSize--;
 
                                /* One byte of the data stage is the command, so subtract it from the total data bytes */
                                SentCommand.DataSize--;
@@ -212,7 +212,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                for (uint8_t DataByte = 0; (DataByte < sizeof(SentCommand.Data)) &&
                                     Endpoint_BytesInEndpoint(); DataByte++)
                                {
                                for (uint8_t DataByte = 0; (DataByte < sizeof(SentCommand.Data)) &&
                                     Endpoint_BytesInEndpoint(); DataByte++)
                                {
-                                       SentCommand.Data[DataByte] = Endpoint_Read_Byte();
+                                       SentCommand.Data[DataByte] = Endpoint_Read_8();
                                        SentCommand.DataSize--;
                                }
 
                                        SentCommand.DataSize--;
                                }
 
@@ -267,7 +267,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                                        }
 
                                                        /* Write the next word into the current flash page */
                                                        }
 
                                                        /* Write the next word into the current flash page */
-                                                       boot_page_fill(CurrFlashAddress.Long, Endpoint_Read_Word_LE());
+                                                       boot_page_fill(CurrFlashAddress.Long, Endpoint_Read_16_LE());
 
                                                        /* Adjust counters */
                                                        WordsInFlashPage      += 1;
 
                                                        /* Adjust counters */
                                                        WordsInFlashPage      += 1;
@@ -316,7 +316,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                                        }
 
                                                        /* Read the byte from the USB interface and write to to the EEPROM */
                                                        }
 
                                                        /* Read the byte from the USB interface and write to to the EEPROM */
-                                                       eeprom_write_byte((uint8_t*)StartAddr, Endpoint_Read_Byte());
+                                                       eeprom_write_byte((uint8_t*)StartAddr, Endpoint_Read_8());
 
                                                        /* Adjust counters */
                                                        StartAddr++;
 
                                                        /* Adjust counters */
                                                        StartAddr++;
@@ -348,12 +348,12 @@ void EVENT_USB_Device_ControlRequest(void)
                                {
                                        /* Blank checking is performed in the DFU_DNLOAD request - if we get here we've told the host
                                           that the memory isn't blank, and the host is requesting the first non-blank address */
                                {
                                        /* Blank checking is performed in the DFU_DNLOAD request - if we get here we've told the host
                                           that the memory isn't blank, and the host is requesting the first non-blank address */
-                                       Endpoint_Write_Word_LE(StartAddr);
+                                       Endpoint_Write_16_LE(StartAddr);
                                }
                                else
                                {
                                        /* Idle state upload - send response to last issued command */
                                }
                                else
                                {
                                        /* Idle state upload - send response to last issued command */
-                                       Endpoint_Write_Byte(ResponseByte);
+                                       Endpoint_Write_8(ResponseByte);
                                }
                        }
                        else
                                }
                        }
                        else
@@ -388,9 +388,9 @@ void EVENT_USB_Device_ControlRequest(void)
 
                                                /* Read the flash word and send it via USB to the host */
                                                #if (FLASHEND > 0xFFFF)
 
                                                /* Read the flash word and send it via USB to the host */
                                                #if (FLASHEND > 0xFFFF)
-                                                       Endpoint_Write_Word_LE(pgm_read_word_far(CurrFlashAddress.Long));
+                                                       Endpoint_Write_16_LE(pgm_read_word_far(CurrFlashAddress.Long));
                                                #else
                                                #else
-                                                       Endpoint_Write_Word_LE(pgm_read_word(CurrFlashAddress.Long));
+                                                       Endpoint_Write_16_LE(pgm_read_word(CurrFlashAddress.Long));
                                                #endif
 
                                                /* Adjust counters */
                                                #endif
 
                                                /* Adjust counters */
@@ -417,7 +417,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                                }
 
                                                /* Read the EEPROM byte and send it via USB to the host */
                                                }
 
                                                /* Read the EEPROM byte and send it via USB to the host */
-                                               Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)StartAddr));
+                                               Endpoint_Write_8(eeprom_read_byte((uint8_t*)StartAddr));
 
                                                /* Adjust counters */
                                                StartAddr++;
 
                                                /* Adjust counters */
                                                StartAddr++;
@@ -436,17 +436,17 @@ void EVENT_USB_Device_ControlRequest(void)
                        Endpoint_ClearSETUP();
 
                        /* Write 8-bit status value */
                        Endpoint_ClearSETUP();
 
                        /* Write 8-bit status value */
-                       Endpoint_Write_Byte(DFU_Status);
+                       Endpoint_Write_8(DFU_Status);
 
                        /* Write 24-bit poll timeout value */
 
                        /* Write 24-bit poll timeout value */
-                       Endpoint_Write_Byte(0);
-                       Endpoint_Write_Word_LE(0);
+                       Endpoint_Write_8(0);
+                       Endpoint_Write_16_LE(0);
 
                        /* Write 8-bit state value */
 
                        /* Write 8-bit state value */
-                       Endpoint_Write_Byte(DFU_State);
+                       Endpoint_Write_8(DFU_State);
 
                        /* Write 8-bit state string ID number */
 
                        /* Write 8-bit state string ID number */
-                       Endpoint_Write_Byte(0);
+                       Endpoint_Write_8(0);
 
                        Endpoint_ClearIN();
 
 
                        Endpoint_ClearIN();
 
@@ -464,7 +464,7 @@ void EVENT_USB_Device_ControlRequest(void)
                        Endpoint_ClearSETUP();
 
                        /* Write the current device state to the endpoint */
                        Endpoint_ClearSETUP();
 
                        /* Write the current device state to the endpoint */
-                       Endpoint_Write_Byte(DFU_State);
+                       Endpoint_Write_8(DFU_State);
 
                        Endpoint_ClearIN();
 
 
                        Endpoint_ClearIN();
 
@@ -503,7 +503,7 @@ static void DiscardFillerBytes(uint8_t NumberOfBytes)
                }
                else
                {
                }
                else
                {
-                       Endpoint_Discard_Byte();
+                       Endpoint_Discard_8();
                }
        }
 }
                }
        }
 }
index 174041e..f048043 100644 (file)
@@ -113,7 +113,7 @@ void EVENT_USB_Device_ControlRequest(void)
                        while (!(Endpoint_IsOUTReceived()));\r
                \r
                        /* Read in the write destination address */\r
                        while (!(Endpoint_IsOUTReceived()));\r
                \r
                        /* Read in the write destination address */\r
-                       uint16_t PageAddress = Endpoint_Read_Word_LE();\r
+                       uint16_t PageAddress = Endpoint_Read_16_LE();\r
                        \r
                        /* Check if the command is a program page command, or a start application command */\r
                        if (PageAddress == COMMAND_STARTAPPLICATION)\r
                        \r
                        /* Check if the command is a program page command, or a start application command */\r
                        if (PageAddress == COMMAND_STARTAPPLICATION)\r
@@ -137,7 +137,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                        }\r
 \r
                                        /* Write the next data word to the FLASH page */\r
                                        }\r
 \r
                                        /* Write the next data word to the FLASH page */\r
-                                       boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_Word_LE());\r
+                                       boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_16_LE());\r
                                }\r
 \r
                                /* Write the filled FLASH page to memory */\r
                                }\r
 \r
                                /* Write the filled FLASH page to memory */\r
index bdf9097..b02b65f 100644 (file)
@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
index 02a4199..66b58a1 100644 (file)
@@ -334,10 +334,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);
-       Endpoint_Write_Byte(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
+       Endpoint_Write_8(0x00);
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
index bdf9097..b02b65f 100644 (file)
@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
index ac672d0..717d172 100644 (file)
@@ -334,10 +334,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);
-       Endpoint_Write_Byte(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
+       Endpoint_Write_8(0x00);
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
index 55e3e94..7100acb 100644 (file)
@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
                        }\r
 \r
                        /* Write one 16-byte chunk of data to the Dataflash */\r
                        }\r
 \r
                        /* Write one 16-byte chunk of data to the Dataflash */\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
-                       Dataflash_SendByte(Endpoint_Read_Byte());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
+                       Dataflash_SendByte(Endpoint_Read_8());\r
 \r
                        /* Increment the Dataflash page 16 byte block counter */\r
                        CurrDFPageByteDiv16++;\r
 \r
                        /* Increment the Dataflash page 16 byte block counter */\r
                        CurrDFPageByteDiv16++;\r
@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
                        }\r
 \r
                        /* Read one 16-byte chunk of data from the Dataflash */\r
                        }\r
 \r
                        /* Read one 16-byte chunk of data from the Dataflash */\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
+                       Endpoint_Write_8(Dataflash_ReceiveByte());\r
 \r
                        /* Increment the Dataflash page 16 byte block counter */\r
                        CurrDFPageByteDiv16++;\r
 \r
                        /* Increment the Dataflash page 16 byte block counter */\r
                        CurrDFPageByteDiv16++;\r
index 4e5f3b3..d7842c5 100644 (file)
@@ -334,10 +334,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)\r
 {\r
        /* Send an empty header response with the Write Protect flag status */\r
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)\r
 {\r
        /* Send an empty header response with the Write Protect flag status */\r
-       Endpoint_Write_Byte(0x00);\r
-       Endpoint_Write_Byte(0x00);\r
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);\r
-       Endpoint_Write_Byte(0x00);\r
+       Endpoint_Write_8(0x00);\r
+       Endpoint_Write_8(0x00);\r
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);\r
+       Endpoint_Write_8(0x00);\r
        Endpoint_ClearIN();\r
 \r
        /* Update the bytes transferred counter and succeed the command */\r
        Endpoint_ClearIN();\r
 \r
        /* Update the bytes transferred counter and succeed the command */\r
index 3aa0095..d1aea1e 100644 (file)
@@ -311,7 +311,7 @@ static void SideShow_GetApplicationOrder(SideShow_PacketHeader_t* const PacketHe
 
        Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
        Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
 
        Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
        Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
-       Endpoint_Write_DWord_LE(TotalApplications);
+       Endpoint_Write_32_LE(TotalApplications);
 
        for (uint8_t App = 0; App < MAX_APPLICATIONS; App++)
        {
 
        for (uint8_t App = 0; App < MAX_APPLICATIONS; App++)
        {
@@ -332,7 +332,7 @@ static void SideShow_GetSupportedEndpoints(SideShow_PacketHeader_t* const Packet
 
        Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
        Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
 
        Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
        Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL);
-       Endpoint_Write_DWord_LE(1);
+       Endpoint_Write_32_LE(1);
        Endpoint_Write_Stream_LE(&SupportedEndpointGUID, sizeof(GUID_t), NULL);
        Endpoint_ClearIN();
 }
        Endpoint_Write_Stream_LE(&SupportedEndpointGUID, sizeof(GUID_t), NULL);
        Endpoint_ClearIN();
 }
index c393da8..0767127 100644 (file)
@@ -169,7 +169,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -190,9 +190,9 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Word_LE(0);\r
-                               Endpoint_Write_DWord_LE(LastTransferLength);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_16_LE(0);\r
+                               Endpoint_Write_32_LE(LastTransferLength);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
@@ -223,8 +223,8 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Byte(CurrentTransferTag);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_8(CurrentTransferTag);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -245,9 +245,9 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
                                                                \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Word_LE(0);\r
-                               Endpoint_Write_DWord_LE(LastTransferLength);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_16_LE(0);\r
+                               Endpoint_Write_32_LE(LastTransferLength);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -260,7 +260,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                /* Check that no split transaction is already in progress */\r
                                if (RequestInProgress != 0)\r
                                {\r
                                /* Check that no split transaction is already in progress */\r
                                if (RequestInProgress != 0)\r
                                {\r
-                                       Endpoint_Write_Byte(TMC_STATUS_SPLIT_IN_PROGRESS);                              \r
+                                       Endpoint_Write_8(TMC_STATUS_SPLIT_IN_PROGRESS);                         \r
                                }\r
                                else\r
                                {\r
                                }\r
                                else\r
                                {\r
@@ -275,7 +275,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
                                Endpoint_ClearSETUP();\r
                                \r
                                /* Write the request response byte */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
 \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();\r
@@ -296,8 +296,8 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();\r
 \r
                                /* Write the request response bytes */\r
                                Endpoint_ClearSETUP();\r
 \r
                                /* Write the request response bytes */\r
-                               Endpoint_Write_Byte(TMCRequestStatus);\r
-                               Endpoint_Write_Byte(0);\r
+                               Endpoint_Write_8(TMCRequestStatus);\r
+                               Endpoint_Write_8(0);\r
                                \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
                                \r
                                Endpoint_ClearIN();\r
                                Endpoint_ClearStatusStage();                            \r
index ac819c1..7a5a0a6 100644 (file)
@@ -180,7 +180,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
                #endif
 
                /* Write the sample to the buffer */
                #endif
 
                /* Write the sample to the buffer */
-               Endpoint_Write_Word_LE(AudioSample);
+               Endpoint_Write_16_LE(AudioSample);
 
                /* Check to see if the bank is now full */
                if (!(Endpoint_IsReadWriteAllowed()))
 
                /* Check to see if the bank is now full */
                if (!(Endpoint_IsReadWriteAllowed()))
index 64a2973..93ca370 100644 (file)
@@ -184,8 +184,8 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
        if (Endpoint_IsOUTReceived() && StreamingAudioInterfaceSelected)
        {
                /* Retrieve the signed 16-bit left and right audio samples, convert to 8-bit */
        if (Endpoint_IsOUTReceived() && StreamingAudioInterfaceSelected)
        {
                /* Retrieve the signed 16-bit left and right audio samples, convert to 8-bit */
-               int8_t LeftSample_8Bit   = ((int16_t)Endpoint_Read_Word_LE() >> 8);
-               int8_t RightSample_8Bit  = ((int16_t)Endpoint_Read_Word_LE() >> 8);
+               int8_t LeftSample_8Bit   = ((int16_t)Endpoint_Read_16_LE() >> 8);
+               int8_t RightSample_8Bit  = ((int16_t)Endpoint_Read_16_LE() >> 8);
 
                /* Mix the two channels together to produce a mono, 8-bit sample */
                int8_t MixedSample_8Bit  = (((int16_t)LeftSample_8Bit + (int16_t)RightSample_8Bit) >> 1);
 
                /* Mix the two channels together to produce a mono, 8-bit sample */
                int8_t MixedSample_8Bit  = (((int16_t)LeftSample_8Bit + (int16_t)RightSample_8Bit) >> 1);
index 5ff7247..5cf5473 100644 (file)
@@ -167,7 +167,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                }
 
                                /* Read in the LED report from the host */
                                }
 
                                /* Read in the LED report from the host */
-                               uint8_t LEDStatus = Endpoint_Read_Byte();
+                               uint8_t LEDStatus = Endpoint_Read_8();
 
                                Endpoint_ClearOUT();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearOUT();
                                Endpoint_ClearStatusStage();
@@ -183,7 +183,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();
 
                                /* Write the current protocol flag to the host */
                                Endpoint_ClearSETUP();
 
                                /* Write the current protocol flag to the host */
-                               Endpoint_Write_Byte(UsingReportProtocol);
+                               Endpoint_Write_8(UsingReportProtocol);
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
@@ -218,7 +218,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();
 
                                /* Write the current idle duration to the host, must be divided by 4 before sent to host */
                                Endpoint_ClearSETUP();
 
                                /* Write the current idle duration to the host, must be divided by 4 before sent to host */
-                               Endpoint_Write_Byte(IdleCount >> 2);
+                               Endpoint_Write_8(IdleCount >> 2);
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
@@ -344,7 +344,7 @@ void ReceiveNextReport(void)
                if (Endpoint_IsReadWriteAllowed())
                {
                        /* Read in the LED report from the host */
                if (Endpoint_IsReadWriteAllowed())
                {
                        /* Read in the LED report from the host */
-                       uint8_t LEDReport = Endpoint_Read_Byte();
+                       uint8_t LEDReport = Endpoint_Read_8();
 
                        /* Process the read LED report from the host */
                        ProcessLEDReport(LEDReport);
 
                        /* Process the read LED report from the host */
                        ProcessLEDReport(LEDReport);
index ca061ee..3dcf9df 100644 (file)
@@ -168,7 +168,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                }
 
                                /* Read in the LED report from the host */
                                }
 
                                /* Read in the LED report from the host */
-                               uint8_t LEDStatus = Endpoint_Read_Byte();
+                               uint8_t LEDStatus = Endpoint_Read_8();
 
                                Endpoint_ClearOUT();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearOUT();
                                Endpoint_ClearStatusStage();
@@ -258,7 +258,7 @@ void Keyboard_HID_Task(void)
        if (Endpoint_IsReadWriteAllowed())
        {
                /* Read in and process the LED report from the host */
        if (Endpoint_IsReadWriteAllowed())
        {
                /* Read in and process the LED report from the host */
-               Keyboard_ProcessLEDReport(Endpoint_Read_Byte());
+               Keyboard_ProcessLEDReport(Endpoint_Read_8());
 
                /* Handshake the OUT Endpoint - clear endpoint and ready for next report */
                Endpoint_ClearOUT();
 
                /* Handshake the OUT Endpoint - clear endpoint and ready for next report */
                Endpoint_ClearOUT();
index fdca8cb..287676f 100644 (file)
@@ -127,22 +127,22 @@ void DataflashManager_WriteBlocks(const uint32_t BlockAddress,
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
@@ -240,22 +240,22 @@ void DataflashManager_ReadBlocks(const uint32_t BlockAddress,
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
index 56790dd..4326786 100644 (file)
@@ -212,10 +212,10 @@ static bool SCSI_Command_Request_Sense(void)
 static bool SCSI_Command_Read_Capacity_10(void)
 {
        /* Send the total number of logical blocks in the current LUN */
 static bool SCSI_Command_Read_Capacity_10(void)
 {
        /* Send the total number of logical blocks in the current LUN */
-       Endpoint_Write_DWord_BE(LUN_MEDIA_BLOCKS - 1);
+       Endpoint_Write_32_BE(LUN_MEDIA_BLOCKS - 1);
 
        /* Send the logical block size of the device (must be 512 bytes) */
 
        /* Send the logical block size of the device (must be 512 bytes) */
-       Endpoint_Write_DWord_BE(VIRTUAL_MEMORY_BLOCK_SIZE);
+       Endpoint_Write_32_BE(VIRTUAL_MEMORY_BLOCK_SIZE);
 
        /* Check if the current command is being aborted by the host */
        if (IsMassStoreReset)
 
        /* Check if the current command is being aborted by the host */
        if (IsMassStoreReset)
@@ -329,10 +329,10 @@ static bool SCSI_Command_ReadWrite_10(const bool IsDataRead)
 static bool SCSI_Command_ModeSense_6(void)
 {
        /* Send an empty header response with the Write Protect flag status */
 static bool SCSI_Command_ModeSense_6(void)
 {
        /* Send an empty header response with the Write Protect flag status */
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);
-       Endpoint_Write_Byte(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
+       Endpoint_Write_8(0x00);
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
index d6345e3..7f2d866 100644 (file)
@@ -146,7 +146,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();
 
                                /* Indicate to the host the number of supported LUNs (virtual disks) on the device */
                                Endpoint_ClearSETUP();
 
                                /* Indicate to the host the number of supported LUNs (virtual disks) on the device */
-                               Endpoint_Write_Byte(TOTAL_LUNS - 1);
+                               Endpoint_Write_8(TOTAL_LUNS - 1);
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
index ef6c911..54d3a8f 100644 (file)
@@ -160,7 +160,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();
 
                                /* Write the current protocol flag to the host */
                                Endpoint_ClearSETUP();
 
                                /* Write the current protocol flag to the host */
-                               Endpoint_Write_Byte(UsingReportProtocol);
+                               Endpoint_Write_8(UsingReportProtocol);
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
@@ -195,7 +195,7 @@ void EVENT_USB_Device_ControlRequest(void)
                                Endpoint_ClearSETUP();
 
                                /* Write the current idle duration to the host, must be divided by 4 before sent to host */
                                Endpoint_ClearSETUP();
 
                                /* Write the current idle duration to the host, must be divided by 4 before sent to host */
-                               Endpoint_Write_Byte(IdleCount >> 2);
+                               Endpoint_Write_8(IdleCount >> 2);
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
 
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
index 267a583..671fa48 100644 (file)
@@ -198,7 +198,7 @@ void WriteNextReport(uint8_t* ReportOUTData,
 
                /* If the report index is used, send it before the report data */
                if (ReportIndex)
 
                /* If the report index is used, send it before the report data */
                if (ReportIndex)
-                 Pipe_Write_Byte(ReportIndex);
+                 Pipe_Write_8(ReportIndex);
 
                /* Write out HID report data */
                Pipe_Write_Stream_LE(ReportOUTData, ReportLength, NULL);
 
                /* Write out HID report data */
                Pipe_Write_Stream_LE(ReportOUTData, ReportLength, NULL);
index cf63c65..a50bd97 100644 (file)
 
                                (void)AudioInterfaceInfo;
 
 
                                (void)AudioInterfaceInfo;
 
-                               Sample = Endpoint_Read_Byte();
+                               Sample = Endpoint_Read_8();
 
                                if (!(Endpoint_BytesInEndpoint()))
                                  Endpoint_ClearOUT();
 
                                if (!(Endpoint_BytesInEndpoint()))
                                  Endpoint_ClearOUT();
 
                                (void)AudioInterfaceInfo;
 
 
                                (void)AudioInterfaceInfo;
 
-                               Sample = (int16_t)Endpoint_Read_Word_LE();
+                               Sample = (int16_t)Endpoint_Read_16_LE();
 
                                if (!(Endpoint_BytesInEndpoint()))
                                  Endpoint_ClearOUT();
 
                                if (!(Endpoint_BytesInEndpoint()))
                                  Endpoint_ClearOUT();
 
                                (void)AudioInterfaceInfo;
 
 
                                (void)AudioInterfaceInfo;
 
-                               Sample = (((uint32_t)Endpoint_Read_Byte() << 16) | Endpoint_Read_Word_LE());
+                               Sample = (((uint32_t)Endpoint_Read_8() << 16) | Endpoint_Read_16_LE());
 
                                if (!(Endpoint_BytesInEndpoint()))
                                  Endpoint_ClearOUT();
 
                                if (!(Endpoint_BytesInEndpoint()))
                                  Endpoint_ClearOUT();
                        static inline void Audio_Device_WriteSample8(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                     const int8_t Sample)
                        {
                        static inline void Audio_Device_WriteSample8(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                     const int8_t Sample)
                        {
-                               Endpoint_Write_Byte(Sample);
+                               Endpoint_Write_8(Sample);
 
                                if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
                                  Endpoint_ClearIN();
 
                                if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
                                  Endpoint_ClearIN();
                        static inline void Audio_Device_WriteSample16(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                      const int16_t Sample)
                        {
                        static inline void Audio_Device_WriteSample16(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                      const int16_t Sample)
                        {
-                               Endpoint_Write_Word_LE(Sample);
+                               Endpoint_Write_16_LE(Sample);
 
                                if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
                                  Endpoint_ClearIN();
 
                                if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
                                  Endpoint_ClearIN();
                        static inline void Audio_Device_WriteSample24(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                      const int32_t Sample)
                        {
                        static inline void Audio_Device_WriteSample24(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                      const int32_t Sample)
                        {
-                               Endpoint_Write_Word_LE(Sample);
-                               Endpoint_Write_Byte(Sample >> 16);
+                               Endpoint_Write_16_LE(Sample);
+                               Endpoint_Write_8(Sample >> 16);
 
                                if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
                                  Endpoint_ClearIN();
 
                                if (Endpoint_BytesInEndpoint() == AudioInterfaceInfo->Config.DataINEndpointSize)
                                  Endpoint_ClearIN();
index 9204f1b..7398ce6 100644 (file)
@@ -188,7 +188,7 @@ uint8_t CDC_Device_SendByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
                  return ErrorCode;
        }
 
                  return ErrorCode;
        }
 
-       Endpoint_Write_Byte(Data);
+       Endpoint_Write_8(Data);
        return ENDPOINT_READYWAIT_NoError;
 }
 
        return ENDPOINT_READYWAIT_NoError;
 }
 
@@ -256,7 +256,7 @@ int16_t CDC_Device_ReceiveByte(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInf
        if (Endpoint_IsOUTReceived())
        {
                if (Endpoint_BytesInEndpoint())
        if (Endpoint_IsOUTReceived())
        {
                if (Endpoint_BytesInEndpoint())
-                 ReceivedByte = Endpoint_Read_Byte();
+                 ReceivedByte = Endpoint_Read_8();
 
                if (!(Endpoint_BytesInEndpoint()))
                  Endpoint_ClearOUT();
 
                if (!(Endpoint_BytesInEndpoint()))
                  Endpoint_ClearOUT();
index 505b66e..40351cc 100644 (file)
@@ -94,7 +94,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
-                               Endpoint_Write_Byte(HIDInterfaceInfo->State.UsingReportProtocol);
+                               Endpoint_Write_8(HIDInterfaceInfo->State.UsingReportProtocol);
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
                        }
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
                        }
@@ -124,7 +124,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
-                               Endpoint_Write_Byte(HIDInterfaceInfo->State.IdleCount >> 2);
+                               Endpoint_Write_8(HIDInterfaceInfo->State.IdleCount >> 2);
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
                        }
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
                        }
@@ -182,7 +182,7 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
                        Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
 
                        if (ReportID)
                        Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
 
                        if (ReportID)
-                         Endpoint_Write_Byte(ReportID);
+                         Endpoint_Write_8(ReportID);
 
                        Endpoint_Write_Stream_LE(ReportINData, ReportINSize, NULL);
 
 
                        Endpoint_Write_Stream_LE(ReportINData, ReportINSize, NULL);
 
index a3dcb1c..efc9cd4 100644 (file)
@@ -61,7 +61,7 @@ void MS_Device_ProcessControlRequest(USB_ClassInfo_MS_Device_t* const MSInterfac
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
-                               Endpoint_Write_Byte(MSInterfaceInfo->Config.TotalLUNs - 1);
+                               Endpoint_Write_8(MSInterfaceInfo->Config.TotalLUNs - 1);
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
                        }
                                Endpoint_ClearIN();
                                Endpoint_ClearStatusStage();
                        }
index 2a260b6..701a7dc 100644 (file)
@@ -366,7 +366,7 @@ uint8_t CDC_Host_SendByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
                  return ErrorCode;
        }
 
                  return ErrorCode;
        }
 
-       Pipe_Write_Byte(Data);
+       Pipe_Write_8(Data);
        Pipe_Freeze();
 
        return PIPE_READYWAIT_NoError;
        Pipe_Freeze();
 
        return PIPE_READYWAIT_NoError;
@@ -415,7 +415,7 @@ int16_t CDC_Host_ReceiveByte(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
        if (Pipe_IsINReceived())
        {
                if (Pipe_BytesInPipe())
        if (Pipe_IsINReceived())
        {
                if (Pipe_BytesInPipe())
-                 ReceivedByte = Pipe_Read_Byte();
+                 ReceivedByte = Pipe_Read_8();
 
                if (!(Pipe_BytesInPipe()))
                  Pipe_ClearIN();
 
                if (!(Pipe_BytesInPipe()))
                  Pipe_ClearIN();
index 4460484..992f7b3 100644 (file)
@@ -240,7 +240,7 @@ uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
 
                if (HIDInterfaceInfo->Config.HIDParserData->UsingReportIDs)
                {
 
                if (HIDInterfaceInfo->Config.HIDParserData->UsingReportIDs)
                {
-                       ReportID = Pipe_Read_Byte();
+                       ReportID = Pipe_Read_8();
                        *(BufferPos++) = ReportID;
                }
 
                        *(BufferPos++) = ReportID;
                }
 
index bd960e2..278df2e 100644 (file)
@@ -281,7 +281,7 @@ uint8_t PRNT_Host_SendByte(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
                  return ErrorCode;
        }
 
                  return ErrorCode;
        }
 
-       Pipe_Write_Byte(Data);
+       Pipe_Write_8(Data);
        Pipe_Freeze();
 
        return PIPE_READYWAIT_NoError;
        Pipe_Freeze();
 
        return PIPE_READYWAIT_NoError;
@@ -377,7 +377,7 @@ int16_t PRNT_Host_ReceiveByte(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo
        if (Pipe_IsINReceived())
        {
                if (Pipe_BytesInPipe())
        if (Pipe_IsINReceived())
        {
                if (Pipe_BytesInPipe())
-                 ReceivedByte = Pipe_Read_Byte();
+                 ReceivedByte = Pipe_Read_8();
 
                if (!(Pipe_BytesInPipe()))
                  Pipe_ClearIN();
 
                if (!(Pipe_BytesInPipe()))
                  Pipe_ClearIN();
index 6933a89..166a49c 100644 (file)
                         *
                         *  \return Next byte in the currently selected endpoint's FIFO buffer.
                         */
                         *
                         *  \return Next byte in the currently selected endpoint's FIFO buffer.
                         */
-                       static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint8_t Endpoint_Read_Byte(void)
+                       static inline uint8_t Endpoint_Read_8(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint8_t Endpoint_Read_8(void)
                        {
                                return UEDATX;
                        }
                        {
                                return UEDATX;
                        }
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \param[in] Byte  Next byte to write into the the currently selected endpoint's FIFO buffer.
+                        *  \param[in] Data  Data to write into the the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline void Endpoint_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Write_Byte(const uint8_t Byte)
+                       static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Write_8(const uint8_t Data)
                        {
                        {
-                               UEDATX = Byte;
+                               UEDATX = Data;
                        }
 
                        /** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         */
                        }
 
                        /** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         */
-                       static inline void Endpoint_Discard_Byte(void) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Discard_Byte(void)
+                       static inline void Endpoint_Discard_8(void) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Discard_8(void)
                        {
                                uint8_t Dummy;
 
                        {
                                uint8_t Dummy;
 
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \return Next word in the currently selected endpoint's FIFO buffer.
+                        *  \return Next two bytes in the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint16_t Endpoint_Read_Word_LE(void)
+                       static inline uint16_t Endpoint_Read_16_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint16_t Endpoint_Read_16_LE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint16_t Word;
+                                       uint16_t Value;
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[0] = UEDATX;
                                Data.Bytes[1] = UEDATX;
 
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[0] = UEDATX;
                                Data.Bytes[1] = UEDATX;
 
-                               return Data.Word;
+                               return Data.Value;
                        }
 
                        /** Reads two bytes from the currently selected endpoint's bank in big endian format, for OUT
                        }
 
                        /** Reads two bytes from the currently selected endpoint's bank in big endian format, for OUT
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \return Next word in the currently selected endpoint's FIFO buffer.
+                        *  \return Next two bytes in the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline uint16_t Endpoint_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint16_t Endpoint_Read_Word_BE(void)
+                       static inline uint16_t Endpoint_Read_16_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint16_t Endpoint_Read_16_BE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint16_t Word;
+                                       uint16_t Value;
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[1] = UEDATX;
                                Data.Bytes[0] = UEDATX;
 
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[1] = UEDATX;
                                Data.Bytes[0] = UEDATX;
 
-                               return Data.Word;
+                               return Data.Value;
                        }
 
                        /** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN
                        }
 
                        /** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \param[in] Word  Next word to write to the currently selected endpoint's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline void Endpoint_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Write_Word_LE(const uint16_t Word)
+                       static inline void Endpoint_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Write_16_LE(const uint16_t Data)
                        {
                        {
-                               UEDATX = (Word & 0xFF);
-                               UEDATX = (Word >> 8);
+                               UEDATX = (Data & 0xFF);
+                               UEDATX = (Data >> 8);
                        }
 
                        /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN
                        }
 
                        /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \param[in] Word  Next word to write to the currently selected endpoint's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline void Endpoint_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Write_Word_BE(const uint16_t Word)
+                       static inline void Endpoint_Write_16_BE(const uint16_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Write_16_BE(const uint16_t Data)
                        {
                        {
-                               UEDATX = (Word >> 8);
-                               UEDATX = (Word & 0xFF);
+                               UEDATX = (Data >> 8);
+                               UEDATX = (Data & 0xFF);
                        }
 
                        /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         */
                        }
 
                        /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         */
-                       static inline void Endpoint_Discard_Word(void) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Discard_Word(void)
+                       static inline void Endpoint_Discard_16(void) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Discard_16(void)
                        {
                                uint8_t Dummy;
 
                        {
                                uint8_t Dummy;
 
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \return Next double word in the currently selected endpoint's FIFO buffer.
+                        *  \return Next four bytes in the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline uint32_t Endpoint_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint32_t Endpoint_Read_DWord_LE(void)
+                       static inline uint32_t Endpoint_Read_32_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint32_t Endpoint_Read_32_LE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint32_t DWord;
+                                       uint32_t Value;
                                        uint8_t  Bytes[4];
                                } Data;
 
                                        uint8_t  Bytes[4];
                                } Data;
 
                                Data.Bytes[2] = UEDATX;
                                Data.Bytes[3] = UEDATX;
 
                                Data.Bytes[2] = UEDATX;
                                Data.Bytes[3] = UEDATX;
 
-                               return Data.DWord;
+                               return Data.Value;
                        }
 
                        /** Reads four bytes from the currently selected endpoint's bank in big endian format, for OUT
                        }
 
                        /** Reads four bytes from the currently selected endpoint's bank in big endian format, for OUT
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \return Next double word in the currently selected endpoint's FIFO buffer.
+                        *  \return Next four bytes in the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline uint32_t Endpoint_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint32_t Endpoint_Read_DWord_BE(void)
+                       static inline uint32_t Endpoint_Read_32_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint32_t Endpoint_Read_32_BE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint32_t DWord;
+                                       uint32_t Value;
                                        uint8_t  Bytes[4];
                                } Data;
 
                                        uint8_t  Bytes[4];
                                } Data;
 
                                Data.Bytes[1] = UEDATX;
                                Data.Bytes[0] = UEDATX;
 
                                Data.Bytes[1] = UEDATX;
                                Data.Bytes[0] = UEDATX;
 
-                               return Data.DWord;
+                               return Data.Value;
                        }
 
                        /** Writes four bytes to the currently selected endpoint's bank in little endian format, for IN
                        }
 
                        /** Writes four bytes to the currently selected endpoint's bank in little endian format, for IN
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \param[in] DWord  Next double word to write to the currently selected endpoint's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Write_DWord_LE(const uint32_t DWord)
+                       static inline void Endpoint_Write_32_LE(const uint32_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Write_32_LE(const uint32_t Data)
                        {
                        {
-                               UEDATX = (DWord &  0xFF);
-                               UEDATX = (DWord >> 8);
-                               UEDATX = (DWord >> 16);
-                               UEDATX = (DWord >> 24);
+                               UEDATX = (Data &  0xFF);
+                               UEDATX = (Data >> 8);
+                               UEDATX = (Data >> 16);
+                               UEDATX = (Data >> 24);
                        }
 
                        /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN
                        }
 
                        /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         *
-                        *  \param[in] DWord  Next double word to write to the currently selected endpoint's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.
                         */
                         */
-                       static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Write_DWord_BE(const uint32_t DWord)
+                       static inline void Endpoint_Write_32_BE(const uint32_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Write_32_BE(const uint32_t Data)
                        {
                        {
-                               UEDATX = (DWord >> 24);
-                               UEDATX = (DWord >> 16);
-                               UEDATX = (DWord >> 8);
-                               UEDATX = (DWord &  0xFF);
+                               UEDATX = (Data >> 24);
+                               UEDATX = (Data >> 16);
+                               UEDATX = (Data >> 8);
+                               UEDATX = (Data &  0xFF);
                        }
 
                        /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         */
                        }
 
                        /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.
                         *
                         *  \ingroup Group_EndpointPrimitiveRW_AVR8
                         */
-                       static inline void Endpoint_Discard_DWord(void) ATTR_ALWAYS_INLINE;
-                       static inline void Endpoint_Discard_DWord(void)
+                       static inline void Endpoint_Discard_32(void) ATTR_ALWAYS_INLINE;
+                       static inline void Endpoint_Discard_32(void)
                        {
                                uint8_t Dummy;
 
                        {
                                uint8_t Dummy;
 
index 3aea58f..74716a0 100644 (file)
                         *
                         *  \return Next byte in the currently selected pipe's FIFO buffer.
                         */
                         *
                         *  \return Next byte in the currently selected pipe's FIFO buffer.
                         */
-                       static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint8_t Pipe_Read_Byte(void)
+                       static inline uint8_t Pipe_Read_8(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint8_t Pipe_Read_8(void)
                        {
                                return UPDATX;
                        }
                        {
                                return UPDATX;
                        }
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \param[in] Byte  Next byte to write into the the currently selected pipe's FIFO buffer.
+                        *  \param[in] Data  Data to write into the the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Write_Byte(const uint8_t Byte)
+                       static inline void Pipe_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Write_8(const uint8_t Data)
                        {
                                UPDATX = Byte;
                        }
                        {
                                UPDATX = Byte;
                        }
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         */
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         */
-                       static inline void Pipe_Discard_Byte(void) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Discard_Byte(void)
+                       static inline void Pipe_Discard_8(void) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Discard_8(void)
                        {
                                uint8_t Dummy;
 
                        {
                                uint8_t Dummy;
 
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \return Next word in the currently selected pipe's FIFO buffer.
+                        *  \return Next two bytes in the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline uint16_t Pipe_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint16_t Pipe_Read_Word_LE(void)
+                       static inline uint16_t Pipe_Read_16_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint16_t Pipe_Read_16_LE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint16_t Word;
+                                       uint16_t Value;
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[0] = UPDATX;
                                Data.Bytes[1] = UPDATX;
 
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[0] = UPDATX;
                                Data.Bytes[1] = UPDATX;
 
-                               return Data.Word;
+                               return Data.Value;
                        }
 
                        /** Reads two bytes from the currently selected pipe's bank in big endian format, for OUT
                        }
 
                        /** Reads two bytes from the currently selected pipe's bank in big endian format, for OUT
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \return Next word in the currently selected pipe's FIFO buffer.
+                        *  \return Next two bytes in the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline uint16_t Pipe_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint16_t Pipe_Read_Word_BE(void)
+                       static inline uint16_t Pipe_Read_16_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint16_t Pipe_Read_16_BE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint16_t Word;
+                                       uint16_t Value;
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[1] = UPDATX;
                                Data.Bytes[0] = UPDATX;
 
                                        uint8_t  Bytes[2];
                                } Data;
 
                                Data.Bytes[1] = UPDATX;
                                Data.Bytes[0] = UPDATX;
 
-                               return Data.Word;
+                               return Data.Value;
                        }
 
                        /** Writes two bytes to the currently selected pipe's bank in little endian format, for IN
                        }
 
                        /** Writes two bytes to the currently selected pipe's bank in little endian format, for IN
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \param[in] Word  Next word to write to the currently selected pipe's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Write_Word_LE(const uint16_t Word)
+                       static inline void Pipe_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Write_16_LE(const uint16_t Data)
                        {
                        {
-                               UPDATX = (Word & 0xFF);
-                               UPDATX = (Word >> 8);
+                               UPDATX = (Data & 0xFF);
+                               UPDATX = (Data >> 8);
                        }
 
                        /** Writes two bytes to the currently selected pipe's bank in big endian format, for IN
                        }
 
                        /** Writes two bytes to the currently selected pipe's bank in big endian format, for IN
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \param[in] Word  Next word to write to the currently selected pipe's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Write_Word_BE(const uint16_t Word)
+                       static inline void Pipe_Write_16_BE(const uint16_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Write_16_BE(const uint16_t Data)
                        {
                        {
-                               UPDATX = (Word >> 8);
-                               UPDATX = (Word & 0xFF);
+                               UPDATX = (Data >> 8);
+                               UPDATX = (Data & 0xFF);
                        }
 
                        /** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         */
                        }
 
                        /** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         */
-                       static inline void Pipe_Discard_Word(void) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Discard_Word(void)
+                       static inline void Pipe_Discard_16(void) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Discard_16(void)
                        {
                                uint8_t Dummy;
 
                        {
                                uint8_t Dummy;
 
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \return Next double word in the currently selected pipe's FIFO buffer.
+                        *  \return Next four bytes in the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline uint32_t Pipe_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint32_t Pipe_Read_DWord_LE(void)
+                       static inline uint32_t Pipe_Read_32_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint32_t Pipe_Read_32_LE(void)
                        {
                                union
                                {
                        {
                                union
                                {
-                                       uint32_t DWord;
+                                       uint32_t Value;
                                        uint8_t  Bytes[4];
                                } Data;
 
                                        uint8_t  Bytes[4];
                                } Data;
 
                                Data.Bytes[2] = UPDATX;
                                Data.Bytes[3] = UPDATX;
 
                                Data.Bytes[2] = UPDATX;
                                Data.Bytes[3] = UPDATX;
 
-                               return Data.DWord;
+                               return Data.Value;
                        }
 
                        /** Reads four bytes from the currently selected pipe's bank in big endian format, for OUT
                        }
 
                        /** Reads four bytes from the currently selected pipe's bank in big endian format, for OUT
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \return Next double word in the currently selected pipe's FIFO buffer.
+                        *  \return Next four bytes in the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline uint32_t Pipe_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
-                       static inline uint32_t Pipe_Read_DWord_BE(void)
+                       static inline uint32_t Pipe_Read_32_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+                       static inline uint32_t Pipe_Read_32_BE(void)
                        {
                                union
                                {
                        {
                                union
                                {
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \param[in] DWord  Next double word to write to the currently selected pipe's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Write_DWord_LE(const uint32_t DWord)
+                       static inline void Pipe_Write_32_LE(const uint32_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Write_32_LE(const uint32_t Data)
                        {
                        {
-                               UPDATX = (DWord &  0xFF);
-                               UPDATX = (DWord >> 8);
-                               UPDATX = (DWord >> 16);
-                               UPDATX = (DWord >> 24);
+                               UPDATX = (Data &  0xFF);
+                               UPDATX = (Data >> 8);
+                               UPDATX = (Data >> 16);
+                               UPDATX = (Data >> 24);
                        }
 
                        /** Writes four bytes to the currently selected pipe's bank in big endian format, for IN
                        }
 
                        /** Writes four bytes to the currently selected pipe's bank in big endian format, for IN
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         *
-                        *  \param[in] DWord  Next double word to write to the currently selected pipe's FIFO buffer.
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.
                         */
                         */
-                       static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Write_DWord_BE(const uint32_t DWord)
+                       static inline void Pipe_Write_32_BE(const uint32_t Data) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Write_32_BE(const uint32_t Data)
                        {
                        {
-                               UPDATX = (DWord >> 24);
-                               UPDATX = (DWord >> 16);
-                               UPDATX = (DWord >> 8);
-                               UPDATX = (DWord &  0xFF);
+                               UPDATX = (Data >> 24);
+                               UPDATX = (Data >> 16);
+                               UPDATX = (Data >> 8);
+                               UPDATX = (Data &  0xFF);
                        }
 
                        /** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         */
                        }
 
                        /** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.
                         *
                         *  \ingroup Group_PipePrimitiveRW_AVR8
                         */
-                       static inline void Pipe_Discard_DWord(void) ATTR_ALWAYS_INLINE;
-                       static inline void Pipe_Discard_DWord(void)
+                       static inline void Pipe_Discard_32(void) ATTR_ALWAYS_INLINE;
+                       static inline void Pipe_Discard_32(void)
                        {
                                uint8_t Dummy;
 
                        {
                                uint8_t Dummy;
 
index ed781f6..e368203 100644 (file)
@@ -48,11 +48,11 @@ bool    USB_RemoteWakeupEnabled;
 
 void USB_Device_ProcessControlRequest(void)
 {
 
 void USB_Device_ProcessControlRequest(void)
 {
-       USB_ControlRequest.bmRequestType = Endpoint_Read_Byte();
-       USB_ControlRequest.bRequest      = Endpoint_Read_Byte();
-       USB_ControlRequest.wValue        = Endpoint_Read_Word_LE();
-       USB_ControlRequest.wIndex        = Endpoint_Read_Word_LE();
-       USB_ControlRequest.wLength       = Endpoint_Read_Word_LE();
+       USB_ControlRequest.bmRequestType = Endpoint_Read_8();
+       USB_ControlRequest.bRequest      = Endpoint_Read_8();
+       USB_ControlRequest.wValue        = Endpoint_Read_16_LE();
+       USB_ControlRequest.wIndex        = Endpoint_Read_16_LE();
+       USB_ControlRequest.wLength       = Endpoint_Read_16_LE();
 
        EVENT_USB_Device_ControlRequest();
 
 
        EVENT_USB_Device_ControlRequest();
 
@@ -200,7 +200,7 @@ static void USB_Device_GetConfiguration(void)
 {
        Endpoint_ClearSETUP();
 
 {
        Endpoint_ClearSETUP();
 
-       Endpoint_Write_Byte(USB_ConfigurationNumber);
+       Endpoint_Write_8(USB_ConfigurationNumber);
        Endpoint_ClearIN();
 
        Endpoint_ClearStatusStage();
        Endpoint_ClearIN();
 
        Endpoint_ClearStatusStage();
@@ -311,7 +311,7 @@ static void USB_Device_GetStatus(void)
 
        Endpoint_ClearSETUP();
 
 
        Endpoint_ClearSETUP();
 
-       Endpoint_Write_Word_LE(CurrentStatus);
+       Endpoint_Write_16_LE(CurrentStatus);
        Endpoint_ClearIN();
 
        Endpoint_ClearStatusStage();
        Endpoint_ClearIN();
 
        Endpoint_ClearStatusStage();
index 893a6ff..0deb284 100644 (file)
@@ -65,7 +65,7 @@ uint8_t Endpoint_Discard_Stream(uint16_t Length,
                }\r
                else\r
                {\r
                }\r
                else\r
                {\r
-                       Endpoint_Discard_Byte();\r
+                       Endpoint_Discard_8();\r
 \r
                        Length--;\r
                        BytesInTransfer++;\r
 \r
                        Length--;\r
                        BytesInTransfer++;\r
@@ -104,7 +104,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
                }\r
                else\r
                {\r
                }\r
                else\r
                {\r
-                       Endpoint_Write_Byte(0);\r
+                       Endpoint_Write_8(0);\r
 \r
                        Length--;\r
                        BytesInTransfer++;\r
 \r
                        Length--;\r
                        BytesInTransfer++;\r
@@ -119,7 +119,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(*BufferPtr)\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Stream_BE\r
@@ -127,7 +127,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(*BufferPtr)\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_LE\r
@@ -135,7 +135,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_Byte()\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Stream_BE\r
@@ -143,7 +143,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
 #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_Byte()\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
 #include "Template/Template_Endpoint_RW.c"\r
 \r
 #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
@@ -152,7 +152,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(pgm_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_PStream_BE\r
@@ -160,7 +160,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(pgm_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_RW.c"\r
 #endif\r
 \r
        #include "Template/Template_Endpoint_RW.c"\r
 #endif\r
 \r
@@ -170,7 +170,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_EStream_BE\r
@@ -178,7 +178,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_LE\r
@@ -186,7 +186,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE\r
        #include "Template/Template_Endpoint_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_EStream_BE\r
@@ -194,7 +194,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
        #define  TEMPLATE_CLEAR_ENDPOINT()                 Endpoint_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
        #include "Template/Template_Endpoint_RW.c"\r
 #endif\r
 \r
        #include "Template/Template_Endpoint_RW.c"\r
 #endif\r
 \r
@@ -203,38 +203,38 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_LE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(*BufferPtr)\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
 #include "Template/Template_Endpoint_Control_W.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
 #include "Template/Template_Endpoint_Control_W.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_Stream_BE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(*BufferPtr)\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(*BufferPtr)\r
 #include "Template/Template_Endpoint_Control_W.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
 #include "Template/Template_Endpoint_Control_W.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_LE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_Byte()\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
 #include "Template/Template_Endpoint_Control_R.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
 #include "Template/Template_Endpoint_Control_R.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_Stream_BE\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_Byte()\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Endpoint_Read_8()\r
 #include "Template/Template_Endpoint_Control_R.c"\r
 \r
 #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_LE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
 #include "Template/Template_Endpoint_Control_R.c"\r
 \r
 #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_LE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(pgm_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_BE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_PStream_BE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(pgm_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(pgm_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 #endif\r
 \r
        #include "Template/Template_Endpoint_Control_W.c"\r
 #endif\r
 \r
@@ -242,25 +242,25 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_LE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_LE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_BE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Write_Control_EStream_BE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Endpoint_Write_8(eeprom_read_byte(BufferPtr))\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_LE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
        #include "Template/Template_Endpoint_Control_W.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_LE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
        #include "Template/Template_Endpoint_Control_R.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_BE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
        #include "Template/Template_Endpoint_Control_R.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Endpoint_Read_Control_EStream_BE\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   BufferPtr -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Endpoint_Read_8())\r
        #include "Template/Template_Endpoint_Control_R.c"\r
 #endif\r
 \r
        #include "Template/Template_Endpoint_Control_R.c"\r
 #endif\r
 \r
index 5b443e7..412ac89 100644 (file)
@@ -53,11 +53,11 @@ uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
 
        Pipe_Unfreeze();
 
 
        Pipe_Unfreeze();
 
-       Pipe_Write_Byte(USB_ControlRequest.bmRequestType);
-       Pipe_Write_Byte(USB_ControlRequest.bRequest);
-       Pipe_Write_Word_LE(USB_ControlRequest.wValue);
-       Pipe_Write_Word_LE(USB_ControlRequest.wIndex);
-       Pipe_Write_Word_LE(USB_ControlRequest.wLength);
+       Pipe_Write_8(USB_ControlRequest.bmRequestType);
+       Pipe_Write_8(USB_ControlRequest.bRequest);
+       Pipe_Write_16_LE(USB_ControlRequest.wValue);
+       Pipe_Write_16_LE(USB_ControlRequest.wIndex);
+       Pipe_Write_16_LE(USB_ControlRequest.wLength);
 
        Pipe_ClearSETUP();
 
 
        Pipe_ClearSETUP();
 
@@ -87,7 +87,7 @@ uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
 
                                while (Pipe_BytesInPipe() && DataLen)
                                {
 
                                while (Pipe_BytesInPipe() && DataLen)
                                {
-                                       *(DataStream++) = Pipe_Read_Byte();
+                                       *(DataStream++) = Pipe_Read_8();
                                        DataLen--;
                                }
 
                                        DataLen--;
                                }
 
@@ -121,7 +121,7 @@ uint8_t USB_Host_SendControlRequest(void* const BufferPtr)
 
                                while (DataLen && (Pipe_BytesInPipe() < USB_ControlPipeSize))
                                {
 
                                while (DataLen && (Pipe_BytesInPipe() < USB_ControlPipeSize))
                                {
-                                       Pipe_Write_Byte(*(DataStream++));
+                                       Pipe_Write_8(*(DataStream++));
                                        DataLen--;
                                }
 
                                        DataLen--;
                                }
 
index 66babf4..475d597 100644 (file)
@@ -109,7 +109,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
                }\r
                else\r
                {\r
                }\r
                else\r
                {\r
-                       Pipe_Write_Byte(0);\r
+                       Pipe_Write_8(0);\r
                        \r
                        Length--;\r
                        BytesInTransfer++;\r
                        \r
                        Length--;\r
                        BytesInTransfer++;\r
@@ -128,7 +128,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_Byte(*BufferPtr)\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_BE\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Pipe_Write_Stream_BE\r
@@ -137,7 +137,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_Byte(*BufferPtr)\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(*BufferPtr)\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_LE\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_LE\r
@@ -146,7 +146,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_Byte()\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_BE\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #define  TEMPLATE_FUNC_NAME                        Pipe_Read_Stream_BE\r
@@ -155,7 +155,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
 #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
 #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
 #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_Byte()\r
+#define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         *BufferPtr = Pipe_Read_8()\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)\r
@@ -165,7 +165,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_Byte(pgm_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(pgm_read_byte(BufferPtr))\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Write_PStream_BE\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Write_PStream_BE\r
@@ -174,7 +174,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_Byte(pgm_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(pgm_read_byte(BufferPtr))\r
        #include "Template/Template_Pipe_RW.c"\r
 #endif\r
 \r
        #include "Template/Template_Pipe_RW.c"\r
 #endif\r
 \r
@@ -185,7 +185,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_Byte(eeprom_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(eeprom_read_byte(BufferPtr))\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Write_EStream_BE\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Write_EStream_BE\r
@@ -194,7 +194,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearOUT()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_Byte(eeprom_read_byte(BufferPtr))\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         Pipe_Write_8(eeprom_read_byte(BufferPtr))\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_LE\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_LE\r
@@ -203,7 +203,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            0\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream += Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_Byte())\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_8())\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_BE\r
        #include "Template/Template_Pipe_RW.c"\r
 \r
        #define  TEMPLATE_FUNC_NAME                        Pipe_Read_EStream_BE\r
@@ -212,7 +212,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
        #define  TEMPLATE_CLEAR_PIPE()                     Pipe_ClearIN()\r
        #define  TEMPLATE_BUFFER_OFFSET(Length)            (Length - 1)\r
        #define  TEMPLATE_BUFFER_MOVE(BufferPtr, Amount)   DataStream -= Amount\r
-       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_Byte())\r
+       #define  TEMPLATE_TRANSFER_BYTE(BufferPtr)         eeprom_update_byte(BufferPtr, Pipe_Read_8())\r
        #include "Template/Template_Pipe_RW.c"\r
 #endif\r
 \r
        #include "Template/Template_Pipe_RW.c"\r
 #endif\r
 \r
index 4a2cd67..4c3aa09 100644 (file)
                                #define ENDPOINT_DETAILS_EP6                   256, 2                   \r
                        #endif\r
 \r
                                #define ENDPOINT_DETAILS_EP6                   256, 2                   \r
                        #endif\r
 \r
+                       #define ENDPOINT_HSB_ADDRESS_SPACE_SIZE        (64 * 1024UL)\r
+\r
                /* Inline Functions: */\r
                        static inline uint32_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST\r
                                                                                                ATTR_ALWAYS_INLINE;\r
                /* Inline Functions: */\r
                        static inline uint32_t Endpoint_BytesToEPSizeMask(const uint16_t Bytes) ATTR_WARN_UNUSED_RESULT ATTR_CONST\r
                                                                                                ATTR_ALWAYS_INLINE;\r
                        {\r
                                AVR32_USBB.uerst |=  (AVR32_USBB_EPRST0_MASK << EndpointNumber);\r
                                AVR32_USBB.uerst &= ~(AVR32_USBB_EPRST0_MASK << EndpointNumber);\r
                        {\r
                                AVR32_USBB.uerst |=  (AVR32_USBB_EPRST0_MASK << EndpointNumber);\r
                                AVR32_USBB.uerst &= ~(AVR32_USBB_EPRST0_MASK << EndpointNumber);\r
-                               USB_EndpointFIFOPos[EndpointNumber] = &AVR32_USBB_SLAVE[EndpointNumber * 0x10000];\r
+                               USB_EndpointFIFOPos[EndpointNumber] = &AVR32_USBB_SLAVE[EndpointNumber * ENDPOINT_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Enables the currently selected endpoint so that data can be sent and received through it to\r
                        }\r
 \r
                        /** Enables the currently selected endpoint so that data can be sent and received through it to\r
                        static inline void Endpoint_ClearSETUP(void)\r
                        {\r
                                (&AVR32_USBB.UESTA0CLR)[USB_SelectedEndpoint].rxstpic = true;\r
                        static inline void Endpoint_ClearSETUP(void)\r
                        {\r
                                (&AVR32_USBB.UESTA0CLR)[USB_SelectedEndpoint].rxstpic = true;\r
-                               USB_EndpointFIFOPos[USB_SelectedEndpoint] = &AVR32_USBB_SLAVE[USB_SelectedEndpoint * 0x10000];\r
+                               USB_EndpointFIFOPos[USB_SelectedEndpoint] = &AVR32_USBB_SLAVE[USB_SelectedEndpoint * ENDPOINT_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Sends an IN packet to the host on the currently selected endpoint, freeing up the endpoint for the\r
                        }\r
 \r
                        /** Sends an IN packet to the host on the currently selected endpoint, freeing up the endpoint for the\r
                        {\r
                                (&AVR32_USBB.UESTA0CLR)[USB_SelectedEndpoint].txinic   = true;\r
                                (&AVR32_USBB.UECON0CLR)[USB_SelectedEndpoint].fifoconc = true;\r
                        {\r
                                (&AVR32_USBB.UESTA0CLR)[USB_SelectedEndpoint].txinic   = true;\r
                                (&AVR32_USBB.UECON0CLR)[USB_SelectedEndpoint].fifoconc = true;\r
-                               USB_EndpointFIFOPos[USB_SelectedEndpoint] = &AVR32_USBB_SLAVE[USB_SelectedEndpoint * 0x10000];\r
+                               USB_EndpointFIFOPos[USB_SelectedEndpoint] = &AVR32_USBB_SLAVE[USB_SelectedEndpoint * ENDPOINT_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Acknowledges an OUT packet to the host on the currently selected endpoint, freeing up the endpoint\r
                        }\r
 \r
                        /** Acknowledges an OUT packet to the host on the currently selected endpoint, freeing up the endpoint\r
                        {\r
                                (&AVR32_USBB.UESTA0CLR)[USB_SelectedEndpoint].rxoutic  = true;\r
                                (&AVR32_USBB.UECON0CLR)[USB_SelectedEndpoint].fifoconc = true;\r
                        {\r
                                (&AVR32_USBB.UESTA0CLR)[USB_SelectedEndpoint].rxoutic  = true;\r
                                (&AVR32_USBB.UECON0CLR)[USB_SelectedEndpoint].fifoconc = true;\r
-                               USB_EndpointFIFOPos[USB_SelectedEndpoint] = &AVR32_USBB_SLAVE[USB_SelectedEndpoint * 0x10000];\r
+                               USB_EndpointFIFOPos[USB_SelectedEndpoint] = &AVR32_USBB_SLAVE[USB_SelectedEndpoint * ENDPOINT_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Stalls the current endpoint, indicating to the host that a logical problem occurred with the\r
                        }\r
 \r
                        /** Stalls the current endpoint, indicating to the host that a logical problem occurred with the\r
 \r
                        /** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
 \r
                        /** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointPrimitiveRW_AVR32\r
+                        *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *  \return Next byte in the currently selected endpoint's FIFO buffer.\r
                         */\r
                         *\r
                         *  \return Next byte in the currently selected endpoint's FIFO buffer.\r
                         */\r
-                       static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint8_t Endpoint_Read_Byte(void)\r
+                       static inline uint8_t Endpoint_Read_8(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint8_t Endpoint_Read_8(void)\r
                        {\r
                                return *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                        }\r
 \r
                        /** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints.\r
                         *\r
                        {\r
                                return *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                        }\r
 \r
                        /** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints.\r
                         *\r
-                        *  \ingroup Group_EndpointPrimitiveRW_AVR32\r
+                        *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
-                        *  \param[in] Byte  Next byte to write into the the currently selected endpoint's FIFO buffer.\r
+                        *  \param[in] Data  Data to write into the the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Endpoint_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Write_Byte(const uint8_t Byte)\r
+                       static inline void Endpoint_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Write_8(const uint8_t Data)\r
                        {\r
                        {\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = Byte;\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = Data;\r
                        }\r
 \r
                        /** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         */\r
                        }\r
 \r
                        /** Discards one byte from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         */\r
-                       static inline void Endpoint_Discard_Byte(void) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Discard_Byte(void)\r
+                       static inline void Endpoint_Discard_8(void) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Discard_8(void)\r
                        {\r
                                uint8_t Dummy;\r
 \r
                        {\r
                                uint8_t Dummy;\r
 \r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \return Next word in the currently selected endpoint's FIFO buffer.\r
+                        *  \return Next two bytes in the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint16_t Endpoint_Read_Word_LE(void)\r
+                       static inline uint16_t Endpoint_Read_16_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint16_t Endpoint_Read_16_LE(void)\r
                        {\r
                                uint16_t Byte1 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint16_t Byte0 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                        {\r
                                uint16_t Byte1 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint16_t Byte0 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \return Next word in the currently selected endpoint's FIFO buffer.\r
+                        *  \return Next two bytes in the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint16_t Endpoint_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint16_t Endpoint_Read_Word_BE(void)\r
+                       static inline uint16_t Endpoint_Read_16_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint16_t Endpoint_Read_16_BE(void)\r
                        {\r
                                uint16_t Byte0 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint16_t Byte1 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                        {\r
                                uint16_t Byte0 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint16_t Byte1 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] Word  Next word to write to the currently selected endpoint's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Endpoint_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Write_Word_LE(const uint16_t Word)\r
+                       static inline void Endpoint_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Write_16_LE(const uint16_t Data)\r
                        {\r
                        {\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Word >> 8);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Word & 0xFF);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 8);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data & 0xFF);\r
                        }\r
 \r
                        /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN\r
                        }\r
 \r
                        /** Writes two bytes to the currently selected endpoint's bank in big endian format, for IN\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] Word  Next word to write to the currently selected endpoint's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Endpoint_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Write_Word_BE(const uint16_t Word)\r
+                       static inline void Endpoint_Write_16_BE(const uint16_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Write_16_BE(const uint16_t Data)\r
                        {\r
                        {\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Word & 0xFF);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Word >> 8);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data & 0xFF);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 8);\r
                        }\r
 \r
                        /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         */\r
                        }\r
 \r
                        /** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         */\r
-                       static inline void Endpoint_Discard_Word(void) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Discard_Word(void)\r
+                       static inline void Endpoint_Discard_16(void) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Discard_16(void)\r
                        {\r
                                uint8_t Dummy;\r
 \r
                        {\r
                                uint8_t Dummy;\r
 \r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \return Next double word in the currently selected endpoint's FIFO buffer.\r
+                        *  \return Next four bytes in the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint32_t Endpoint_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint32_t Endpoint_Read_DWord_LE(void)\r
+                       static inline uint32_t Endpoint_Read_32_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint32_t Endpoint_Read_32_LE(void)\r
                        {\r
                                uint32_t Byte3 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint32_t Byte2 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                        {\r
                                uint32_t Byte3 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint32_t Byte2 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \return Next double word in the currently selected endpoint's FIFO buffer.\r
+                        *  \return Next four bytes in the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint32_t Endpoint_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint32_t Endpoint_Read_DWord_BE(void)\r
+                       static inline uint32_t Endpoint_Read_32_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint32_t Endpoint_Read_32_BE(void)\r
                        {\r
                                uint32_t Byte0 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint32_t Byte1 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                        {\r
                                uint32_t Byte0 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                                uint32_t Byte1 = *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++);\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] DWord  Next double word to write to the currently selected endpoint's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Endpoint_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Write_DWord_LE(const uint32_t DWord)\r
+                       static inline void Endpoint_Write_32_LE(const uint32_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Write_32_LE(const uint32_t Data)\r
                        {\r
                        {\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord >> 24);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord >> 16);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord >> 8);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord &  0xFF);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 24);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 16);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 8);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data &  0xFF);\r
                        }\r
 \r
                        /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN\r
                        }\r
 \r
                        /** Writes four bytes to the currently selected endpoint's bank in big endian format, for IN\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] DWord  Next double word to write to the currently selected endpoint's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected endpoint's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Endpoint_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Write_DWord_BE(const uint32_t DWord)\r
+                       static inline void Endpoint_Write_32_BE(const uint32_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Write_32_BE(const uint32_t Data)\r
                        {\r
                        {\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord &  0xFF);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord >> 8);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord >> 16);\r
-                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (DWord >> 24);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data &  0xFF);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 8);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 16);\r
+                               *(USB_EndpointFIFOPos[USB_SelectedEndpoint]++) = (Data >> 24);\r
                        }\r
 \r
                        /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         */\r
                        }\r
 \r
                        /** Discards four bytes from the currently selected endpoint's bank, for OUT direction endpoints.\r
                         *\r
                         *  \ingroup Group_EndpointPrimitiveRW_UC3\r
                         */\r
-                       static inline void Endpoint_Discard_DWord(void) ATTR_ALWAYS_INLINE;\r
-                       static inline void Endpoint_Discard_DWord(void)\r
+                       static inline void Endpoint_Discard_32(void) ATTR_ALWAYS_INLINE;\r
+                       static inline void Endpoint_Discard_32(void)\r
                        {\r
                                uint8_t Dummy;\r
 \r
                        {\r
                                uint8_t Dummy;\r
 \r
index 10d4434..d7a7da2 100644 (file)
@@ -98,6 +98,9 @@
 \r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
 \r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
+               /* Macros: */\r
+                       #define PIPE_HSB_ADDRESS_SPACE_SIZE    (64 * 1024UL)\r
+       \r
                /* External Variables: */\r
                        extern volatile uint8_t  USB_SelectedPipe;\r
                        extern volatile uint8_t* USB_PipeFIFOPos[];\r
                /* External Variables: */\r
                        extern volatile uint8_t  USB_SelectedPipe;\r
                        extern volatile uint8_t* USB_PipeFIFOPos[];\r
                         *  bank.\r
                         */\r
                        #define PIPE_BANK_DOUBLE                AVR32_USBB_UPCFG0_PBK_DOUBLE\r
                         *  bank.\r
                         */\r
                        #define PIPE_BANK_DOUBLE                AVR32_USBB_UPCFG0_PBK_DOUBLE\r
-\r
-                       /** Mask for the bank mode selection for the \ref Pipe_ConfigurePipe() macro. This indicates that the pipe\r
-                        *  should have three banks, which requires more USB FIFO memory but results in faster transfers as one\r
-                        *  USB device (the AVR or the attached device) can access one bank while the other accesses the remaining\r
-                        *  banks.\r
-                        */\r
-                       #define PIPE_BANK_TRIPLE                AVR32_USBB_UPCFG0_PBK_TRIPLE\r
                        //@}\r
 \r
                        /** Default size of the default control pipe's bank, until altered by the Endpoint0Size value\r
                        //@}\r
 \r
                        /** Default size of the default control pipe's bank, until altered by the Endpoint0Size value\r
                        {\r
                                AVR32_USBB.uprst |=  (AVR32_USBB_PRST0_MASK << PipeNumber);\r
                                AVR32_USBB.uprst &= ~(AVR32_USBB_PRST0_MASK << PipeNumber);\r
                        {\r
                                AVR32_USBB.uprst |=  (AVR32_USBB_PRST0_MASK << PipeNumber);\r
                                AVR32_USBB.uprst &= ~(AVR32_USBB_PRST0_MASK << PipeNumber);\r
-                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * PIPE_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Enables the currently selected pipe so that data can be sent and received through it to and from\r
                        }\r
 \r
                        /** Enables the currently selected pipe so that data can be sent and received through it to and from\r
                        static inline void Pipe_ClearSETUP(void)\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].txstpic = true;\r
                        static inline void Pipe_ClearSETUP(void)\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].txstpic = true;\r
-                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * PIPE_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Acknowledges the reception of a setup IN request from the attached device on the currently selected\r
                        }\r
 \r
                        /** Acknowledges the reception of a setup IN request from the attached device on the currently selected\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].rxinic   = true;\r
                                (&AVR32_USBB.UPCON0CLR)[USB_SelectedPipe].fifoconc = true;\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].rxinic   = true;\r
                                (&AVR32_USBB.UPCON0CLR)[USB_SelectedPipe].fifoconc = true;\r
-                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * PIPE_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Sends the currently selected pipe's contents to the device as an OUT packet on the selected pipe, freeing\r
                        }\r
 \r
                        /** Sends the currently selected pipe's contents to the device as an OUT packet on the selected pipe, freeing\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].txoutic  = true;\r
                                (&AVR32_USBB.UPCON0CLR)[USB_SelectedPipe].fifoconc = true;\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].txoutic  = true;\r
                                (&AVR32_USBB.UPCON0CLR)[USB_SelectedPipe].fifoconc = true;\r
-                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * PIPE_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Determines if the device sent a NAK (Negative Acknowledge) in response to the last sent packet on\r
                        }\r
 \r
                        /** Determines if the device sent a NAK (Negative Acknowledge) in response to the last sent packet on\r
                        static inline void Pipe_ClearStall(void)\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].rxstalldic = true;\r
                        static inline void Pipe_ClearStall(void)\r
                        {\r
                                (&AVR32_USBB.UPSTA0CLR)[USB_SelectedPipe].rxstalldic = true;\r
-                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * 0x10000];\r
+                               USB_PipeFIFOPos[USB_SelectedPipe] = &AVR32_USBB_SLAVE[USB_SelectedPipe * PIPE_HSB_ADDRESS_SPACE_SIZE];\r
                        }\r
 \r
                        /** Reads one byte from the currently selected pipe's bank, for OUT direction pipes.\r
                        }\r
 \r
                        /** Reads one byte from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \return Next byte in the currently selected pipe's FIFO buffer.\r
                         */\r
                         *\r
                         *  \return Next byte in the currently selected pipe's FIFO buffer.\r
                         */\r
-                       static inline uint8_t Pipe_Read_Byte(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint8_t Pipe_Read_Byte(void)\r
+                       static inline uint8_t Pipe_Read_8(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint8_t Pipe_Read_8(void)\r
                        {\r
                                return *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                        }\r
                        {\r
                                return *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                        }\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] Byte  Next byte to write into the the currently selected pipe's FIFO buffer.\r
+                        *  \param[in] Data  Data to write into the the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Pipe_Write_Byte(const uint8_t Byte) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Write_Byte(const uint8_t Byte)\r
+                       static inline void Pipe_Write_8(const uint8_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Write_8(const uint8_t Data)\r
                        {\r
                        {\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = Byte;\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = Data;\r
                        }\r
 \r
                        /** Discards one byte from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         */\r
                        }\r
 \r
                        /** Discards one byte from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         */\r
-                       static inline void Pipe_Discard_Byte(void) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Discard_Byte(void)\r
+                       static inline void Pipe_Discard_8(void) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Discard_8(void)\r
                        {\r
                                uint8_t Dummy;\r
 \r
                        {\r
                                uint8_t Dummy;\r
 \r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \return Next word in the currently selected pipe's FIFO buffer.\r
+                        *  \return Next two bytes in the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint16_t Pipe_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint16_t Pipe_Read_Word_LE(void)\r
+                       static inline uint16_t Pipe_Read_16_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint16_t Pipe_Read_16_LE(void)\r
                        {\r
                                uint16_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint16_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                        {\r
                                uint16_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint16_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \return Next word in the currently selected pipe's FIFO buffer.\r
+                        *  \return Next two bytes in the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint16_t Pipe_Read_Word_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint16_t Pipe_Read_Word_BE(void)\r
+                       static inline uint16_t Pipe_Read_16_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint16_t Pipe_Read_16_BE(void)\r
                        {\r
                                uint16_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint16_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                        {\r
                                uint16_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint16_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] Word  Next word to write to the currently selected pipe's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Pipe_Write_Word_LE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Write_Word_LE(const uint16_t Word)\r
+                       static inline void Pipe_Write_16_LE(const uint16_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Write_16_LE(const uint16_t Data)\r
                        {\r
                        {\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Word >> 8);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Word & 0xFF);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 8);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data & 0xFF);\r
                        }\r
 \r
                        /** Writes two bytes to the currently selected pipe's bank in big endian format, for IN\r
                        }\r
 \r
                        /** Writes two bytes to the currently selected pipe's bank in big endian format, for IN\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] Word  Next word to write to the currently selected pipe's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Pipe_Write_Word_BE(const uint16_t Word) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Write_Word_BE(const uint16_t Word)\r
+                       static inline void Pipe_Write_16_BE(const uint16_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Write_16_BE(const uint16_t Data)\r
                        {\r
                        {\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Word & 0xFF);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Word >> 8);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data & 0xFF);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 8);\r
                        }\r
 \r
                        /** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         */\r
                        }\r
 \r
                        /** Discards two bytes from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         */\r
-                       static inline void Pipe_Discard_Word(void) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Discard_Word(void)\r
+                       static inline void Pipe_Discard_16(void) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Discard_16(void)\r
                        {\r
                                uint8_t Dummy;\r
 \r
                        {\r
                                uint8_t Dummy;\r
 \r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \return Next double word in the currently selected pipe's FIFO buffer.\r
+                        *  \return Next four bytes in the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint32_t Pipe_Read_DWord_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint32_t Pipe_Read_DWord_LE(void)\r
+                       static inline uint32_t Pipe_Read_32_LE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint32_t Pipe_Read_32_LE(void)\r
                        {\r
                                uint32_t Byte3 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint32_t Byte2 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                        {\r
                                uint32_t Byte3 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint32_t Byte2 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \return Next double word in the currently selected pipe's FIFO buffer.\r
+                        *  \return Next four bytes in the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline uint32_t Pipe_Read_DWord_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
-                       static inline uint32_t Pipe_Read_DWord_BE(void)\r
+                       static inline uint32_t Pipe_Read_32_BE(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;\r
+                       static inline uint32_t Pipe_Read_32_BE(void)\r
                        {\r
                                uint32_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint32_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                        {\r
                                uint32_t Byte0 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                                uint32_t Byte1 = *(USB_PipeFIFOPos[USB_SelectedPipe]++);\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] DWord  Next double word to write to the currently selected pipe's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Pipe_Write_DWord_LE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Write_DWord_LE(const uint32_t DWord)\r
+                       static inline void Pipe_Write_32_LE(const uint32_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Write_32_LE(const uint32_t Data)\r
                        {\r
                        {\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord >> 24);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord >> 16);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord >> 8);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord &  0xFF);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 24);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 16);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 8);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data &  0xFF);\r
                        }\r
 \r
                        /** Writes four bytes to the currently selected pipe's bank in big endian format, for IN\r
                        }\r
 \r
                        /** Writes four bytes to the currently selected pipe's bank in big endian format, for IN\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         *\r
-                        *  \param[in] DWord  Next double word to write to the currently selected pipe's FIFO buffer.\r
+                        *  \param[in] Data  Data to write to the currently selected pipe's FIFO buffer.\r
                         */\r
                         */\r
-                       static inline void Pipe_Write_DWord_BE(const uint32_t DWord) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Write_DWord_BE(const uint32_t DWord)\r
+                       static inline void Pipe_Write_32_BE(const uint32_t Data) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Write_32_BE(const uint32_t Data)\r
                        {\r
                        {\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord &  0xFF);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord >> 8);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord >> 16);\r
-                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (DWord >> 24);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data &  0xFF);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 8);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 16);\r
+                               *(USB_PipeFIFOPos[USB_SelectedPipe]++) = (Data >> 24);\r
                        }\r
 \r
                        /** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         */\r
                        }\r
 \r
                        /** Discards four bytes from the currently selected pipe's bank, for OUT direction pipes.\r
                         *\r
                         *  \ingroup Group_PipePrimitiveRW_UC3\r
                         */\r
-                       static inline void Pipe_Discard_DWord(void) ATTR_ALWAYS_INLINE;\r
-                       static inline void Pipe_Discard_DWord(void)\r
+                       static inline void Pipe_Discard_32(void) ATTR_ALWAYS_INLINE;\r
+                       static inline void Pipe_Discard_32(void)\r
                        {\r
                                uint8_t Dummy;\r
 \r
                        {\r
                                uint8_t Dummy;\r
 \r
index 7b5c667..5d5f6db 100644 (file)
   *   - Endpoint_ResetFIFO() renamed to Endpoint_ResetEndpoint(), to be consistent with the Pipe_ResetPipe() function name
   *   - Implemented on-demand PLL clock generation for the U4, U6 and U7 series USB AVRs when automatic PLL mode is specified
   *   - F_CLOCK changed to F_USB to be more descriptive, and applicable on future architecture ports
   *   - Endpoint_ResetFIFO() renamed to Endpoint_ResetEndpoint(), to be consistent with the Pipe_ResetPipe() function name
   *   - Implemented on-demand PLL clock generation for the U4, U6 and U7 series USB AVRs when automatic PLL mode is specified
   *   - F_CLOCK changed to F_USB to be more descriptive, and applicable on future architecture ports
+  *   - Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_* functions to use the number of bits instead of
+  *     a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures
+  *   - Renamed all low level Pipe_Read_*, Pipe_Write_* and Pipe_Discard_* functions to use the number of bits instead of
+  *     a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures
   *  - Library Applications:
   *   - Changed the XPLAINBridge software UART to use the regular timer CTC mode instead of the alternative CTC mode
   *     via the Input Capture register, to reduce user confusion
   *  - Library Applications:
   *   - Changed the XPLAINBridge software UART to use the regular timer CTC mode instead of the alternative CTC mode
   *     via the Input Capture register, to reduce user confusion
index cb94bad..8d35bbd 100644 (file)
  *      should use the new \ref CDC_Device_SendData() function, or remove the length parameter from the function call.
  *    - The Endpoint_ResetFIFO() function has been renamed to \ref Endpoint_ResetEndpoint(), to make the API function names more
  *      consistent. Existing applications using the old function name should simply replace it with a call to the new function name.
  *      should use the new \ref CDC_Device_SendData() function, or remove the length parameter from the function call.
  *    - The Endpoint_ResetFIFO() function has been renamed to \ref Endpoint_ResetEndpoint(), to make the API function names more
  *      consistent. Existing applications using the old function name should simply replace it with a call to the new function name.
+ *    - The Endpoint_*_Byte() functions have been renamed Endpoint_*_8() to ensure they are correct across all architectures. Existing
+ *      code using these functions should replace the previous function names with the new function names.
+ *    - The Endpoint_*_Word() functions have been renamed Endpoint_*_16() to ensure they are correct across all architectures. Existing
+ *      code using these functions should replace the previous function names with the new function names.
+ *    - The Endpoint_*_DWord() functions have been renamed Endpoint_*_32() to ensure they are correct across all architectures. Existing
+ *      code using these functions should replace the previous function names with the new function names.
  *
  *  <b>Host Mode</b>
  *    - The Pipe stream functions now all require a \c BytesProcessed parameter instead of the previous callback parameter.
  *
  *  <b>Host Mode</b>
  *    - The Pipe stream functions now all require a \c BytesProcessed parameter instead of the previous callback parameter.
  *      length parameter from the function call.
  *    - The Pipe_ClearErrorFlags() function has been removed, as the pipe error flags are now automatically cleared when the
  *      \ref Pipe_ClearError() function is called.
  *      length parameter from the function call.
  *    - The Pipe_ClearErrorFlags() function has been removed, as the pipe error flags are now automatically cleared when the
  *      \ref Pipe_ClearError() function is called.
+ *    - The Pipe_*_Byte() functions have been renamed Pipe_*_8() to ensure they are correct across all architectures. Existing code using
+ *      these functions should replace the previous function names with the new function names.
+ *    - The Pipe_*_Word() functions have been renamed Pipe_*_16() to ensure they are correct across all architectures. Existing code using
+ *      these functions should replace the previous function names with the new function names.
+ *    - The Pipe_*_DWord() functions have been renamed Pipe_*_32() to ensure they are correct across all architectures. Existing code using
+ *      these functions should replace the previous function names with the new function names.
  *
  *  \section Sec_Migration101122 Migrating from 100807 to 101122
  *  <b>USB Core</b>
  *
  *  \section Sec_Migration101122 Migrating from 100807 to 101122
  *  <b>USB Core</b>
  *    - All pipe read/write/discard aliases which did not have an explicitly endianness specifier (such as \c Pipe_Read_Word()) have
  *      been removed for clarity. Existing projects should use the \c _LE suffix on such calls to use the explicit Little Endian versions.
  *    - The \c Host_IsResetBusDone() macro has been renamed to \c Host_IsBusResetComplete().
  *    - All pipe read/write/discard aliases which did not have an explicitly endianness specifier (such as \c Pipe_Read_Word()) have
  *      been removed for clarity. Existing projects should use the \c _LE suffix on such calls to use the explicit Little Endian versions.
  *    - The \c Host_IsResetBusDone() macro has been renamed to \c Host_IsBusResetComplete().
- *    - The \c Pipe_Ignore_Word() and \c Pipe_Ignore_DWord() functions have been renamed to \ref Pipe_Discard_Word() and \ref Pipe_Discard_DWord()
+ *    - The \c Pipe_Ignore_Word() and \c Pipe_Ignore_DWord() functions have been renamed to \c Pipe_Discard_Word() and \c Pipe_Discard_DWord()
  *      to remain consistent with the rest of the pipe API.
  *    - It is no longer needed to manually include the headers from \c LUFA/Drivers/USB/Class, as they are now included along with the rest
  *      of the USB headers when \c LUFA/Drivers/USB/USB.h is included.
  *      to remain consistent with the rest of the pipe API.
  *    - It is no longer needed to manually include the headers from \c LUFA/Drivers/USB/Class, as they are now included along with the rest
  *      of the USB headers when \c LUFA/Drivers/USB/USB.h is included.
index 8b9ff27..421046b 100644 (file)
@@ -95,8 +95,8 @@ void ISPProtocol_EnterISPMode(void)
                }
        }
 
                }
        }
 
-       Endpoint_Write_Byte(CMD_ENTER_PROGMODE_ISP);
-       Endpoint_Write_Byte(ResponseStatus);
+       Endpoint_Write_8(CMD_ENTER_PROGMODE_ISP);
+       Endpoint_Write_8(ResponseStatus);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -121,8 +121,8 @@ void ISPProtocol_LeaveISPMode(void)
        ISPTarget_DisableTargetISP();
        ISPProtocol_DelayMS(Leave_ISP_Params.PostDelayMS);
 
        ISPTarget_DisableTargetISP();
        ISPProtocol_DelayMS(Leave_ISP_Params.PostDelayMS);
 
-       Endpoint_Write_Byte(CMD_LEAVE_PROGMODE_ISP);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(CMD_LEAVE_PROGMODE_ISP);
+       Endpoint_Write_8(STATUS_CMD_OK);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -154,8 +154,8 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
                Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
                Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
                Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
                Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-               Endpoint_Write_Byte(V2Command);
-               Endpoint_Write_Byte(STATUS_CMD_FAILED);
+               Endpoint_Write_8(V2Command);
+               Endpoint_Write_8(STATUS_CMD_FAILED);
                Endpoint_ClearIN();
                return;
        }
                Endpoint_ClearIN();
                return;
        }
@@ -270,8 +270,8 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
                  MustLoadExtendedAddress = true;
        }       
 
                  MustLoadExtendedAddress = true;
        }       
 
-       Endpoint_Write_Byte(V2Command);
-       Endpoint_Write_Byte(ProgrammingStatus);
+       Endpoint_Write_8(V2Command);
+       Endpoint_Write_8(ProgrammingStatus);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -295,8 +295,8 @@ void ISPProtocol_ReadMemory(uint8_t V2Command)
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(V2Command);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(V2Command);
+       Endpoint_Write_8(STATUS_CMD_OK);
 
        /* Read each byte from the device and write them to the packet for the host */
        for (uint16_t CurrentByte = 0; CurrentByte < Read_Memory_Params.BytesToRead; CurrentByte++)
 
        /* Read each byte from the device and write them to the packet for the host */
        for (uint16_t CurrentByte = 0; CurrentByte < Read_Memory_Params.BytesToRead; CurrentByte++)
@@ -312,7 +312,7 @@ void ISPProtocol_ReadMemory(uint8_t V2Command)
                ISPTarget_SendByte(Read_Memory_Params.ReadMemoryCommand);
                ISPTarget_SendByte(CurrentAddress >> 8);
                ISPTarget_SendByte(CurrentAddress & 0xFF);
                ISPTarget_SendByte(Read_Memory_Params.ReadMemoryCommand);
                ISPTarget_SendByte(CurrentAddress >> 8);
                ISPTarget_SendByte(CurrentAddress & 0xFF);
-               Endpoint_Write_Byte(ISPTarget_ReceiveByte());
+               Endpoint_Write_8(ISPTarget_ReceiveByte());
 
                /* Check if the endpoint bank is currently full, if so send the packet */
                if (!(Endpoint_IsReadWriteAllowed()))
 
                /* Check if the endpoint bank is currently full, if so send the packet */
                if (!(Endpoint_IsReadWriteAllowed()))
@@ -338,7 +338,7 @@ void ISPProtocol_ReadMemory(uint8_t V2Command)
                }
        }
 
                }
        }
 
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(STATUS_CMD_OK);
 
        bool IsEndpointFull = !(Endpoint_IsReadWriteAllowed());
        Endpoint_ClearIN();
 
        bool IsEndpointFull = !(Endpoint_IsReadWriteAllowed());
        Endpoint_ClearIN();
@@ -380,8 +380,8 @@ void ISPProtocol_ChipErase(void)
        else
          ResponseStatus = ISPTarget_WaitWhileTargetBusy();
 
        else
          ResponseStatus = ISPTarget_WaitWhileTargetBusy();
 
-       Endpoint_Write_Byte(CMD_CHIP_ERASE_ISP);
-       Endpoint_Write_Byte(ResponseStatus);
+       Endpoint_Write_8(CMD_CHIP_ERASE_ISP);
+       Endpoint_Write_8(ResponseStatus);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -410,10 +410,10 @@ void ISPProtocol_ReadFuseLockSigOSCCAL(uint8_t V2Command)
        for (uint8_t RByte = 0; RByte < sizeof(ResponseBytes); RByte++)
          ResponseBytes[RByte] = ISPTarget_TransferByte(Read_FuseLockSigOSCCAL_Params.ReadCommandBytes[RByte]);
 
        for (uint8_t RByte = 0; RByte < sizeof(ResponseBytes); RByte++)
          ResponseBytes[RByte] = ISPTarget_TransferByte(Read_FuseLockSigOSCCAL_Params.ReadCommandBytes[RByte]);
 
-       Endpoint_Write_Byte(V2Command);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
-       Endpoint_Write_Byte(ResponseBytes[Read_FuseLockSigOSCCAL_Params.RetByte - 1]);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(V2Command);
+       Endpoint_Write_8(STATUS_CMD_OK);
+       Endpoint_Write_8(ResponseBytes[Read_FuseLockSigOSCCAL_Params.RetByte - 1]);
+       Endpoint_Write_8(STATUS_CMD_OK);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -439,9 +439,9 @@ void ISPProtocol_WriteFuseLock(uint8_t V2Command)
        for (uint8_t SByte = 0; SByte < sizeof(Write_FuseLockSig_Params.WriteCommandBytes); SByte++)
          ISPTarget_SendByte(Write_FuseLockSig_Params.WriteCommandBytes[SByte]);
 
        for (uint8_t SByte = 0; SByte < sizeof(Write_FuseLockSig_Params.WriteCommandBytes); SByte++)
          ISPTarget_SendByte(Write_FuseLockSig_Params.WriteCommandBytes[SByte]);
 
-       Endpoint_Write_Byte(V2Command);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(V2Command);
+       Endpoint_Write_8(STATUS_CMD_OK);
+       Endpoint_Write_8(STATUS_CMD_OK);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -463,8 +463,8 @@ void ISPProtocol_SPIMulti(void)
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(CMD_SPI_MULTI);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(CMD_SPI_MULTI);
+       Endpoint_Write_8(STATUS_CMD_OK);
 
        uint8_t CurrTxPos = 0;
        uint8_t CurrRxPos = 0;
 
        uint8_t CurrTxPos = 0;
        uint8_t CurrRxPos = 0;
@@ -484,9 +484,9 @@ void ISPProtocol_SPIMulti(void)
        while (CurrRxPos < SPI_Multi_Params.RxBytes)
        {
                if (CurrTxPos < SPI_Multi_Params.TxBytes)
        while (CurrRxPos < SPI_Multi_Params.RxBytes)
        {
                if (CurrTxPos < SPI_Multi_Params.TxBytes)
-                 Endpoint_Write_Byte(ISPTarget_TransferByte(SPI_Multi_Params.TxData[CurrTxPos++]));
+                 Endpoint_Write_8(ISPTarget_TransferByte(SPI_Multi_Params.TxData[CurrTxPos++]));
                else
                else
-                 Endpoint_Write_Byte(ISPTarget_ReceiveByte());
+                 Endpoint_Write_8(ISPTarget_ReceiveByte());
 
                /* Check to see if we have filled the endpoint bank and need to send the packet */
                if (!(Endpoint_IsReadWriteAllowed()))
 
                /* Check to see if we have filled the endpoint bank and need to send the packet */
                if (!(Endpoint_IsReadWriteAllowed()))
@@ -498,7 +498,7 @@ void ISPProtocol_SPIMulti(void)
                CurrRxPos++;
        }
 
                CurrRxPos++;
        }
 
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(STATUS_CMD_OK);
 
        bool IsEndpointFull = !(Endpoint_IsReadWriteAllowed());
        Endpoint_ClearIN();
 
        bool IsEndpointFull = !(Endpoint_IsReadWriteAllowed());
        Endpoint_ClearIN();
index b510d43..f763d63 100644 (file)
@@ -73,7 +73,7 @@ void V2Protocol_Init(void)
  */
 void V2Protocol_ProcessCommand(void)
 {
  */
 void V2Protocol_ProcessCommand(void)
 {
-       uint8_t V2Command = Endpoint_Read_Byte();
+       uint8_t V2Command = Endpoint_Read_8();
 
        /* Start the watchdog with timeout interrupt enabled to manage the timeout */
        TimeoutExpired = false;
 
        /* Start the watchdog with timeout interrupt enabled to manage the timeout */
        TimeoutExpired = false;
@@ -166,8 +166,8 @@ static void V2Protocol_UnknownCommand(const uint8_t V2Command)
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(V2Command);
-       Endpoint_Write_Byte(STATUS_CMD_UNKNOWN);
+       Endpoint_Write_8(V2Command);
+       Endpoint_Write_8(STATUS_CMD_UNKNOWN);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -178,9 +178,9 @@ static void V2Protocol_SignOn(void)
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(CMD_SIGN_ON);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
-       Endpoint_Write_Byte(sizeof(PROGRAMMER_ID) - 1);
+       Endpoint_Write_8(CMD_SIGN_ON);
+       Endpoint_Write_8(STATUS_CMD_OK);
+       Endpoint_Write_8(sizeof(PROGRAMMER_ID) - 1);
        Endpoint_Write_Stream_LE(PROGRAMMER_ID, (sizeof(PROGRAMMER_ID) - 1), NULL);
        Endpoint_ClearIN();
 }
        Endpoint_Write_Stream_LE(PROGRAMMER_ID, (sizeof(PROGRAMMER_ID) - 1), NULL);
        Endpoint_ClearIN();
 }
@@ -194,8 +194,8 @@ static void V2Protocol_ResetProtection(void)
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(CMD_RESET_PROTECTION);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(CMD_RESET_PROTECTION);
+       Endpoint_Write_8(STATUS_CMD_OK);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -207,33 +207,33 @@ static void V2Protocol_ResetProtection(void)
  */
 static void V2Protocol_GetSetParam(const uint8_t V2Command)
 {
  */
 static void V2Protocol_GetSetParam(const uint8_t V2Command)
 {
-       uint8_t ParamID = Endpoint_Read_Byte();
+       uint8_t ParamID = Endpoint_Read_8();
        uint8_t ParamValue;
 
        if (V2Command == CMD_SET_PARAMETER)
        uint8_t ParamValue;
 
        if (V2Command == CMD_SET_PARAMETER)
-         ParamValue = Endpoint_Read_Byte();
+         ParamValue = Endpoint_Read_8();
 
        Endpoint_ClearOUT();
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
 
        Endpoint_ClearOUT();
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(V2Command);
+       Endpoint_Write_8(V2Command);
 
        uint8_t ParamPrivs = V2Params_GetParameterPrivileges(ParamID);
 
        if ((V2Command == CMD_SET_PARAMETER) && (ParamPrivs & PARAM_PRIV_WRITE))
        {
 
        uint8_t ParamPrivs = V2Params_GetParameterPrivileges(ParamID);
 
        if ((V2Command == CMD_SET_PARAMETER) && (ParamPrivs & PARAM_PRIV_WRITE))
        {
-               Endpoint_Write_Byte(STATUS_CMD_OK);
+               Endpoint_Write_8(STATUS_CMD_OK);
                V2Params_SetParameterValue(ParamID, ParamValue);
        }
        else if ((V2Command == CMD_GET_PARAMETER) && (ParamPrivs & PARAM_PRIV_READ))
        {
                V2Params_SetParameterValue(ParamID, ParamValue);
        }
        else if ((V2Command == CMD_GET_PARAMETER) && (ParamPrivs & PARAM_PRIV_READ))
        {
-               Endpoint_Write_Byte(STATUS_CMD_OK);
-               Endpoint_Write_Byte(V2Params_GetParameterValue(ParamID));
+               Endpoint_Write_8(STATUS_CMD_OK);
+               Endpoint_Write_8(V2Params_GetParameterValue(ParamID));
        }
        else
        {
        }
        else
        {
-               Endpoint_Write_Byte(STATUS_CMD_FAILED);
+               Endpoint_Write_8(STATUS_CMD_FAILED);
        }
 
        Endpoint_ClearIN();
        }
 
        Endpoint_ClearIN();
@@ -254,8 +254,8 @@ static void V2Protocol_LoadAddress(void)
        if (CurrentAddress & (1UL << 31))
          MustLoadExtendedAddress = true;
 
        if (CurrentAddress & (1UL << 31))
          MustLoadExtendedAddress = true;
 
-       Endpoint_Write_Byte(CMD_LOAD_ADDRESS);
-       Endpoint_Write_Byte(STATUS_CMD_OK);
+       Endpoint_Write_8(CMD_LOAD_ADDRESS);
+       Endpoint_Write_8(STATUS_CMD_OK);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
index ffc07ad..72cc536 100644 (file)
@@ -70,8 +70,8 @@ void XPROGProtocol_SetMode(void)
 
        XPROG_SelectedProtocol = SetMode_XPROG_Params.Protocol;
 
 
        XPROG_SelectedProtocol = SetMode_XPROG_Params.Protocol;
 
-       Endpoint_Write_Byte(CMD_XPROG_SETMODE);
-       Endpoint_Write_Byte((SetMode_XPROG_Params.Protocol != XPRG_PROTOCOL_JTAG) ? STATUS_CMD_OK : STATUS_CMD_FAILED);
+       Endpoint_Write_8(CMD_XPROG_SETMODE);
+       Endpoint_Write_8((SetMode_XPROG_Params.Protocol != XPRG_PROTOCOL_JTAG) ? STATUS_CMD_OK : STATUS_CMD_FAILED);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -80,7 +80,7 @@ void XPROGProtocol_SetMode(void)
  */
 void XPROGProtocol_Command(void)
 {
  */
 void XPROGProtocol_Command(void)
 {
-       uint8_t XPROGCommand = Endpoint_Read_Byte();
+       uint8_t XPROGCommand = Endpoint_Read_8();
 
        switch (XPROGCommand)
        {
 
        switch (XPROGCommand)
        {
@@ -122,9 +122,9 @@ static void XPROGProtocol_EnterXPROGMode(void)
        else if (XPROG_SelectedProtocol == XPRG_PROTOCOL_TPI)
          NVMBusEnabled = TINYNVM_EnableTPI();
 
        else if (XPROG_SelectedProtocol == XPRG_PROTOCOL_TPI)
          NVMBusEnabled = TINYNVM_EnableTPI();
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_ENTER_PROGMODE);
-       Endpoint_Write_Byte(NVMBusEnabled ? XPRG_ERR_OK : XPRG_ERR_FAILED);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_ENTER_PROGMODE);
+       Endpoint_Write_8(NVMBusEnabled ? XPRG_ERR_OK : XPRG_ERR_FAILED);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -148,9 +148,9 @@ static void XPROGProtocol_LeaveXPROGMode(void)
        ISPTarget_ConfigureRescueClock();
        #endif
 
        ISPTarget_ConfigureRescueClock();
        #endif
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_LEAVE_PROGMODE);
-       Endpoint_Write_Byte(XPRG_ERR_OK);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_LEAVE_PROGMODE);
+       Endpoint_Write_8(XPRG_ERR_OK);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -224,9 +224,9 @@ static void XPROGProtocol_Erase(void)
                  ReturnStatus = XPRG_ERR_TIMEOUT;
        }
 
                  ReturnStatus = XPRG_ERR_TIMEOUT;
        }
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_ERASE);
-       Endpoint_Write_Byte(ReturnStatus);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_ERASE);
+       Endpoint_Write_8(ReturnStatus);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -317,9 +317,9 @@ static void XPROGProtocol_WriteMemory(void)
                }
        }
 
                }
        }
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_WRITE_MEM);
-       Endpoint_Write_Byte(ReturnStatus);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_WRITE_MEM);
+       Endpoint_Write_8(ReturnStatus);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
@@ -360,9 +360,9 @@ static void XPROGProtocol_ReadMemory(void)
                  ReturnStatus = XPRG_ERR_TIMEOUT;
        }
 
                  ReturnStatus = XPRG_ERR_TIMEOUT;
        }
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_READ_MEM);
-       Endpoint_Write_Byte(ReturnStatus);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_READ_MEM);
+       Endpoint_Write_8(ReturnStatus);
 
        if (ReturnStatus == XPRG_ERR_OK)
          Endpoint_Write_Stream_LE(ReadBuffer, ReadMemory_XPROG_Params.Length, NULL);
 
        if (ReturnStatus == XPRG_ERR_OK)
          Endpoint_Write_Stream_LE(ReadBuffer, ReadMemory_XPROG_Params.Length, NULL);
@@ -418,14 +418,14 @@ static void XPROGProtocol_ReadCRC(void)
                ReturnStatus = XPRG_ERR_FAILED;
        }
 
                ReturnStatus = XPRG_ERR_FAILED;
        }
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_CRC);
-       Endpoint_Write_Byte(ReturnStatus);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_CRC);
+       Endpoint_Write_8(ReturnStatus);
 
        if (ReturnStatus == XPRG_ERR_OK)
        {
 
        if (ReturnStatus == XPRG_ERR_OK)
        {
-               Endpoint_Write_Byte(MemoryCRC >> 16);
-               Endpoint_Write_Word_LE(MemoryCRC & 0xFFFF);
+               Endpoint_Write_8(MemoryCRC >> 16);
+               Endpoint_Write_16_LE(MemoryCRC & 0xFFFF);
        }
 
        Endpoint_ClearIN();
        }
 
        Endpoint_ClearIN();
@@ -438,22 +438,22 @@ static void XPROGProtocol_SetParam(void)
 {
        uint8_t ReturnStatus = XPRG_ERR_OK;
 
 {
        uint8_t ReturnStatus = XPRG_ERR_OK;
 
-       uint8_t XPROGParam = Endpoint_Read_Byte();
+       uint8_t XPROGParam = Endpoint_Read_8();
 
        /* Determine which parameter is being set, store the new parameter value */
        switch (XPROGParam)
        {
                case XPRG_PARAM_NVMBASE:
 
        /* Determine which parameter is being set, store the new parameter value */
        switch (XPROGParam)
        {
                case XPRG_PARAM_NVMBASE:
-                       XPROG_Param_NVMBase = Endpoint_Read_DWord_BE();
+                       XPROG_Param_NVMBase = Endpoint_Read_32_BE();
                        break;
                case XPRG_PARAM_EEPPAGESIZE:
                        break;
                case XPRG_PARAM_EEPPAGESIZE:
-                       XPROG_Param_EEPageSize = Endpoint_Read_Word_BE();
+                       XPROG_Param_EEPageSize = Endpoint_Read_16_BE();
                        break;
                case XPRG_PARAM_NVMCMD_REG:
                        break;
                case XPRG_PARAM_NVMCMD_REG:
-                       XPROG_Param_NVMCMDRegAddr = Endpoint_Read_Byte();
+                       XPROG_Param_NVMCMDRegAddr = Endpoint_Read_8();
                        break;
                case XPRG_PARAM_NVMCSR_REG:
                        break;
                case XPRG_PARAM_NVMCSR_REG:
-                       XPROG_Param_NVMCSRRegAddr = Endpoint_Read_Byte();
+                       XPROG_Param_NVMCSRRegAddr = Endpoint_Read_8();
                        break;
                default:
                        ReturnStatus = XPRG_ERR_FAILED;
                        break;
                default:
                        ReturnStatus = XPRG_ERR_FAILED;
@@ -464,9 +464,9 @@ static void XPROGProtocol_SetParam(void)
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
        Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
        Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
 
-       Endpoint_Write_Byte(CMD_XPROG);
-       Endpoint_Write_Byte(XPRG_CMD_SET_PARAM);
-       Endpoint_Write_Byte(ReturnStatus);
+       Endpoint_Write_8(CMD_XPROG);
+       Endpoint_Write_8(XPRG_CMD_SET_PARAM);
+       Endpoint_Write_8(ReturnStatus);
        Endpoint_ClearIN();
 }
 
        Endpoint_ClearIN();
 }
 
index 846c295..f1f4c79 100644 (file)
@@ -130,22 +130,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
@@ -245,22 +245,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
index 746eec9..04469ca 100644 (file)
@@ -330,10 +330,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);
-       Endpoint_Write_Byte(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
+       Endpoint_Write_8(0x00);
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
index 50a9056..2ebbd99 100644 (file)
@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
index b2c192e..a13fd1a 100644 (file)
@@ -329,10 +329,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);
-       Endpoint_Write_Byte(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
+       Endpoint_Write_8(0x00);
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
index 50a9056..2ebbd99 100644 (file)
@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
                        }
 
                        /* Write one 16-byte chunk of data to the Dataflash */
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
-                       Dataflash_SendByte(Endpoint_Read_Byte());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
+                       Dataflash_SendByte(Endpoint_Read_8());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
                        }
 
                        /* Read one 16-byte chunk of data from the Dataflash */
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
-                       Endpoint_Write_Byte(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
+                       Endpoint_Write_8(Dataflash_ReceiveByte());
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
 
                        /* Increment the Dataflash page 16 byte block counter */
                        CurrDFPageByteDiv16++;
index b2c192e..a13fd1a 100644 (file)
@@ -329,10 +329,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
 static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 {
        /* Send an empty header response with the Write Protect flag status */
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(0x00);
-       Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00);
-       Endpoint_Write_Byte(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(0x00);
+       Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
+       Endpoint_Write_8(0x00);
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */
        Endpoint_ClearIN();
 
        /* Update the bytes transferred counter and succeed the command */