Skip to content

Commit 430a1b3

Browse files
authored
Merge pull request #111 from arduino-libraries/renesas_attached
renesas: add attached() implementation
2 parents c3e3726 + 9c190c3 commit 430a1b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/renesas/Servo.cpp

+5
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)