Main class of a ReactESP program.
More...
#include <ReactESP.h>
Main class of a ReactESP program.
Definition at line 245 of file ReactESP.h.
◆ ReactESP()
Construct a new ReactESP object.
- Parameters
-
cb | Setup function to be called. This is equivalent to the regular Arduino setup() function and should perform any initial setup the program requires. |
Definition at line 260 of file ReactESP.h.
◆ onAvailable()
Create a new StreamReaction.
- Parameters
-
stream | Arduino Stream object to monitor |
cb | Callback function |
- Returns
- StreamReaction*
Definition at line 176 of file ReactESP.cpp.
◆ onDelay()
Create a new DelayReaction.
- Parameters
-
t | Delay, in milliseconds |
cb | Callback function |
- Returns
- DelayReaction*
Definition at line 150 of file ReactESP.cpp.
◆ onDelayMicros()
Create a new DelayReaction.
- Parameters
-
t | Delay, in microseconds |
cb | Callback function |
- Returns
- DelayReaction*
Definition at line 156 of file ReactESP.cpp.
◆ onInterrupt()
Create a new ISRReaction (interrupt reaction)
- Parameters
-
pin_number | GPIO pin number |
mode | One of CHANGE, RISING, FALLING |
cb | Interrupt handler to call. This should be a very simple function, ideally setting a flag variable or incrementing a counter. The function should be defined with ICACHE_RAM_ATTR. |
- Returns
- ISRReaction*
Definition at line 182 of file ReactESP.cpp.
◆ onRepeat()
Create a new RepeatReaction.
- Parameters
-
t | Interval, in milliseconds |
cb | Callback function |
- Returns
- RepeatReaction*
Definition at line 163 of file ReactESP.cpp.
◆ onRepeatMicros()
Create a new RepeatReaction.
- Parameters
-
t | Interval, in microseconds |
cb | Callback function |
- Returns
- RepeatReaction*
Definition at line 169 of file ReactESP.cpp.
◆ onTick()
Create a new TickReaction.
- Parameters
-
cb | Callback function to be called at every loop execution |
- Returns
- TickReaction*
Definition at line 189 of file ReactESP.cpp.
◆ setup()
void ReactESP::setup |
( |
void |
| ) |
|
|
inline |
◆ tick()
void ReactESP::tick |
( |
void |
| ) |
|
◆ ISRReaction
◆ Reaction
◆ RepeatReaction
◆ TimedReaction
◆ UntimedReaction
◆ app
Static singleton reference to the instantiated ReactESP object.
Definition at line 265 of file ReactESP.h.
The documentation for this class was generated from the following files: