36#include "RotaryEncoder.h"
56#define IN_ACTIVE_HIGH 2
62#define IN_PUSH_TOGGLE 1
67#define IN_ULTRASONIC 7
93#define IS_PRESSED3 10u
96#define IS_WAITRELEASE 13u
97#define IS_REQSTATE 0xFF
103#define SAME_STATE_ATTEMPTS 2
104#define ANALOG_STATE_ATTEMPTS 6
106#define ANALOG_NOIZE 1
115#define CHECK_SENSOR 1
117#define CHECK_INTERRUPT 3
118#define CHECK_ULTRASONIC 4
125#define T_RPT_PULSE 150
126#define T_REPEAT 30000
160extern aJsonObject *
inputs;
222 Input(aJsonObject *obj, aJsonObject * configObj = NULL);
238 int Poll(
short cause);
258 void Parse(aJsonObject * configObj = NULL);
262 void contactPoll(
short cause, RotaryEncoder * re = NULL);
298 bool changeState(uint8_t newState,
short cause, aJsonObject * currentInputObject,
bool contactState,
bool calledOnTimer =
false);
332 uint8_t I2CReadBit(uint8_t
type, uint8_t
addr, uint8_t pin);
Command + value container passed between items, drivers and MQTT.
Definition itemCmd.h:306
Cache of raw pin reads to avoid multiple GPIO/I2C accesses within one poll cycle.
Definition inputs.h:323
uint16_t cached_data
Definition inputs.h:341
uint8_t digitalReadCached(uint8_t pin)
Definition inputs.cpp:1346
uint8_t type
Definition inputs.h:340
void invalidateInputCache()
Definition inputs.cpp:1365
readCache()
Definition inputs.cpp:1320
uint8_t addr
Cached I2C address / type / value.
Definition inputs.h:339
uint16_t analogReadCached(uint8_t pin, uint8_t trigPin=0, uint8_t _type=IN_ANALOG)
Definition inputs.cpp:1327
Per-input runtime state, packed into the JSON object's valueint.
Definition inputs.h:170
uint32_t timestamp
Definition inputs.h:172
uint32_t aslong
Definition inputs.h:171