Skip to content

Commit 3283206

Browse files
committed
Fixed compile error on StandardFirmata example.
Revert "Servo library refactoring. See #1617" This reverts commit e8834d3. See #1617
1 parent d0758af commit 3283206

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

libraries/Servo/arch/avr/Servo.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#include <avr/interrupt.h>
2121
#include <Arduino.h>
2222

23-
#include <Servo.h>
24-
#include "ServoTimers.h"
23+
#include "Servo.h"
2524

2625
#define usToTicks(_us) (( clockCyclesPerMicrosecond()* _us) / 8) // converts microseconds to tick (assumes prescale of 8) // 12 Aug 2009
2726
#define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds

libraries/Servo/arch/sam/Servo.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include <Arduino.h>
2121
#include <Servo.h>
22-
#include "ServoTimers.h"
2322

2423
#define usToTicks(_us) (( clockCyclesPerMicrosecond() * _us) / 32) // converts microseconds to tick
2524
#define ticksToUs(_ticks) (( (unsigned)_ticks * 32)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds

libraries/Servo/src/Servo.h

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
* _Nbr_16timers indicates how many 16 bit timers are available.
5959
*/
6060

61+
// Architecture specific include
62+
#include <ServoTimers.h>
63+
6164
#define Servo_VERSION 2 // software version of this library
6265

6366
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo

0 commit comments

Comments
 (0)