#include <IoAbstractionWire.h>
A wrapper for the AW9523IoAbstraction that provides the LED control analog functions as an AnalogDevice, this allows you to use this device with anything that already works with AnalogDevice objects for output. Simple construct giving a reference to the actual abstraction.
◆ getMaximumRange()
int MPR121AnalogAbstraction::getMaximumRange |
( |
AnalogDirection |
direction, |
|
|
pinid_t |
pin |
|
) |
| |
|
inlineoverridevirtual |
- Parameters
-
dir | the direction required |
pin | the pin for which the range is desired |
- Returns
- the maximum range of the analog input or output on this device for the given pin
Implements AnalogDevice.
◆ getBitDepth()
int MPR121AnalogAbstraction::getBitDepth |
( |
AnalogDirection |
direction, |
|
|
pinid_t |
pin |
|
) |
| |
|
inlineoverridevirtual |
- Parameters
-
pin | the pin for which the bit depth is required. |
direction | the direction in which the depth is queried (DIR_IN, DIR_OUT) |
- Returns
- the number of bits
Implements AnalogDevice.
◆ initPin()
void MPR121AnalogAbstraction::initPin |
( |
pinid_t |
pin, |
|
|
AnalogDirection |
direction |
|
) |
| |
|
overridevirtual |
initialises a pin as either an input or output of analog signals. No validation to check if that pin can support input or output is performed.
- Parameters
-
pin | the pin to initialise |
direction | the direction required |
Implements AnalogDevice.
◆ getCurrentValue()
unsigned int MPR121AnalogAbstraction::getCurrentValue |
( |
pinid_t |
pin | ) |
|
|
inlineoverridevirtual |
Returns the current value on the ADC for the given pin
- Parameters
-
- Returns
- the current value on that pin
Implements AnalogDevice.
◆ setCurrentValue()
void MPR121AnalogAbstraction::setCurrentValue |
( |
pinid_t |
pin, |
|
|
unsigned int |
newValue |
|
) |
| |
|
inlineoverridevirtual |
Sets the current value on an output capable device to a new value
- Parameters
-
pin | the pin to read from |
newValue | the value to be set |
Implements AnalogDevice.
◆ setCurrentFloat()
void MPR121AnalogAbstraction::setCurrentFloat |
( |
pinid_t |
pin, |
|
|
float |
newValue |
|
) |
| |
|
inlineoverridevirtual |
sets the current value based on a float from 0 to 1, where 0 is minimum and 1 is maximum.
- Parameters
-
pin | the pin for which to set |
newValue | the new value which should be between 0 and 1.0 |
Implements AnalogDevice.
The documentation for this class was generated from the following files: