|
LightHub 4.6.0
Open-source smart home controller firmware
|
Cache of raw pin reads to avoid multiple GPIO/I2C accesses within one poll cycle. More...
#include <inputs.h>
Public Member Functions | |
| readCache () | |
| uint16_t | analogReadCached (uint8_t pin, uint8_t trigPin=0, uint8_t _type=IN_ANALOG) |
| uint8_t | digitalReadCached (uint8_t pin) |
| void | invalidateInputCache () |
Protected Attributes | |
| uint8_t | addr |
| Cached I2C address / type / value. | |
| uint8_t | type |
| uint16_t | cached_data |
Cache of raw pin reads to avoid multiple GPIO/I2C accesses within one poll cycle.
| readCache::readCache | ( | ) |
| uint16_t readCache::analogReadCached | ( | uint8_t | pin, |
| uint8_t | trigPin = 0, | ||
| uint8_t | _type = IN_ANALOG ) |
Cached analogRead (with an optional trigger pin, e.g. for ultrasonic).
| uint8_t readCache::digitalReadCached | ( | uint8_t | pin | ) |
Cached digitalRead.
TBD
| void readCache::invalidateInputCache | ( | ) |
Invalidate the cached read so the next read hits the hardware.
|
protected |
Cached I2C address / type / value.
|
protected |
|
protected |