commit
f91e69760f
@ -7,6 +7,10 @@
|
||||
#include "display.h"
|
||||
#include "payload.h"
|
||||
|
||||
#ifndef BUTTON_ACTIVEHIGH
|
||||
#define BUTTON_ACTIVEHIGH 0
|
||||
#endif
|
||||
|
||||
void button_init(int pin);
|
||||
void readButton();
|
||||
|
||||
|
@ -60,6 +60,10 @@
|
||||
#define MY_DISPLAY_BGCOLOR TFT_BLACK
|
||||
#endif
|
||||
|
||||
#ifndef TOUCH_CS
|
||||
#define TOUCH_CS NOT_A_PIN
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// setup display hardware type, default is OLED 128x64
|
||||
|
@ -11,10 +11,10 @@ static const char TAG[] = __FILE__;
|
||||
static Button *b = NULL;
|
||||
|
||||
void button_init(int pin) {
|
||||
#ifdef BUTTON_PULLDOWN
|
||||
b = new Button(pin);
|
||||
#else
|
||||
#ifdef BUTTON_PULLUP
|
||||
b = new ButtonPullup(pin);
|
||||
#else
|
||||
b = new Button(pin, !BUTTON_ACTIVEHIGH);
|
||||
#endif
|
||||
|
||||
// attach events to the button
|
||||
|
Loading…
Reference in New Issue
Block a user