UPP/MATLAB/MCU_STM32_Matlab/Drivers/CMSIS/arm_defines.h
Razvalyaev afc4a114f6 Добавлена модель МК матлаб с компилятором MinGW
Но по какой-то приниче запуск модели лочит MCU.mexw64 и его нельзя удалить. Но при этом можно переименовать... непонятно крч
2025-11-08 23:40:43 +03:00

106 lines
2.5 KiB
C

#include "mcu_wrapper_conf.h"
#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
//#define __CLZ (uint8_t)clz
//
//#define __CTZ (uint8_t)ctz
#define __CLZ
#define __CTZ
#define __RBIT
#ifndef __weak
#define __weak __attribute__((weak))
#endif
#define __DSB()
#define __ISB()
#define __NOP()
#define __WFI()
#define __SEV()
#define __WFE()
#define __DMB()