-
Notifications
You must be signed in to change notification settings - Fork 4
/
gpio.h
31 lines (22 loc) · 973 Bytes
/
gpio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "Lib/images.h"
#include "Lib/Free_Fonts.h"
/***************🍃 EEPROM ***************/
void EEPROMsetup(void);
/**************🍃 TFT functions ********************/
void Init_TFT(void);
void clrWorkArea(void);
/**************🍃 BUTTON ********************/
enum { None, SingleClick, DoubleClick, LongClick, ForcedClick };
class sButton
{ private:
byte antState; //Button previous pin state
byte pin; //Button physical pin number
unsigned long msecLst; //Button last time was pressed
public:
uint8_t clickState; //Button click [None, SingleClick, DoubleClick, LongClick]
sButton(byte bPin); // Constructor
void init(void); // Init button pin
void check(void) ; // Declaracion de funcion externa
int click(void) ; // Declaracion de funcion externa
void forceClick(void); //Generate a click
} ;