kosmos/source/firmware/arch/stm32f4xx/stm32f4xx_irq._c

28 lines
406 B
Plaintext
Raw Normal View History

2016-07-28 19:02:54 +00:00
/*
* stm32f4xx_irq.c
*
* Created on: Oct 1, 2015
* Author: tkl
*/
#include "stm32f4xx.h"
#include "stm32f4xx_irq.h"
unsigned int disable_irq(void)
{
unsigned int state = __get_PRIMASK();
__disable_irq();
return state;
}
unsigned int enable_irq(void)
{
unsigned int state = __get_PRIMASK();
__enable_irq();
return state;
}
void restore_irq(unsigned int state)
{
__set_PRIMASK(state);
}