You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KED/env/csl/stm32f042/Src/imp_interrupt.c

45 lines
498 B

#include "interrupt.h"
void intInit(
intType_t intType
intHandler_t handler,
uint8_t priority)
{
NVIC_SetPriority(, priority);
}
void intEnableAll()
{
__enable_irq();
}
void intDissableAll()
{
__disable_irq();
}
void intEnable(
intType_t intType)
{
NVIC_EnableIRQ();
}
void intDissable(
intType_t intType)
{
}
// Interrupt service routines
void TIM2_IRQHandler()
{
if(TIM2->SR & TIM_SR_UIF) {
// clear flag
TIM2-> SR &= ~TIM_SR_UIF;
//TODO: call handler here
}
}