Add save/restore_irq

Factored irq functions into a separate file.
This commit is contained in:
Dave Hylands 2014-08-24 12:21:12 -07:00 committed by Damien George
parent e5cbb70328
commit 8c0add4eee

View File

@ -119,6 +119,19 @@ __attribute__(( always_inline )) static inline void __WFI(void)
__asm volatile ("wfi");
}
__attribute__(( always_inline )) static inline uint32_t __get_PRIMASK(void)
{
uint32_t result;
__asm volatile ("MRS %0, primask" : "=r" (result));
return(result);
}
__attribute__(( always_inline )) static inline void __set_PRIMASK(uint32_t priMask)
{
__asm volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
}
uint32_t HAL_GetTick(void);
void HAL_Delay(uint32_t Delay);