engine_control/source/firmware/arch/stm32f4xx/stm32f4xx_irq.c
2016-07-23 07:59:54 +02:00

28 lines
406 B
C

/*
* 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);
}