ESP_IOT v2.5
IOT ESP Coding
ButtonModule.h
Go to the documentation of this file.
1/*
2*******************************************************************************
3 Scott Version: 3.24.2022
4 BM = ButtonModule
5 USE_BUTTON_MODULE
6*******************************************************************************
7*/
8
9/*******************************ButtonModule *************************************/
10//TODO: where there are multiple buttons, allow for register(button1,button2, ...)
11//Also a way to define buttons ... eg button1 = feed, button1,quickPress = Single Feed, button1,longPress=AutoFeed .. etc.//
12
13#ifndef ButtonModule_h
14#define ButtonModule_h
15
16#include "../../Defines.h"
17#ifdef USE_BUTTON_MODULE
18
19//#include "ButtonProcessing.h"
20
23
24#define SINGLE_CLICK_BM 0
25#define MAX_CALLBACKS_BM 1
26
27
28
29//! called by the feed operation to say the device is still running.. and count it as a button click.
31
32//!This is only thing exposed to others.. (Kinda which only 1 button module)
33//!short press on buttonA (top button)
35//!long press on buttonA (top button)
37//!the long press of the side button
39//!the short press of the side button
41
42#endif
43
44#endif //ButtonModule_h
void buttonB_ShortPress_ButtonModule()
the short press of the side button
void buttonB_LongPress_ButtonModule()
the long press of the side button
void loop_ButtonModule()
void buttonA_ShortPress_ButtonModule()
void refreshDelayButtonTouched_ButtonModule()
called by the feed operation to say the device is still running.. and count it as a button click.
void buttonA_LongPress_ButtonModule()
long press on buttonA (top button)
void setup_ButtonModule()