Add save/restore_irq
Factored irq functions into a separate file.
This commit is contained in:
parent
e5cbb70328
commit
8c0add4eee
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user