1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-21 21:22:31 +03:00

Move some Servo functions into IRAM (#1742)

This commit is contained in:
Ivan Grokhotkov
2016-03-10 13:24:14 +03:00
parent 1692798860
commit 8d43c40311
2 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@
// The servos are pulsed in the background using the value most recently // The servos are pulsed in the background using the value most recently
// written using the write() method. // written using the write() method.
// //
// This library uses time0 and timer1. // This library uses timer0 and timer1.
// Note that timer0 may be repurposed when the first servo is attached. // Note that timer0 may be repurposed when the first servo is attached.
// //
// Timers are seized as needed in groups of 12 servos - 24 servos use two // Timers are seized as needed in groups of 12 servos - 24 servos use two

View File

@ -167,6 +167,7 @@ static void initISR(ServoTimerSequence timerId)
#endif #endif
} }
static void finISR(ServoTimerSequence timerId) ICACHE_RAM_ATTR;
static void finISR(ServoTimerSequence timerId) static void finISR(ServoTimerSequence timerId)
{ {
#if !defined (SERVO_EXCLUDE_TIMER0) #if !defined (SERVO_EXCLUDE_TIMER0)
@ -180,6 +181,7 @@ static void finISR(ServoTimerSequence timerId)
} }
// returns true if any servo is active on this timer // returns true if any servo is active on this timer
static boolean isTimerActive(ServoTimerSequence timerId) ICACHE_RAM_ATTR;
static boolean isTimerActive(ServoTimerSequence timerId) static boolean isTimerActive(ServoTimerSequence timerId)
{ {
for (uint8_t channel = 0; channel < SERVOS_PER_TIMER; channel++) { for (uint8_t channel = 0; channel < SERVOS_PER_TIMER; channel++) {