2018-01-15 08:29:23 +00:00
|
|
|
#ifndef _HAL_SERVO_TEENSY_H_
|
|
|
|
#define _HAL_SERVO_TEENSY_H_
|
2017-07-11 20:59:27 +00:00
|
|
|
|
|
|
|
#include <Servo.h>
|
|
|
|
|
|
|
|
// Inherit and expand on the official library
|
|
|
|
class libServo : public Servo {
|
2018-01-15 08:29:23 +00:00
|
|
|
public:
|
|
|
|
int8_t attach(const int pin);
|
|
|
|
int8_t attach(const int pin, const int min, const int max);
|
|
|
|
void move(const int value);
|
|
|
|
private:
|
|
|
|
uint16_t min_ticks;
|
|
|
|
uint16_t max_ticks;
|
|
|
|
uint8_t servoIndex; // index into the channel data for this servo
|
2017-07-11 20:59:27 +00:00
|
|
|
};
|
|
|
|
|
2018-01-15 08:29:23 +00:00
|
|
|
#endif // _HAL_SERVO_TEENSY_H_
|