50 #ifndef __LPCUSBlib_COMMON_H__
51 #define __LPCUSBlib_COMMON_H__
54 #define __INCLUDE_FROM_COMMON_H
62 #if defined(USE_LUFA_CONFIG_HEADER)
63 #include "LUFAConfig.h"
66 #if 1 // TODO add control macros later
67 #include "../LPCUSBlibConfig.h"
74 #if defined(__cplusplus)
79 #if defined(__DOXYGEN__)
87 #define ARCH_LITTLE_ENDIAN
89 #define pgm_read_byte(x) (*x)
90 #define memcmp_P(...) memcmp(__VA_ARGS__)
91 #define memcpy_P(...) memcpy(__VA_ARGS__)
109 #define MACROE while (0)
121 #if !defined(MAX) || defined(__DOXYGEN__)
122 #define MAX(x, y) (((x) > (y)) ? (x) : (y))
135 #if !defined(MIN) || defined(__DOXYGEN__)
136 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
139 #if !defined(STRINGIFY) || defined(__DOXYGEN__)
147 #define STRINGIFY(x) #x
156 #define STRINGIFY_EXPANDED(x) STRINGIFY(x)
168 Byte = (((Byte & 0xF0) >> 4) | ((Byte & 0x0F) << 4));
169 Byte = (((Byte & 0xCC) >> 2) | ((Byte & 0x33) << 2));
170 Byte = (((Byte & 0xAA) >> 1) | ((Byte & 0x55) << 1));
185 while (Milliseconds--)
189 for (i = 0; i < (4 * 1000); i++) {
257 #if defined(__cplusplus)