Add shortcuts to SwapEndian_16() and SwapEndian_32() internal functions to improve optimization if called with constant inputs.

This commit is contained in:
Dean Camera 2011-08-16 05:00:45 +00:00
parent ef4cff29c3
commit 3478178127
5 changed files with 53 additions and 25 deletions

View file

@ -108,19 +108,15 @@
typedef struct
{
unsigned LastMessageTransaction : 1;
unsigned Reserved : 7;
uint8_t Reserved2[3];
uint8_t LastMessageTransaction;
uint8_t TermChar;
uint8_t Reserved[2];
} TMC_DevOUTMessageHeader_t;
typedef struct
{
unsigned TermCharEnabled : 1;
unsigned Reserved : 7;
uint8_t TermChar;
uint8_t Reserved2[2];
uint8_t LastMessageTransaction;
uint8_t Reserved[3];
} TMC_DevINMessageHeader_t;
typedef struct