Commit 899df7d3 authored by Dean Camera's avatar Dean Camera

Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_*...

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.
parent 2efa79d3
...@@ -301,7 +301,7 @@ static uint8_t FetchNextCommandByte(void) ...@@ -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) ...@@ -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
......
...@@ -203,7 +203,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -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 */ /* One byte of the data stage is the command, so subtract it from the total data bytes */
SentCommand.DataSize--; SentCommand.DataSize--;
...@@ -212,7 +212,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -212,7 +212,7 @@ void EVENT_USB_Device_ControlRequest(void)
for (uint8_t DataByte = 0; (DataByte < sizeof(SentCommand.Data)) && for (uint8_t DataByte = 0; (DataByte < sizeof(SentCommand.Data)) &&
Endpoint_BytesInEndpoint(); DataByte++) 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) ...@@ -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 */ /* Adjust counters */
WordsInFlashPage += 1; WordsInFlashPage += 1;
...@@ -316,7 +316,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -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 */ /* Adjust counters */
StartAddr++; StartAddr++;
...@@ -348,12 +348,12 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -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 /* 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 */ 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 else
{ {
/* Idle state upload - send response to last issued command */ /* 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) ...@@ -388,9 +388,9 @@ void EVENT_USB_Device_ControlRequest(void)
/* Read the flash word and send it via USB to the host */ /* Read the flash word and send it via USB to the host */
#if (FLASHEND > 0xFFFF) #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 #endif
/* Adjust counters */ /* Adjust counters */
...@@ -417,7 +417,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -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 */ /* Adjust counters */
StartAddr++; StartAddr++;
...@@ -436,17 +436,17 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -436,17 +436,17 @@ void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write 8-bit status value */ /* 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_8(0);
Endpoint_Write_Word_LE(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) ...@@ -464,7 +464,7 @@ void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write the current device state to the endpoint */ /* 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) ...@@ -503,7 +503,7 @@ static void DiscardFillerBytes(uint8_t NumberOfBytes)
} }
else else
{ {
Endpoint_Discard_Byte(); Endpoint_Discard_8();
} }
} }
} }
......
...@@ -113,7 +113,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -113,7 +113,7 @@ void EVENT_USB_Device_ControlRequest(void)
while (!(Endpoint_IsOUTReceived())); while (!(Endpoint_IsOUTReceived()));
/* Read in the write destination address */ /* Read in the write destination address */
uint16_t PageAddress = Endpoint_Read_Word_LE(); uint16_t PageAddress = Endpoint_Read_16_LE();
/* Check if the command is a program page command, or a start application command */ /* Check if the command is a program page command, or a start application command */
if (PageAddress == COMMAND_STARTAPPLICATION) if (PageAddress == COMMAND_STARTAPPLICATION)
...@@ -137,7 +137,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -137,7 +137,7 @@ void EVENT_USB_Device_ControlRequest(void)
} }
/* Write the next data word to the FLASH page */ /* Write the next data word to the FLASH page */
boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_Word_LE()); boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_16_LE());
} }
/* Write the filled FLASH page to memory */ /* Write the filled FLASH page to memory */
......
...@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn ...@@ -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_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
/* Increment the Dataflash page 16 byte block counter */ /* Increment the Dataflash page 16 byte block counter */
CurrDFPageByteDiv16++; CurrDFPageByteDiv16++;
...@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf ...@@ -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_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
/* Increment the Dataflash page 16 byte block counter */ /* Increment the Dataflash page 16 byte block counter */
CurrDFPageByteDiv16++; CurrDFPageByteDiv16++;
......
...@@ -334,10 +334,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa ...@@ -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) static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{ {
/* Send an empty header response with the Write Protect flag status */ /* Send an empty header response with the Write Protect flag status */
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00); Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_ClearIN(); Endpoint_ClearIN();
/* Update the bytes transferred counter and succeed the command */ /* Update the bytes transferred counter and succeed the command */
......
...@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn ...@@ -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_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
/* Increment the Dataflash page 16 byte block counter */ /* Increment the Dataflash page 16 byte block counter */
CurrDFPageByteDiv16++; CurrDFPageByteDiv16++;
...@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf ...@@ -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_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
/* Increment the Dataflash page 16 byte block counter */ /* Increment the Dataflash page 16 byte block counter */
CurrDFPageByteDiv16++; CurrDFPageByteDiv16++;
......
...@@ -334,10 +334,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa ...@@ -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) static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{ {
/* Send an empty header response with the Write Protect flag status */ /* Send an empty header response with the Write Protect flag status */
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00); Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_ClearIN(); Endpoint_ClearIN();
/* Update the bytes transferred counter and succeed the command */ /* Update the bytes transferred counter and succeed the command */
......
...@@ -129,22 +129,22 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceIn ...@@ -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_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
Dataflash_SendByte(Endpoint_Read_Byte()); Dataflash_SendByte(Endpoint_Read_8());
/* Increment the Dataflash page 16 byte block counter */ /* Increment the Dataflash page 16 byte block counter */
CurrDFPageByteDiv16++; CurrDFPageByteDiv16++;
...@@ -244,22 +244,22 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInf ...@@ -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_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
Endpoint_Write_Byte(Dataflash_ReceiveByte()); Endpoint_Write_8(Dataflash_ReceiveByte());
/* Increment the Dataflash page 16 byte block counter */ /* Increment the Dataflash page 16 byte block counter */
CurrDFPageByteDiv16++; CurrDFPageByteDiv16++;
......
...@@ -334,10 +334,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa ...@@ -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) static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{ {
/* Send an empty header response with the Write Protect flag status */ /* Send an empty header response with the Write Protect flag status */
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_Write_Byte(DISK_READ_ONLY ? 0x80 : 0x00); Endpoint_Write_8(DISK_READ_ONLY ? 0x80 : 0x00);
Endpoint_Write_Byte(0x00); Endpoint_Write_8(0x00);
Endpoint_ClearIN(); Endpoint_ClearIN();
/* Update the bytes transferred counter and succeed the command */ /* Update the bytes transferred counter and succeed the command */
......
...@@ -311,7 +311,7 @@ static void SideShow_GetApplicationOrder(SideShow_PacketHeader_t* const PacketHe ...@@ -311,7 +311,7 @@ static void SideShow_GetApplicationOrder(SideShow_PacketHeader_t* const PacketHe
Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM); Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL); 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 ...@@ -332,7 +332,7 @@ static void SideShow_GetSupportedEndpoints(SideShow_PacketHeader_t* const Packet
Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM); Endpoint_SelectEndpoint(SIDESHOW_IN_EPNUM);
Endpoint_Write_Stream_LE(PacketHeader, sizeof(SideShow_PacketHeader_t), NULL); 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_Write_Stream_LE(&SupportedEndpointGUID, sizeof(GUID_t), NULL);
Endpoint_ClearIN(); Endpoint_ClearIN();
} }
......
...@@ -169,7 +169,7 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -169,7 +169,7 @@ void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write the request response byte */ /* Write the request response byte */
Endpoint_Write_Byte(TMCRequestStatus); Endpoint_Write_8(TMCRequestStatus);
Endpoint_ClearIN(); Endpoint_ClearIN();
Endpoint_ClearStatusStage(); Endpoint_ClearStatusStage();
...@@ -190,9 +190,9 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -190,9 +190,9 @@ void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write the request response bytes */ /* Write the request response bytes */
Endpoint_Write_Byte(TMCRequestStatus); Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_Word_LE(0); Endpoint_Write_16_LE(0);
Endpoint_Write_DWord_LE(LastTransferLength); Endpoint_Write_32_LE(LastTransferLength);
Endpoint_ClearIN(); Endpoint_ClearIN();
Endpoint_ClearStatusStage(); Endpoint_ClearStatusStage();
...@@ -223,8 +223,8 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -223,8 +223,8 @@ void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write the request response bytes */ /* Write the request response bytes */
Endpoint_Write_Byte(TMCRequestStatus); Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_Byte(CurrentTransferTag); Endpoint_Write_8(CurrentTransferTag);
Endpoint_ClearIN(); Endpoint_ClearIN();
Endpoint_ClearStatusStage(); Endpoint_ClearStatusStage();
...@@ -245,9 +245,9 @@ void EVENT_USB_Device_ControlRequest(void) ...@@ -245,9 +245,9 @@ void EVENT_USB_Device_ControlRequest(void)
Endpoint_ClearSETUP(); Endpoint_ClearSETUP();
/* Write the request response bytes */ /* Write the request response bytes */
Endpoint_Write_Byte(TMCRequestStatus); Endpoint_Write_8(TMCRequestStatus);
Endpoint_Write_Word_LE(0); Endpoint_Write_16_LE(0);
Endpoint_Write_DWord_LE(LastTransferLength); Endpoint_Write_32_LE(LastTransferLength);