 |
LightHub
v4.0.0
Smarthome controller firmware
|
Go to the documentation of this file.
25 #define IN_ACTIVE_HIGH 2 // High level = PUSHED/ CLOSED/ ON othervise :Low Level. Use INPUT mode instead of INPUT_PULLUP for digital pin
26 #define IN_ANALOG 64 // Analog input
27 #define IN_RE 32 // Rotary Encoder (for further use)
28 #define IN_I2C 128 // MCP23017
30 #define IN_PUSH_ON 0 // PUSH - ON, Release - OFF (ovverrided by pcmd/rcmd) - DEFAULT
31 #define IN_PUSH_TOGGLE 1 // Used for push buttons. Every physicall push toggle logical switch on/off. Toggle on leading edge
45 #define IS_WAITPRESS 5
47 #define IS_RELEASED2 7
50 #define IS_PRESSED3 10u
52 #define IS_REPEAT3 12u
53 #define IS_WAITRELEASE 13u
54 #define IS_REQSTATE 0xFF
58 #define SAME_STATE_ATTEMPTS 2
59 #define ANALOG_STATE_ATTEMPTS 6
60 #define ANALOG_NOIZE 1
62 #define CHECK_SENSOR 1
64 #define CHECK_INTERRUPT 3
70 #define T_RPT_PULSE 150
104 extern aJsonObject *
inputs;
139 Input(aJsonObject *obj, aJsonObject * configObj = NULL);
147 int Poll(
short cause);
161 void Parse(aJsonObject * configObj = NULL);
194 uint8_t I2CReadBit(uint8_t
type, uint8_t
addr, uint8_t pin);
Definition: itemCmd.h:153
uint8_t toggle1
Definition: inputs.h:118
uint16_t cached_data
Definition: inputs.h:200
uint32_t timestamp
Definition: inputs.h:109
uint8_t bounce
Definition: inputs.h:123
uint8_t reqState
Definition: inputs.h:125
readCache()
Definition: inputs.cpp:1069
uint8_t type
Definition: inputs.h:199
uint8_t toggle3
Definition: inputs.h:120
uint8_t addr
Definition: inputs.h:198
uint8_t state
Definition: inputs.h:124
uint16_t timestamp16
Definition: inputs.h:126
int16_t currentValue
Definition: inputs.h:114
uint8_t reserved
Definition: inputs.h:112
uint8_t logicState
Definition: inputs.h:113
uint8_t delayedState
Definition: inputs.h:122
uint16_t analogReadCached(uint8_t pin)
Definition: inputs.cpp:1075
uint8_t lastValue
Definition: inputs.h:121
uint8_t toggle2
Definition: inputs.h:119
long int aslong
Definition: inputs.h:108
uint8_t digitalReadCached(uint8_t pin)
Definition: inputs.cpp:1084
void invalidateInputCache()
Definition: inputs.cpp:1103