Added 'OSIntEnter'/'OSIntExit' to MDx tone generator ISR

replace/91b66ac60aa1345cd6dd801a27b3717e9f2f16c1
Silvano Seva 2020-12-05 14:19:07 +01:00
rodzic 0931f1b588
commit b1412dedb8
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -21,6 +21,7 @@
#include "toneGenerator_MDx.h"
#include <hwconfig.h>
#include <gpio.h>
#include <os.h>
/*
* Sine table for PWM-based sinewave generation, containing 256 samples over one
@ -62,6 +63,7 @@ uint32_t beepTimerCount = 0; /* Downcounter for timed "beep" */
void __attribute__((used)) TIM3_IRQHandler()
{
OSIntEnter();
toneTableIndex += toneTableIncr;
beepTableIndex += beepTableIncr;
@ -83,6 +85,7 @@ void __attribute__((used)) TIM3_IRQHandler()
{
TIM3->CR1 &= ~TIM_CR1_CEN;
}
OSIntExit();
}
void toneGen_init()