|
ESPectro32 Library
Library for using ESPectro32 board
|
ESPectro32 button. More...
#include <ESPectro32_Button.h>
Public Member Functions | |
| ESPectro32_Button (uint8_t gpio, boolean activeHigh=false) | |
| void | begin () |
| Must be called as soon as possible to do initialization stuffs. | |
| void | start (void *taskData=nullptr) |
| Button_State | getState () |
| void | run () |
| void | runAsync (void *data) |
| Body of the task to execute. More... | |
| void | onButtonDown (ButtonActionCallback cb) |
| void | onButtonUp (ButtonActionCallback cb) |
| void | onPressed (ButtonActionCallback cb) |
| void | onLongPressed (ButtonActionCallback cb) |
| void | onDoublePressed (ButtonActionCallback cb) |
Public Member Functions inherited from Task | |
| Task (std::string taskName="Task", uint16_t stackSize=2048, UBaseType_t priority=5) | |
| Task (BaseType_t coreId, std::string taskName="Task", uint16_t stackSize=2048, UBaseType_t priority=5) | |
| void | setStackSize (uint16_t stackSize) |
| void | setPriority (UBaseType_t priority) |
| void | setTaskName (std::string &taskN) |
| void | start (void *taskData=nullptr) |
| Start an instance of the task. More... | |
| void | stop () |
| void | delay (int ms) |
| Suspend the task for the specified milliseconds. More... | |
Private Member Functions | |
| bool | isActive () |
| void | examine () |
ESPectro32 button.
This class is for working with button, especially attached button "A" and "B" on ESPectro32. But nothing will stop you for working with external buttons.
Creating object:
Attaching event handlers:
That's for handling "on button up" event.
|
virtual |
Body of the task to execute.
This function must be implemented in the subclass that represents the actual task to run. When a task is started by calling start(), this is the code that is executed in the newly created task.
| [in] | data | The data passed in to the newly started task. |
Implements Task.
1.8.6