diff options
| author | hathach <[email protected]> | 2022-02-26 15:18:51 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-02-26 15:23:29 +0700 |
| commit | bc63f59af2e75e4fc93715ac88a2a8360f09d69a (patch) | |
| tree | 4a5e18ae15addbc3b201bd9c6d601e2c7a7a7576 /src/tusb_option.h | |
| parent | 244154e08760dcdcc469bde03df63a898c55ec8b (diff) | |
mcu specific rename
Diffstat (limited to 'src/tusb_option.h')
| -rw-r--r-- | src/tusb_option.h | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h index 5cc362f1a..3c2207c26 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -172,7 +172,7 @@ #include "tusb_config.h" #endif -#include "common/tusb_mcu_attr.h" +#include "common/tusb_mcu.h" //-------------------------------------------------------------------- // RootHub Mode Configuration @@ -239,6 +239,18 @@ #define TUSB_OPT_DEVICE_ENABLED CFG_TUD_ENABLED #define TUSB_OPT_HOST_ENABLED CFG_TUH_ENABLED +// TODO move later +// TUP_MCU_STRICT_ALIGN will overwrite TUP_ARCH_STRICT_ALIGN. +// In case TUP_MCU_STRICT_ALIGN = 1 and TUP_ARCH_STRICT_ALIGN =0, we will not reply on compiler +// to generate unaligned access code. +// LPC_IP3511 Highspeed cannot access unaligned memory on USB_RAM +#if TUD_OPT_HIGH_SPEED && (CFG_TUSB_MCU == OPT_MCU_LPC54XXX || CFG_TUSB_MCU == OPT_MCU_LPC55XX) + #define TUP_MCU_STRICT_ALIGN 1 +#else + #define TUP_MCU_STRICT_ALIGN 0 +#endif + + //--------------------------------------------------------------------+ // COMMON OPTIONS //--------------------------------------------------------------------+ @@ -371,31 +383,6 @@ #define CFG_TUH_VENDOR 0 #endif -//--------------------------------------------------------------------+ -// Port Specific -// TUP stand for TinyUSB Port (can be renamed) -//--------------------------------------------------------------------+ - -//------------- Unaligned Memory -------------// - -// ARMv7+ (M3-M7, M23-M33) can access unaligned memory -#if (defined(__ARM_ARCH) && (__ARM_ARCH >= 7)) - #define TUP_ARCH_STRICT_ALIGN 0 -#else - #define TUP_ARCH_STRICT_ALIGN 1 -#endif - -// TUP_MCU_STRICT_ALIGN will overwrite TUP_ARCH_STRICT_ALIGN. -// In case TUP_MCU_STRICT_ALIGN = 1 and TUP_ARCH_STRICT_ALIGN =0, we will not reply on compiler -// to generate unaligned access code. -// LPC_IP3511 Highspeed cannot access unaligned memory on USB_RAM -#if TUD_OPT_HIGH_SPEED && (CFG_TUSB_MCU == OPT_MCU_LPC54XXX || CFG_TUSB_MCU == OPT_MCU_LPC55XX) - #define TUP_MCU_STRICT_ALIGN 1 -#else - #define TUP_MCU_STRICT_ALIGN 0 -#endif - - //------------------------------------------------------------------ // Configuration Validation //------------------------------------------------------------------ |
