engine_control/source/firmware/arch/stm32f4xx/stm32f4xx_irq.c

28 lines
406 B
C
Raw Normal View History

2016-07-23 05:59: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);
}