From b1412dedb832a44c88645a58adebb2384e0479d6 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sat, 5 Dec 2020 14:19:07 +0100 Subject: [PATCH] Added 'OSIntEnter'/'OSIntExit' to MDx tone generator ISR --- platform/drivers/tones/toneGenerator_MDx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/drivers/tones/toneGenerator_MDx.c b/platform/drivers/tones/toneGenerator_MDx.c index eecbb3be..2930b992 100644 --- a/platform/drivers/tones/toneGenerator_MDx.c +++ b/platform/drivers/tones/toneGenerator_MDx.c @@ -21,6 +21,7 @@ #include "toneGenerator_MDx.h" #include #include +#include /* * 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()