new button lib

This commit is contained in:
cyberman54 committed 2022-11-06 15:00:54 +01:00
1 parent 0a36377e66
commit 4015e9e989
10 files changed
+61 -53

No files matched your search

+9 -3
View File
@@ -1,7 +1,7 @@
#ifndef _BUTTON_H
#define _BUTTON_H
#include <SimpleButton.h>
#include <OneButton.h>
#include "irqhandler.h"
#include "senddata.h"
#include "display.h"
@@ -11,7 +11,13 @@
#define BUTTON_ACTIVEHIGH 0
#endif
void button_init(int pin);
void readButton();
#ifndef BUTTON_PULLUP
#define BUTTON_PULLUP 0
#endif
extern TaskHandle_t buttonLoopTask;
void button_init(void);
void IRAM_ATTR readButton(void);
#endif
+1
View File
@@ -13,6 +13,7 @@
#include "reset.h"
#include "led.h"
#include "power.h"
#include "button.h"
extern Ticker cyclicTimer;
-8
View File
@@ -36,12 +36,4 @@ void IRAM_ATTR DisplayIRQ();
void IRAM_ATTR MatrixDisplayIRQ();
#endif
#ifdef HAS_BUTTON
void IRAM_ATTR ButtonIRQ();
#endif
#ifdef HAS_PMU
void IRAM_ATTR PMUIRQ();
#endif
#endif