|
COSA
An Object-Oriented Platform for Arduino Programming
|
#include <Servo.hh>


Public Member Functions | |
| Servo (uint8_t ix, Board::DigitalPin pin) | |
| void | pulse (uint16_t min, uint16_t max) |
| uint16_t | width () const |
| void | angle (uint8_t degree) |
| uint8_t | angle () const |
Static Public Member Functions | |
| static bool | begin () |
| static bool | end () |
Private Types | |
| enum | Direction { MSB_FIRST = 0, LSB_FIRST = 1 } |
Private Member Functions | |
| void | _set () const |
| void | _set (int value) const |
| void | set () const |
| void | set (int value) const |
| void | high () const |
| void | on () const |
| void | _clear () const |
| void | clear () const |
| void | low () const |
| void | off () const |
| void | _toggle () const |
| void | toggle () const |
| void | _write (int value) const |
| void | write (int value) const |
| void | write (uint8_t value, OutputPin &clk, Direction order=MSB_FIRST) const |
| void | write (uint16_t value, uint8_t bits, uint16_t us) const |
| OutputPin & | operator<< (int value) |
| void | pulse (uint16_t us) const |
| volatile uint8_t * | PIN () const |
| volatile uint8_t * | DDR () const |
| volatile uint8_t * | PORT () const |
| uint8_t | pin () const |
| bool | is_set () const |
| bool | is_high () const |
| bool | is_on () const |
| bool | is_clear () const |
| bool | is_low () const |
| bool | is_off () const |
| bool | read () const |
| uint8_t | read (OutputPin &clk, Direction order=MSB_FIRST) const |
| operator bool () const | |
| Pin & | operator>> (uint8_t &var) |
| volatile uint8_t * | PCIMR () const |
Static Private Member Functions | |
| static void | mode (Board::DigitalPin pin, uint8_t initial=0) |
| static void | toggle (Board::DigitalPin pin) |
| static void | _write (Board::DigitalPin pin, uint8_t value) |
| static void | write (Board::DigitalPin pin, int value) |
| static uint8_t | MASK (uint8_t pin) |
| static volatile uint8_t * | PIN (uint8_t pin) |
| static volatile uint8_t * | DDR (uint8_t pin) |
| static volatile uint8_t * | PORT (uint8_t pin) |
| static bool | read (Board::DigitalPin pin) |
Private Attributes | |
| volatile uint8_t *const | m_sfr |
| const uint8_t | m_mask |
| const uint8_t | m_pin |
Friends | |
| void | TIMER1_COMPA_vect (void) |
| void | TIMER1_COMPB_vect (void) |
Servo motor driver. Uses Timer#1 and the two compare output registers.
Cannot be used together with other classes that use Timer#1.
|
inline |
| void Servo::angle | ( | uint8_t | degree | ) |
|
inline |
|
static |
|
static |
|
inline |
|
inline |
|
friend |
Interrupt Service Routines.
|
friend |