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
21
void
setup_ButtonModule
();
22
void
loop_ButtonModule
();
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.
30
void
refreshDelayButtonTouched_ButtonModule
();
31
32
//!This is only thing exposed to others.. (Kinda which only 1 button module)
33
//!short press on buttonA (top button)
34
void
buttonA_ShortPress_ButtonModule
();
35
//!long press on buttonA (top button)
36
void
buttonA_LongPress_ButtonModule
();
37
//!the long press of the side button
38
void
buttonB_LongPress_ButtonModule
();
39
//!the short press of the side button
40
void
buttonB_ShortPress_ButtonModule
();
41
42
#endif
43
44
#endif
//ButtonModule_h
buttonB_ShortPress_ButtonModule
void buttonB_ShortPress_ButtonModule()
the short press of the side button
Definition:
ButtonModule.cpp:125
buttonB_LongPress_ButtonModule
void buttonB_LongPress_ButtonModule()
the long press of the side button
Definition:
ButtonModule.cpp:120
loop_ButtonModule
void loop_ButtonModule()
Definition:
ButtonModule.cpp:76
buttonA_ShortPress_ButtonModule
void buttonA_ShortPress_ButtonModule()
Definition:
ButtonModule.cpp:110
refreshDelayButtonTouched_ButtonModule
void refreshDelayButtonTouched_ButtonModule()
called by the feed operation to say the device is still running.. and count it as a button click.
Definition:
ButtonModule.cpp:30
buttonA_LongPress_ButtonModule
void buttonA_LongPress_ButtonModule()
long press on buttonA (top button)
Definition:
ButtonModule.cpp:115
setup_ButtonModule
void setup_ButtonModule()
Definition:
ButtonModule.cpp:58
src
ButtonModule
ButtonModule.h
Generated on Wed Jan 11 2023 09:16:22 for ESP_IOT by
1.9.5