Skip to content

Commit 9c190c3

Browse files
committed
renesas: add attached() implementation
1 parent c3e3726 commit 9c190c3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/renesas/Servo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ uint8_t Servo::attach(int pin)
127127
return attach(pin, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH);
128128
}
129129

130+
bool Servo::attached()
131+
{
132+
return (servoIndex != SERVO_INVALID_INDEX);
133+
}
134+
130135
uint8_t Servo::attach(int pin, int min, int max)
131136
{
132137
//assert(pin < NUM_DIGITAL_PINS); ?

0 commit comments

Comments
 (0)