#include "mcu_wrapper_conf.h"
#ifdef ARM_MATH_LOOPUNROLL
#include "dsp/none.h"
#endif

#define _sqrtf(...) sqrtf(__VA_ARGS__)

#define __disable_irq()

#ifndef   __ASM
  #define __ASM                                  __asm
#endif

#ifndef __IO
  #define __IO                                   volatile
#endif

#ifndef   __inline
  #define __inline                               inline
#endif

#ifndef   __NOINLINE
#define __NOINLINE                               __declspec(noinline)
#endif

#ifndef   __INLINE
  #define __INLINE                               __inline
#endif

#ifndef   __STATIC_INLINE
  #define __STATIC_INLINE                        static __inline
#endif

#ifndef   __STATIC_FORCEINLINE                 
  #define __STATIC_FORCEINLINE                   //static __forceinline
#endif        

#ifndef   __NO_RETURN
  #define __NO_RETURN                            __declspec(noreturn)
#endif

#ifndef   __USED
  #define __USED                                 __attribute__((used))
#endif


#ifndef   __WEAK
  #define __WEAK                                 __attribute__((weak))
//   #define __weak                                 __WEAK
#endif

#ifndef   __PACKED
  #define __PACKED                               __attribute__((packed))
#endif

#ifndef   __PACKED_STRUCT
  #define __PACKED_STRUCT                        __packed struct
#endif

#ifndef   __PACKED_UNION
  #define __PACKED_UNION                         __packed union
#endif

#ifndef   __UNALIGNED_UINT32        /* deprecated */
  #define __UNALIGNED_UINT32(x)                  (*((__packed uint32_t *)(x)))
#endif

#ifndef   __UNALIGNED_UINT16_WRITE
  #define __UNALIGNED_UINT16_WRITE(addr, val)    ((*((__packed uint16_t *)(addr))) = (val))
#endif

#ifndef   __UNALIGNED_UINT16_READ
  #define __UNALIGNED_UINT16_READ(addr)          (*((const __packed uint16_t *)(addr)))
#endif

#ifndef   __UNALIGNED_UINT32_WRITE
  #define __UNALIGNED_UINT32_WRITE(addr, val)    ((*((__packed uint32_t *)(addr))) = (val))
#endif

#ifndef   __UNALIGNED_UINT32_READ
  #define __UNALIGNED_UINT32_READ(addr)          (*((const __packed uint32_t *)(addr)))
#endif

#ifndef   __ALIGNED
  #define __ALIGNED(x)                           __attribute__((aligned(x)))
#endif

#ifndef   __RESTRICT
  #define __RESTRICT                             __restrict
#endif

#ifdef __MINGW64__
#ifndef   __weak
  #define __weak  __attribute__((weak))
#endif
#else
#ifndef   __weak
#define __weak  
#endif
#endif
#define __DSB()
#define __ISB()
#define __NOP()
#define __WFI()
#define __SEV()
#define __WFE()
#define __DMB()

