#include <MCP7940N.hh>
|
volatile uint8_t * | PIN () const |
|
volatile uint8_t * | DDR () const |
|
volatile uint8_t * | PORT () const |
|
volatile uint8_t * | PCIMR () const |
|
Alarm Interrupt Handler.
Definition at line 303 of file MCP7940N.hh.
Serialization directions; most or least significant bit first.
Enumerator |
---|
MSB_FIRST |
|
LSB_FIRST |
|
Definition at line 84 of file Pin.hh.
Enumerator |
---|
ON_LOW_LEVEL_MODE |
|
ON_CHANGE_MODE |
|
ON_FALLING_MODE |
|
ON_RISING_MODE |
|
Definition at line 35 of file ExternalInterrupt.hh.
Enumerator |
---|
OUTPUT_MODE |
|
INPUT_MODE |
|
Definition at line 31 of file IOPin.hh.
void OutputPin::_clear |
( |
| ) |
const |
|
inlineinherited |
Clear the output pin. Unprotected version.
Definition at line 114 of file OutputPin.hh.
void OutputPin::_set |
( |
| ) |
const |
|
inlineinherited |
Set the output pin. Unprotected version.
Definition at line 75 of file OutputPin.hh.
void OutputPin::_set |
( |
int |
value | ) |
const |
|
inlineinherited |
Set the output pin with the given value. Zero(0) to clear and non-zero to set. Unprotected version.
- Parameters
-
Definition at line 184 of file OutputPin.hh.
void OutputPin::_toggle |
( |
| ) |
const |
|
inlineinherited |
Toggle the output pin. Unprotected version.
Definition at line 153 of file OutputPin.hh.
void OutputPin::_write |
( |
int |
value | ) |
const |
|
inlineinherited |
Set the output pin with the given value. Zero(0) to clear and non-zero to set. Unprotected version.
- Parameters
-
Definition at line 219 of file OutputPin.hh.
Set the given output pin with the given value. Zero(0) to clear and non-zero to set. Unprotected version when pin and value are constants.
- Parameters
-
[in] | pin | number (must be constant). |
[in] | value | to write (must be constant). |
Definition at line 345 of file OutputPin.hh.
void ExternalInterrupt::clear |
( |
| ) |
|
|
virtualinherited |
void OutputPin::clear |
( |
| ) |
const |
|
inlineinherited |
Clear the output pin.
- Note
- atomic
Definition at line 124 of file OutputPin.hh.
static volatile uint8_t* Pin::DDR |
( |
uint8_t |
pin | ) |
|
|
inlinestaticinherited |
Return pointer to Data Direction Register.
- Parameters
-
- Returns
- DDR register pointer.
Definition at line 64 of file Pin.hh.
volatile uint8_t* Pin::DDR |
( |
| ) |
const |
|
inlineprotectedinherited |
Return pointer to Data Direction Register.
- Returns
- DDR register pointer.
Definition at line 245 of file Pin.hh.
void ExternalInterrupt::disable |
( |
| ) |
|
|
virtualinherited |
void ExternalInterrupt::enable |
( |
| ) |
|
|
virtualinherited |
void OutputPin::high |
( |
| ) |
const |
|
inlineinherited |
Set the output pin.
- Note
- atomic
Definition at line 95 of file OutputPin.hh.
bool Pin::is_clear |
( |
| ) |
const |
|
inlineinherited |
Return true(1) if the pin is clear otherwise false(0).
- Returns
- boolean.
Definition at line 142 of file Pin.hh.
bool Pin::is_high |
( |
| ) |
const |
|
inlineinherited |
Return true(1) if the pin is set otherwise false(0).
- Returns
- boolean.
Definition at line 122 of file Pin.hh.
bool Pin::is_low |
( |
| ) |
const |
|
inlineinherited |
Return true(1) if the pin is clear otherwise false(0).
- Returns
- boolean.
Definition at line 152 of file Pin.hh.
bool Pin::is_off |
( |
| ) |
const |
|
inlineinherited |
Return true(1) if the pin is clear otherwise false(0).
- Returns
- boolean.
Definition at line 162 of file Pin.hh.
bool Pin::is_on |
( |
| ) |
const |
|
inlineinherited |
Return true(1) if the pin is set otherwise false(0).
- Returns
- boolean.
Definition at line 132 of file Pin.hh.
bool Pin::is_set |
( |
| ) |
const |
|
inlineinherited |
Return true(1) if the pin is set otherwise false(0).
- Returns
- boolean.
Definition at line 112 of file Pin.hh.
void OutputPin::low |
( |
| ) |
const |
|
inlineinherited |
Clear the output pin.
- Note
- atomic
Definition at line 134 of file OutputPin.hh.
static uint8_t Pin::MASK |
( |
uint8_t |
pin | ) |
|
|
inlinestaticinherited |
Return bit mask for given Arduino pin number.
- Parameters
-
- Returns
- pin bit mask.
Definition at line 42 of file Pin.hh.
void IOPin::mode |
( |
Mode |
mode | ) |
|
|
inlineinherited |
Change IO-pin to given mode.
- Parameters
-
[in] | mode | new operation mode. |
- Note
- atomic
Definition at line 56 of file IOPin.hh.
Set output pin to mode.
- Parameters
-
[in] | pin | number. |
[in] | initial | value. |
- Note
- atomic
Definition at line 56 of file OutputPin.hh.
Mode IOPin::mode |
( |
| ) |
const |
|
inlineinherited |
Get current IO-pin mode.
- Returns
- mode.
Definition at line 71 of file IOPin.hh.
Change IO-pin to given mode.
- Parameters
-
[in] | pin | number. |
[in] | mode | new operation mode. |
- Note
- atomic
Definition at line 83 of file IOPin.hh.
Get IO-pin mode.
- Parameters
-
- Returns
- mode.
Definition at line 101 of file IOPin.hh.
void OutputPin::off |
( |
| ) |
const |
|
inlineinherited |
Clear the output pin.
- Note
- atomic
Definition at line 144 of file OutputPin.hh.
void OutputPin::on |
( |
| ) |
const |
|
inlineinherited |
Set the output pin.
- Note
- atomic
Definition at line 105 of file OutputPin.hh.
void MCP7940N::AlarmInterrupt::on_interrupt |
( |
uint16_t |
arg = 0 | ) |
|
|
virtual |
Interrupt service callback on external interrupt pin change.
- Parameters
-
[in] | arg | argument from interrupt service routine. |
Reimplemented from ExternalInterrupt.
Definition at line 30 of file MCP7940N.cpp.
Pin::operator bool |
( |
| ) |
const |
|
inlineinherited |
Read input pin and assign variable.
- Parameters
-
- Returns
- pin.
Definition at line 204 of file Pin.hh.
OutputPin& OutputPin::operator<< |
( |
int |
value | ) |
|
|
inlineinherited |
Set the output pin with the given value. Zero(0) to clear and non-zero to set. Output operator syntax.
- Parameters
-
- Returns
- output pin.
Definition at line 364 of file OutputPin.hh.
Pin& Pin::operator>> |
( |
uint8_t & |
var | ) |
|
|
inlineinherited |
Read input pin and assign variable.
- Parameters
-
- Returns
- pin.
Definition at line 215 of file Pin.hh.
volatile uint8_t* Pin::PCIMR |
( |
| ) |
const |
|
inlineprotectedinherited |
Return pin change interrupt mask register.
- Returns
- pin change mask register pointer.
Definition at line 263 of file Pin.hh.
static volatile uint8_t* Pin::PIN |
( |
uint8_t |
pin | ) |
|
|
inlinestaticinherited |
Return pointer to PIN register.
- Parameters
-
- Returns
- PIN register pointer.
Definition at line 53 of file Pin.hh.
uint8_t Pin::pin |
( |
| ) |
const |
|
inlineinherited |
Return Arduino pin number of abstract pin.
- Returns
- pin number.
Definition at line 103 of file Pin.hh.
volatile uint8_t* Pin::PIN |
( |
| ) |
const |
|
inlineprotectedinherited |
Return pointer to PIN register.
- Returns
- PIN register pointer.
Definition at line 236 of file Pin.hh.
static volatile uint8_t* Pin::PORT |
( |
uint8_t |
pin | ) |
|
|
inlinestaticinherited |
Return pointer to data PORT register.
- Parameters
-
- Returns
- PORT register pointer.
Definition at line 75 of file Pin.hh.
volatile uint8_t* Pin::PORT |
( |
| ) |
const |
|
inlineprotectedinherited |
Return pointer to data PORT register.
- Returns
- PORT register pointer.
Definition at line 254 of file Pin.hh.
void OutputPin::pulse |
( |
uint16_t |
us | ) |
const |
|
inlineinherited |
Toggle the output pin to form a pulse with given width in micro-seconds.
- Parameters
-
[in] | us | pulse width in micro seconds |
- Note
- atomic
-
pulse width is limited to 1000 us
Definition at line 378 of file OutputPin.hh.
Return true(1) if the pin is set otherwise false(0).
- Returns
- boolean.
Definition at line 172 of file Pin.hh.
Shift in a byte from the input pin using the given clock output pin. Shift in according to given direction.
- Parameters
-
[in] | clk | output pin. |
[in] | order | bit first. |
- Returns
- value.
Definition at line 25 of file Pin.cpp.
Use pin number directly to read value. Does not require an instance. Return true(1) if the pin is set otherwise false(0).
- Parameters
-
- Returns
- boolean.
Definition at line 193 of file Pin.hh.
void OutputPin::set |
( |
| ) |
const |
|
inlineinherited |
Set the output pin.
- Note
- atomic
Definition at line 85 of file OutputPin.hh.
void OutputPin::set |
( |
int |
value | ) |
const |
|
inlineinherited |
Set the output pin with the given value. Zero(0) to clear and non-zero to set.
- Parameters
-
- Note
- atomic
Definition at line 201 of file OutputPin.hh.
void OutputPin::toggle |
( |
| ) |
const |
|
inlineinherited |
Toggle the output pin.
- Note
- atomic
Definition at line 163 of file OutputPin.hh.
Toggle the output pin. Atomic per definition
- Parameters
-
Definition at line 173 of file OutputPin.hh.
void OutputPin::write |
( |
int |
value | ) |
const |
|
inlineinherited |
Set the output pin with the given value. Zero(0) to clear and non-zero to set.
- Parameters
-
- Note
- atomic
Definition at line 236 of file OutputPin.hh.
Shift out given byte to the output pin using the given clock output pin. Shift out according to given direction. Data (bits) are transfered on clock transition. Interrupts are allowed during the shift out.
- Parameters
-
[in] | value | to write. |
[in] | clk | output pin. |
[in] | order | bit first. |
Definition at line 24 of file OutputPin.cpp.
void OutputPin::write |
( |
uint16_t |
value, |
|
|
uint8_t |
bits, |
|
|
uint16_t |
us |
|
) |
| const |
|
inherited |
Shift out given value and number of bits to the output pin using the given pulse length in micro-seconds. Shift out from LSB(0) to MSB(bits-1). This operation is synchronized and will turn off interrupt handling during the transmission period.
- Parameters
-
[in] | value | to write. |
[in] | bits | to write. |
[in] | us | micro-second bit period. |
- Note
- atomic
-
us should not exceed 1000
Definition at line 46 of file OutputPin.cpp.
Set the given output pin with the given value. Zero(0) to clear and non-zero to set.
- Parameters
-
[in] | pin | number. |
[in] | value | to write. |
- Note
- atomic
Definition at line 306 of file OutputPin.hh.
const uint8_t Pin::m_mask |
|
protectedinherited |
volatile uint8_t* const Pin::m_sfr |
|
protectedinherited |
Special function register pointer.
Definition at line 224 of file Pin.hh.
bool MCP7940N::AlarmInterrupt::m_triggered |
|
protected |
The documentation for this class was generated from the following files: