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:
parent
2efa79d3ec
commit
899df7d331
46 changed files with 679 additions and 665 deletions
|
@ -65,7 +65,7 @@ uint8_t Endpoint_Discard_Stream(uint16_t Length,
|
|||
}
|
||||
else
|
||||
{
|
||||
Endpoint_Discard_Byte();
|
||||
Endpoint_Discard_8();
|
||||
|
||||
Length--;
|
||||
BytesInTransfer++;
|
||||
|
@ -104,7 +104,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
}
|
||||
else
|
||||
{
|
||||
Endpoint_Write_Byte(0);
|
||||
Endpoint_Write_8(0);
|
||||
|
||||
Length--;
|
||||
BytesInTransfer++;
|
||||
|
@ -119,7 +119,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*BufferPtr)
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(*BufferPtr)
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Stream_BE
|
||||
|
@ -127,7 +127,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*BufferPtr)
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(*BufferPtr)
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_Stream_LE
|
||||
|
@ -135,7 +135,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_Byte()
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_8()
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_Stream_BE
|
||||
|
@ -143,7 +143,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_Byte()
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_8()
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
|
||||
|
@ -152,7 +152,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(pgm_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_PStream_BE
|
||||
|
@ -160,7 +160,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(pgm_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
#endif
|
||||
|
||||
|
@ -170,7 +170,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(eeprom_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_EStream_BE
|
||||
|
@ -178,7 +178,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(eeprom_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_EStream_LE
|
||||
|
@ -186,7 +186,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_8())
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_EStream_BE
|
||||
|
@ -194,7 +194,7 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_8())
|
||||
#include "Template/Template_Endpoint_RW.c"
|
||||
#endif
|
||||
|
||||
|
@ -203,38 +203,38 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_Stream_LE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*BufferPtr)
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(*BufferPtr)
|
||||
#include "Template/Template_Endpoint_Control_W.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_Stream_BE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*BufferPtr)
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(*BufferPtr)
|
||||
#include "Template/Template_Endpoint_Control_W.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_Stream_LE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_Byte()
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_8()
|
||||
#include "Template/Template_Endpoint_Control_R.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_Stream_BE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_Byte()
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Endpoint_Read_8()
|
||||
#include "Template/Template_Endpoint_Control_R.c"
|
||||
|
||||
#if defined(ARCH_HAS_FLASH_ADDRESS_SPACE)
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_PStream_LE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(pgm_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_Control_W.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_PStream_BE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(pgm_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_Control_W.c"
|
||||
#endif
|
||||
|
||||
|
@ -242,25 +242,25 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
|
|||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_EStream_LE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(eeprom_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_Control_W.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_EStream_BE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr))
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_8(eeprom_read_byte(BufferPtr))
|
||||
#include "Template/Template_Endpoint_Control_W.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_EStream_LE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) 0
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr += Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_8())
|
||||
#include "Template/Template_Endpoint_Control_R.c"
|
||||
|
||||
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_EStream_BE
|
||||
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
|
||||
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) BufferPtr -= Amount
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_Byte())
|
||||
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Endpoint_Read_8())
|
||||
#include "Template/Template_Endpoint_Control_R.c"
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue