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.
This commit is contained in:
@@ -109,7 +109,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
}
|
||||
else
|
||||
{
|
||||
Pipe_Write_Byte(0);
|
||||
Pipe_Write_8(0);
|
||||
|
||||
Length--;
|
||||
BytesInTransfer++;
|
||||
@@ -128,7 +128,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*BufferPtr)
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(*BufferPtr)
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Write_Stream_BE
|
||||
@@ -137,7 +137,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*BufferPtr)
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(*BufferPtr)
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Read_Stream_LE
|
||||
@@ -146,7 +146,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_Byte()
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_8()
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Read_Stream_BE
|
||||
@@ -155,7 +155,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_Byte()
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_8()
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
|
||||
@@ -165,7 +165,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(pgm_read_byte(BufferPtr))
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Write_PStream_BE
|
||||
@@ -174,7 +174,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(pgm_read_byte(BufferPtr))
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
#endif
|
||||
|
||||
@@ -185,7 +185,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(eeprom_read_byte(BufferPtr))
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Write_EStream_BE
|
||||
@@ -194,7 +194,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(eeprom_read_byte(BufferPtr))
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Read_EStream_LE
|
||||
@@ -203,7 +203,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_Byte())
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_8())
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Pipe_Read_EStream_BE
|
||||
@@ -212,7 +212,7 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
|
||||
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_Byte())
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_8())
|
||||
#include "Template/Template_Pipe_RW.c"
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user