A class for ExtendedIOElements with a fixed size.
More...
#include <StaticSizeExtendedIOElement.hpp>
template<uint16_t N>
class AH::StaticSizeExtendedIOElement< N >
A class for ExtendedIOElements with a fixed size.
This class is to make it easier to get an array of all pins of the element.
Definition at line 19 of file StaticSizeExtendedIOElement.hpp.
◆ StaticSizeExtendedIOElement()
◆ pins()
◆ length()
◆ pinMode()
virtual void AH::ExtendedIOElement::pinMode |
( |
pin_t |
pin, |
|
|
uint8_t |
mode |
|
) |
| |
|
pure virtualinherited |
Set the mode of a given pin.
- Note
- This function might not be implemented by all subclasses.
Some extended IO types, such as shift registers, can only be used as outputs.
On others, it might be implemented, but it could impact all pins of the IO element. For example, enabling the internal pull-up resistor on an analog multiplexer affects all pins of the mux.
- Parameters
-
pin | The (zero-based) pin of this IO element. |
mode | The mode to set the pin to (e.g. INPUT , OUTPUT or INPUT_PULLUP ). |
Implemented in AH::ShiftRegisterOutBase< N >, AH::MAX7219, and AH::AnalogMultiplex< N >.
◆ digitalWrite()
virtual void AH::ExtendedIOElement::digitalWrite |
( |
pin_t |
pin, |
|
|
uint8_t |
state |
|
) |
| |
|
pure virtualinherited |
◆ digitalRead()
virtual int AH::ExtendedIOElement::digitalRead |
( |
pin_t |
pin | ) |
|
|
pure virtualinherited |
◆ analogWrite()
virtual void AH::ExtendedIOElement::analogWrite |
( |
pin_t |
pin, |
|
|
analog_t |
val |
|
) |
| |
|
pure virtualinherited |
◆ analogRead()
◆ begin()
virtual void AH::ExtendedIOElement::begin |
( |
| ) |
|
|
pure virtualinherited |
◆ beginAll()
void AH::ExtendedIOElement::beginAll |
( |
| ) |
|
|
staticinherited |
◆ update()
virtual void AH::ExtendedIOElement::update |
( |
| ) |
|
|
pure virtualinherited |
◆ pin()
pin_t AH::ExtendedIOElement::pin |
( |
pin_t |
pin | ) |
const |
|
inherited |
Get the extended IO pin number of a given physical pin of this extended IO element.
- Parameters
-
pin | The zero-based physical pin number of this IO element. |
- Returns
- The global, unique extended IO pin number for the given pin.
Definition at line 28 of file ExtendedIOElement.cpp.
◆ operator[]()
pin_t AH::ExtendedIOElement::operator[] |
( |
pin_t |
pin | ) |
const |
|
inherited |
Get the extended IO pin number of a given physical pin of this extended IO element.
It is alias for ExtendedIOElement::pin
.
- Parameters
-
pin | The zero-based physical pin number of this IO element. |
- Returns
- The global, unique extended IO pin number for the given pin.
Definition at line 43 of file ExtendedIOElement.cpp.
◆ getLength()
pin_t AH::ExtendedIOElement::getLength |
( |
| ) |
const |
|
inherited |
Get the number of pins this IO element has.
- Returns
- The number of pins this IO element has.
Definition at line 45 of file ExtendedIOElement.cpp.
◆ getEnd()
pin_t AH::ExtendedIOElement::getEnd |
( |
| ) |
const |
|
inherited |
Get the largest global extended IO pin number that belongs to this extended IO element.
Definition at line 47 of file ExtendedIOElement.cpp.
◆ getStart()
pin_t AH::ExtendedIOElement::getStart |
( |
| ) |
const |
|
inherited |
Get the smallest global extended IO pin number that belongs to this extended IO element.
Definition at line 49 of file ExtendedIOElement.cpp.
◆ getAll()
◆ start
const pin_t AH::ExtendedIOElement::start |
|
privateinherited |
◆ end
const pin_t AH::ExtendedIOElement::end |
|
privateinherited |
◆ offset
pin_t AH::ExtendedIOElement::offset = NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS |
|
staticprivateinherited |
◆ elements
◆ next
◆ previous
The documentation for this class was generated from the following file: