Fixed USART ISR handler in MDx GPS driver to prevent it from exiting without clearing the interrupt flags when no thread is registered for wakeup (TG-271 #closed)

replace/ccfb4f08412ecef433eb383b5cacc02506966b31
Silvano Seva 2021-08-13 17:01:32 +02:00
rodzic 379b487f64
commit f286245f4f
1 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -76,11 +76,14 @@ void __attribute__((used)) GpsUsartImpl()
{
status = (bufPos < maxPos) ? 0x01 : 0x02;
if(gpsWaiting == 0) return;
gpsWaiting->IRQwakeup();
if(gpsWaiting->IRQgetPriority()>Thread::IRQgetCurrentThread()->IRQgetPriority())
Scheduler::IRQfindNextThread();
gpsWaiting = 0;
if(gpsWaiting)
{
gpsWaiting->IRQwakeup();
if(gpsWaiting->IRQgetPriority()>
Thread::IRQgetCurrentThread()->IRQgetPriority())
Scheduler::IRQfindNextThread();
gpsWaiting = 0;
}
}
}