COSA
An Object-Oriented Platform for Arduino Programming
|
#include <Pin.hh>
Public Types | |
enum | Direction { MSB_FIRST = 0, LSB_FIRST = 1 } |
Public Member Functions | |
Pin (uint8_t pin) | |
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) |
Static Public Member Functions | |
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) |
Protected Member Functions | |
volatile uint8_t * | PIN () const |
volatile uint8_t * | DDR () const |
volatile uint8_t * | PORT () const |
volatile uint8_t * | PCIMR () const |
Protected Attributes | |
volatile uint8_t *const | m_sfr |
const uint8_t | m_mask |
const uint8_t | m_pin |
Arduino pins abstractions; abstract, input, output, interrupt and analog pin. Captures the mapping from Arduino to processor pins. Forces declarative programming of pins in sketches.
enum Pin::Direction |
|
inline |
|
inlinestatic |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inlineprotected |
|
inlinestatic |
|
inline |
|
inlineprotected |
|
inlinestatic |
|
inlineprotected |
|
inline |
|
inlinestatic |
|
protected |