#include <GPIO.hh>
|
volatile uint8_t * | PIN () const |
|
volatile uint8_t * | DDR () const |
|
volatile uint8_t * | PORT () const |
|
High Performance General Purpose Input Output (GPIO) Pin abstraction.
Definition at line 30 of file GPIO.hh.
Pin modes.
Enumerator |
---|
OUTPUT_MODE |
|
INPUT_MODE |
|
PULLUP_INPUT_MODE |
|
Definition at line 35 of file GPIO.hh.
Construct general purpose pin object for given digital pin with given input/output mode and initial value.
- Parameters
-
[in] | pin | identity. |
[in] | mode | input/output mode. |
[in] | value | initial value of port. |
- Note
- atomic
Definition at line 49 of file GPIO.hh.
volatile uint8_t* GPIO::DDR |
( |
| ) |
const |
|
inlineprotected |
Return pointer to Data Direction Register.
- Returns
- DDR register pointer.
Definition at line 294 of file GPIO.hh.
static volatile uint8_t* GPIO::DDR |
( |
uint8_t |
pin | ) |
|
|
inlinestatic |
Return pointer to Data Direction Register for given pin identity.
- Parameters
-
- Returns
- DDR register pointer.
Definition at line 336 of file GPIO.hh.
static uint8_t GPIO::MASK |
( |
uint8_t |
pin | ) |
|
|
inlinestatic |
Return bit mask for given pin identity.
- Parameters
-
- Returns
- pin bit mask.
Definition at line 314 of file GPIO.hh.
void GPIO::mode |
( |
Mode |
mode | ) |
const |
|
inline |
Set pin input/output mode.
- Parameters
-
mode | input or output mode. |
- Note
- atomic
Definition at line 74 of file GPIO.hh.
Mode GPIO::mode |
( |
| ) |
const |
|
inline |
Get pin input/output mode.
- Returns
- mode.
Definition at line 92 of file GPIO.hh.
Set pin input/output mode. Does not require an instance.
- Parameters
-
mode | input or output mode. |
- Note
- atomic
Definition at line 166 of file GPIO.hh.
Get pin input/output mode. Does not require an instance.
- Returns
- mode.
Definition at line 185 of file GPIO.hh.
GPIO::operator bool |
( |
| ) |
const |
|
inline |
Read pin state and return true(1) if set else false(0).
- Returns
- bool.
Definition at line 106 of file GPIO.hh.
GPIO& GPIO::operator= |
( |
bool |
value | ) |
|
|
inline |
Set the pin to the given value.
- Parameters
-
- Note
- atomic
Definition at line 117 of file GPIO.hh.
GPIO& GPIO::operator= |
( |
const GPIO & |
rhs | ) |
|
|
inline |
Set the pin state with value of given pin.
- Parameters
-
- Note
- atomic
Definition at line 136 of file GPIO.hh.
void GPIO::operator~ |
( |
| ) |
const |
|
inline |
Toggle the pin state.
- Note
- atomic
Definition at line 155 of file GPIO.hh.
volatile uint8_t* GPIO::PIN |
( |
| ) |
const |
|
inlineprotected |
Return pointer to PIN register.
- Returns
- PIN register pointer.
Definition at line 285 of file GPIO.hh.
static volatile uint8_t* GPIO::PIN |
( |
uint8_t |
pin | ) |
|
|
inlinestatic |
Return pointer to PIN register for given pin identity.
- Parameters
-
- Returns
- PIN register pointer.
Definition at line 324 of file GPIO.hh.
volatile uint8_t* GPIO::PORT |
( |
| ) |
const |
|
inlineprotected |
Return pointer to data PORT register.
- Returns
- PORT register pointer.
Definition at line 303 of file GPIO.hh.
static volatile uint8_t* GPIO::PORT |
( |
uint8_t |
pin | ) |
|
|
inlinestatic |
Return pointer to data PORT register for given pin identity.
- Parameters
-
- Returns
- PORT register pointer.
Definition at line 347 of file GPIO.hh.
Use pin identity directly to read pin state. Does not require an instance. Return true(1) if the pin is set otherwise false(0).
- Parameters
-
- Returns
- bool.
Definition at line 202 of file GPIO.hh.
Use pin identity directly to toggle pin state. Does not require an instance.
- Parameters
-
- Note
- atomic
Definition at line 254 of file GPIO.hh.
Use pin identity directly to write pin state. Does not require an instance.
- Parameters
-
[in] | pin | identity.. |
[in] | value | to write. |
- Note
- atomic
Definition at line 215 of file GPIO.hh.
const uint8_t GPIO::m_mask |
|
protected |
volatile uint8_t* const GPIO::m_sfr |
|
protected |
Special function register pointer.
Definition at line 276 of file GPIO.hh.
The documentation for this class was generated from the following file: