add tu_unaligned_read32/write32 (#772)

* add tu_unaligned_read32/write32
* added tu_unaligned_read16/write16
* add TU_ATTR_ALWAYS_INLINE, add to most of simple inline function
This commit is contained in:
Ha Thach
2021-04-06 19:32:01 +07:00
committed by GitHub
parent ab4d30fd6b
commit 1d20c84798
4 changed files with 91 additions and 46 deletions

View File

@@ -124,7 +124,6 @@
#define OPT_OS_RTTHREAD 6 ///< RT-Thread
/** @} */
// Allow to use command line to change the config name/location
#ifdef CFG_TUSB_CONFIG_FILE
#include CFG_TUSB_CONFIG_FILE
@@ -132,8 +131,6 @@
#include "tusb_config.h"
#endif
/** \addtogroup group_configuration
* @{ */
@@ -277,6 +274,19 @@
//------------- CLASS -------------//
#endif // TUSB_OPT_HOST_ENABLED
//--------------------------------------------------------------------+
// Port Options
// TUP for TinyUSB Port (can be renamed)
//--------------------------------------------------------------------+
// TUP_ARCH_STRICT_ALIGN if arch cannot access 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
//------------------------------------------------------------------
// Configuration Validation