From e8834d32f3f09cf6ce9a52bd30ba552bcb8291ef Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 15 Oct 2013 09:41:18 +0200 Subject: [PATCH] Servo library refactoring. See #1617 --- libraries/Servo/arch/avr/Servo.cpp | 3 ++- libraries/Servo/arch/sam/Servo.cpp | 1 + libraries/Servo/src/Servo.h | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/Servo/arch/avr/Servo.cpp b/libraries/Servo/arch/avr/Servo.cpp index e4801b97e..9474cf98a 100644 --- a/libraries/Servo/arch/avr/Servo.cpp +++ b/libraries/Servo/arch/avr/Servo.cpp @@ -20,7 +20,8 @@ #include #include -#include "Servo.h" +#include +#include "ServoTimers.h" #define usToTicks(_us) (( clockCyclesPerMicrosecond()* _us) / 8) // converts microseconds to tick (assumes prescale of 8) // 12 Aug 2009 #define ticksToUs(_ticks) (( (unsigned)_ticks * 8)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds diff --git a/libraries/Servo/arch/sam/Servo.cpp b/libraries/Servo/arch/sam/Servo.cpp index dec911019..78c404079 100644 --- a/libraries/Servo/arch/sam/Servo.cpp +++ b/libraries/Servo/arch/sam/Servo.cpp @@ -19,6 +19,7 @@ #include #include +#include "ServoTimers.h" #define usToTicks(_us) (( clockCyclesPerMicrosecond() * _us) / 32) // converts microseconds to tick #define ticksToUs(_ticks) (( (unsigned)_ticks * 32)/ clockCyclesPerMicrosecond() ) // converts from ticks back to microseconds diff --git a/libraries/Servo/src/Servo.h b/libraries/Servo/src/Servo.h index 10e79a87e..48948f73d 100644 --- a/libraries/Servo/src/Servo.h +++ b/libraries/Servo/src/Servo.h @@ -58,9 +58,6 @@ * _Nbr_16timers indicates how many 16 bit timers are available. */ -// Architecture specific include -#include - #define Servo_VERSION 2 // software version of this library #define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo