|
|
|
@ -4,7 +4,7 @@ static void defaultHandler(){};
|
|
|
|
|
// pointers to dedicated interrupt handlers
|
|
|
|
|
|
|
|
|
|
void intInit(
|
|
|
|
|
intType_t intType
|
|
|
|
|
intType_t intType,
|
|
|
|
|
intHandler_t handler,
|
|
|
|
|
uint8_t priority)
|
|
|
|
|
{
|
|
|
|
@ -27,7 +27,7 @@ void intDissableAll()
|
|
|
|
|
void intEnable(
|
|
|
|
|
intType_t intType)
|
|
|
|
|
{
|
|
|
|
|
NVIC_EnableIRQ();
|
|
|
|
|
NVIC_EnableIRQ(interruptTypeIndexList[intType]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void intDissable(
|
|
|
|
@ -46,16 +46,16 @@ void TIM2_IRQHandler()
|
|
|
|
|
TIM2-> SR &= ~TIM_SR_UIF;
|
|
|
|
|
|
|
|
|
|
//TODO: call handler here
|
|
|
|
|
(intHandler_t)(intHandlerList[TIM2_UPDATE])();
|
|
|
|
|
((intHandler_t)(intHandlerList[TIM2_UPDATE]))();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(TIM2->SR & TIM_SR_CC1IF) {
|
|
|
|
|
TIM2-> SR &= ~TIM_SR_CC12IF;
|
|
|
|
|
TIM2-> SR &= ~TIM_SR_CC1IF;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(TIM2->SR & TIM_SR_CC12IF) {
|
|
|
|
|
TIM2-> SR &= ~TIM_SR_CC12IF;
|
|
|
|
|
if(TIM2->SR & TIM_SR_CC2IF) {
|
|
|
|
|
TIM2-> SR &= ~TIM_SR_CC2IF;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|