Silence unused-variable warning (#2872)
[ExpressLRS.git] / src / lib / BUTTON / devButton.h
blobcf88d96dd0e3750b3425cb8b1b1862d732317fab
1 #pragma once
3 #include "device.h"
4 #include "common.h"
6 typedef void (*ButtonAction_fn)();
8 #if defined(GPIO_PIN_BUTTON)
9 extern device_t Button_device;
10 #define HAS_BUTTON
12 #include <list>
13 #include <map>
15 typedef struct action {
16 uint8_t button;
17 bool longPress;
18 uint8_t count;
19 action_e action;
20 } action_t;
22 void registerButtonFunction(action_e action, ButtonAction_fn function);
23 size_t button_GetActionCnt();
24 #else
25 inline void registerButtonFunction(uint8_t action, ButtonAction_fn function) {}
26 inline size_t button_GetActionCnt() { return 0; }
27 #endif