Skip to content

Commit 8d43c40

Browse files
committed
Move some Servo functions into IRAM (#1742)
1 parent 1692798 commit 8d43c40

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libraries/Servo/src/Servo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// The servos are pulsed in the background using the value most recently
2424
// written using the write() method.
2525
//
26-
// This library uses time0 and timer1.
26+
// This library uses timer0 and timer1.
2727
// Note that timer0 may be repurposed when the first servo is attached.
2828
//
2929
// Timers are seized as needed in groups of 12 servos - 24 servos use two

libraries/Servo/src/esp8266/Servo.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ static void initISR(ServoTimerSequence timerId)
167167
#endif
168168
}
169169

170+
static void finISR(ServoTimerSequence timerId) ICACHE_RAM_ATTR;
170171
static void finISR(ServoTimerSequence timerId)
171172
{
172173
#if !defined (SERVO_EXCLUDE_TIMER0)
@@ -180,6 +181,7 @@ static void finISR(ServoTimerSequence timerId)
180181
}
181182

182183
// returns true if any servo is active on this timer
184+
static boolean isTimerActive(ServoTimerSequence timerId) ICACHE_RAM_ATTR;
183185
static boolean isTimerActive(ServoTimerSequence timerId)
184186
{
185187
for (uint8_t channel = 0; channel < SERVOS_PER_TIMER; channel++) {

0 commit comments

Comments
 (0)