![]() |
eBoard ๐
โ โงโจ
Written for SIA 2017/2018
|
#include <eBoard.h>
Public Member Functions | |
Servo () | |
uint8_t | attach (int pin) |
uint8_t | attach (int pin, int min, int max) |
void | detach () |
void | write (int value) |
void | writeMicroseconds (int value) |
int | read () |
int | readMicroseconds () |
bool | attached () |
Private Attributes | |
uint8_t | servoIndex |
int8_t | min |
int8_t | max |
Servo::Servo | ( | ) |
Definition at line 3685 of file eBoard.h.
References DEFAULT_PULSE_WIDTH, INVALID_SERVO, MAX_SERVOS, ServoCount, servoIndex, servos, servo_t::ticks, and usToTicks.
uint8_t Servo::attach | ( | int | pin | ) |
Definition at line 3693 of file eBoard.h.
References MAX_PULSE_WIDTH, and MIN_PULSE_WIDTH.
Referenced by setup().
uint8_t Servo::attach | ( | int | pin, |
int | min, | ||
int | max | ||
) |
Definition at line 3696 of file eBoard.h.
References initISR(), ServoPin_t::isActive, isTimerActive(), max, MAX_PULSE_WIDTH, MAX_SERVOS, min, MIN_PULSE_WIDTH, ServoPin_t::nbr, servo_t::Pin, SERVO_INDEX_TO_TIMER, servoIndex, and servos.
|
inline |
Definition at line 3756 of file eBoard.h.
References ServoPin_t::isActive, servo_t::Pin, servoIndex, and servos.
void Servo::detach | ( | ) |
Definition at line 3711 of file eBoard.h.
References finISR(), ServoPin_t::isActive, isTimerActive(), servo_t::Pin, SERVO_INDEX_TO_TIMER, and servoIndex.
|
inline |
Definition at line 3744 of file eBoard.h.
References readMicroseconds(), SERVO_MAX, and SERVO_MIN.
int Servo::readMicroseconds | ( | ) |
Definition at line 3748 of file eBoard.h.
References INVALID_SERVO, servoIndex, servos, ticksToUs, and TRIM_DURATION.
Referenced by read().
void Servo::write | ( | int | value | ) |
Definition at line 3718 of file eBoard.h.
References MIN_PULSE_WIDTH, SERVO_MAX, SERVO_MIN, and writeMicroseconds().
Referenced by set_motor_speed(), set_steer_angle(), and setup().
void Servo::writeMicroseconds | ( | int | value | ) |
Definition at line 3727 of file eBoard.h.
References MAX_SERVOS, SERVO_MAX, SERVO_MIN, servoIndex, servos, servo_t::ticks, TRIM_DURATION, and usToTicks.
Referenced by write().
|
private |
Definition at line 3592 of file eBoard.h.
Referenced by attach(), attached(), detach(), readMicroseconds(), Servo(), and writeMicroseconds().