use unaligned access read for hw fifo
This commit is contained in:
@@ -34,10 +34,16 @@
|
||||
|
||||
//------------- Unaligned Memory Access -------------//
|
||||
|
||||
// ARMv7+ (M3-M7, M23-M33) can access unaligned memory
|
||||
#if (defined(__ARM_ARCH) && (__ARM_ARCH >= 7))
|
||||
#define TUP_ARCH_STRICT_ALIGN 0
|
||||
#ifdef __ARM_ARCH
|
||||
// ARM Architecture set __ARM_FEATURE_UNALIGNED to 1 for mcu supports unaligned access
|
||||
#if defined(__ARM_FEATURE_UNALIGNED) && __ARM_FEATURE_UNALIGNED == 1
|
||||
#define TUP_ARCH_STRICT_ALIGN 0
|
||||
#else
|
||||
#define TUP_ARCH_STRICT_ALIGN 1
|
||||
#endif
|
||||
#else
|
||||
// TODO default to strict align for others
|
||||
// Should investigate other architecture such as risv, xtensa, mips for optimal setting
|
||||
#define TUP_ARCH_STRICT_ALIGN 1
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user