X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/f3f481183aa201739a84f847769dcba50166eb98..1e3d892b6a7eb6770c4abf3191399c8a68aa7eaf:/LUFA/Common/Common.h diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index cf6c28307..147ae8ebc 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -87,24 +87,59 @@ #include typedef uint8_t uint_reg_t; + + #define le16_to_cpu(x) x + #define le32_to_cpu(x) x + #define be16_to_cpu(x) SwapEndian_16(x) + #define be32_to_cpu(x) SwapEndian_32(x) + #define cpu_to_le16(x) x + #define cpu_to_le32(x) x + #define cpu_to_be16(x) SwapEndian_16(x) + #define cpu_to_be32(x) SwapEndian_32(x) + #define LE16_TO_CPU(x) x + #define LE32_TO_CPU(x) x + #define BE16_TO_CPU(x) SWAPENDIAN_16(x) + #define BE32_TO_CPU(x) SWAPENDIAN_32(x) + #define CPU_TO_LE16(x) x + #define CPU_TO_LE32(x) x + #define CPU_TO_BE16(x) SWAPENDIAN_16(x) + #define CPU_TO_BE32(x) SWAPENDIAN_32(x) + #elif (ARCH == ARCH_UC3B) #include typedef uint32_t uint_reg_t; + // TODO + #define le16_to_cpu(x) SwapEndian_16(x) + #define le32_to_cpu(x) SwapEndian_32(x) + #define be16_to_cpu(x) x + #define be32_to_cpu(x) x + #define cpu_to_le16(x) SwapEndian_16(x) + #define cpu_to_le32(x) SwapEndian_32(x) + #define cpu_to_be16(x) x + #define cpu_to_be32(x) x + #define LE16_TO_CPU(x) SWAPENDIAN_16(x) + #define LE32_TO_CPU(x) SWAPENDIAN_32(x) + #define BE16_TO_CPU(x) x + #define BE32_TO_CPU(x) x + #define CPU_TO_LE16(x) SWAPENDIAN_16(x) + #define CPU_TO_LE32(x) SWAPENDIAN_32(x) + #define CPU_TO_BE16(x) x + #define CPU_TO_BE32(x) x + + #define ISR(Name) void Name (void) __attribute__((__interrupt__)); void Name (void) #define EEMEM #define PROGMEM const - #define ISR(Name) void Name (void) #define ATOMIC_BLOCK(x) if (1) #define ATOMIC_RESTORESTATE #define pgm_read_byte(x) *x #define eeprom_read_byte(x) *x #define eeprom_update_byte(x, y) *x = y #define eeprom_write_byte(x, y) *x = y + #define _delay_ms(x) #define memcmp_P(...) memcmp(__VA_ARGS__) #define memcpy_P(...) memcpy(__VA_ARGS__) - - #warning The UC3B architecture support is currently experimental and incomplete! #endif /* Public Interface - May be used in end-application: */