Use puts_P() and printf_P() instead of the normal variants where possible in the Host mode Class Driver demos.
This commit is contained in:
parent
0063f72117
commit
9e34144c9b
19 changed files with 117 additions and 122 deletions
|
@ -164,18 +164,18 @@
|
|||
* \param[in,out] Data Pointer to a number containing an even number of bytes to be reversed
|
||||
* \param[in] Bytes Length of the data in bytes
|
||||
*/
|
||||
static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes);
|
||||
static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes)
|
||||
static inline void SwapEndian_n(void* Data, uint8_t Bytes);
|
||||
static inline void SwapEndian_n(void* Data, uint8_t Bytes)
|
||||
{
|
||||
uint8_t Temp;
|
||||
|
||||
uint8_t* CurrDataPos = Data;
|
||||
|
||||
while (Bytes)
|
||||
{
|
||||
Temp = *Data;
|
||||
*Data = *(Data + Bytes - 1);
|
||||
*(Data + Bytes - 1) = Temp;
|
||||
uint8_t Temp = *CurrDataPos;
|
||||
*CurrDataPos = *(CurrDataPos + Bytes - 1);
|
||||
*(CurrDataPos + Bytes - 1) = Temp;
|
||||
|
||||
Data++;
|
||||
CurrDataPos++;
|
||||
Bytes -= 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue