如题:
- #if defined(__CC_ARM)
- /* ARMCC and GCC have different ordering for packed typedefs, must separate macros */
- #define __packed_gcc
- #define __packed_armcc __packed
- #define _DISABLE_IRQS(_was_masked) _was_masked = __disable_irq()
- #define _ENABLE_IRQS(_was_masked) if (!_was_masked) { __enable_irq(); }
- #elif defined(__GNUC__)
- #define __packed_armcc
- #define __packed_gcc __attribute__((packed))
- #define _DISABLE_IRQS(_was_masked) do{
- __ASM volatile ("MRS %0, primask" : "=r" (_was_masked) );
- __ASM volatile ("cpsid i" : : : "memory");
- } while(0)
复制代码
这个里面 #define _DISABLE_IRQS(_was_masked) _was_masked = __disable_irq()
_was_masked干什么的?
通俗点讲就是?
一周热门 更多>