ESP_IOT v2.5
IOT ESP Coding
M5ButtonModule.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 M5ButtonModule_h
14#define M5ButtonModule_h
15
16#include "../../Defines.h"
17#ifdef M5BUTTON_MODULE
18
19//#include "ButtonProcessing.h"
20
21void setup_M5ButtonModule();
22void loop_M5ButtonModule();
23
24#define SINGLE_CLICK_BM 0
25#define MAX_CALLBACKS_BM 1
26
27//! this status will be called and let the ALIVE re-evaluate
28void statusM5ButtonModule();
29
30//! called by the feed operation to say the device is still running.. and count it as a button click.
31//void refreshDelayButtonTouched_ButtonModule();
32
33//!This is only thing exposed to others.. (Kinda which only 1 button module)
34//!short press on buttonA (top button)
35void buttonA_ShortPress_M5ButtonModule();
36//!long press on buttonA (top button)
37void buttonA_LongPress_M5ButtonModule();
38//!the long press of the side button
39void buttonB_LongPress_M5ButtonModule();
40//!the short press of the side button
41void buttonB_ShortPress_M5ButtonModule();
42
43//! 2.21.25 add a way to change the button color (if any)
44void changeButtonColor_M5ButtonModule();
45
46#endif
47
48#endif //ButtonModule_h