ReactESP 3.0.1
Asynchronous programming for the ESP microcontrollers
Loading...
Searching...
No Matches
reactesp::ISREvent Class Reference

Event that is triggered on an input pin change. More...

#include <ReactESP.h>

Inheritance diagram for reactesp::ISREvent:
[legend]
Collaboration diagram for reactesp::ISREvent:
[legend]

Public Member Functions

 ISREvent (uint8_t pin_number, int mode, react_callback callback)
 Construct a new ISREvent object.
 
void add (EventLoop *event_loop) override
 
void remove (EventLoop *event_loop) override
 
void tick (EventLoop *event_loop) override
 
- Public Member Functions inherited from reactesp::Event
 Event (react_callback callback)
 Construct a new Event object.
 
 Event (const Event &)=delete
 
 Event (Event &&)=delete
 
Eventoperator= (const Event &)=delete
 
Eventoperator= (Event &&)=delete
 
- Public Member Functions inherited from reactesp::EventInterface
virtual ~EventInterface ()=default
 Default virtual destructor.
 

Additional Inherited Members

- Protected Attributes inherited from reactesp::Event
const react_callback callback
 

Detailed Description

Event that is triggered on an input pin change.

Definition at line 207 of file ReactESP.h.

Constructor & Destructor Documentation

◆ ISREvent()

reactesp::ISREvent::ISREvent ( uint8_t pin_number,
int mode,
react_callback callback )
inline

Construct a new ISREvent object.

Parameters
pin_numberGPIO pin number to which the interrupt is attached
modeInterrupt mode. One of RISING, FALLING, CHANGE
callbackInterrupt callback. Keep this function short and add the ICACHE_RAM_ATTR attribute.

Definition at line 226 of file ReactESP.h.

Member Function Documentation

◆ add()

void reactesp::ISREvent::add ( EventLoop * event_loop)
overridevirtual

Implements reactesp::EventInterface.

Definition at line 92 of file ReactESP.cpp.

◆ remove()

void reactesp::ISREvent::remove ( EventLoop * event_loop)
overridevirtual

Implements reactesp::EventInterface.

Definition at line 101 of file ReactESP.cpp.

Here is the caller graph for this function:

◆ tick()

void reactesp::ISREvent::tick ( EventLoop * event_loop)
inlineoverridevirtual

Implements reactesp::EventInterface.

Definition at line 256 of file ReactESP.h.


The documentation for this class was generated from the following files: