Remove unused buttonStateChanged from some variants
This commit is contained in:
1 parent
7ab21ebe2d
commit
a1528cc36f
10 files changed
-69
No files matched your search
@@ -6,7 +6,6 @@
|
||||
|
||||
void ThinkNodeM4Board::begin() {
|
||||
NRF52Board::begin();
|
||||
btn_prev_state = HIGH;
|
||||
|
||||
Wire.begin();
|
||||
battery_serial->begin(4800);
|
||||
|
||||
@@ -9,7 +9,6 @@ protected:
|
||||
#if NRF52_POWER_MANAGEMENT
|
||||
void initiateShutdown(uint8_t reason) override;
|
||||
#endif
|
||||
uint8_t btn_prev_state;
|
||||
HardwareSerial * battery_serial;
|
||||
uint16_t bat_level_mv = 0;
|
||||
uint8_t bat_level_percent =0;
|
||||
@@ -32,17 +31,6 @@ public:
|
||||
return "Elecrow ThinkNode M4";
|
||||
}
|
||||
|
||||
int buttonStateChanged() {
|
||||
#ifdef BUTTON_PIN
|
||||
uint8_t v = digitalRead(BUTTON_PIN);
|
||||
if (v != btn_prev_state) {
|
||||
btn_prev_state = v;
|
||||
return (v == USER_BTN_PRESSED) ? 1 : -1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void shutdownPeripherals() override {
|
||||
// shutdown common peripherals
|
||||
NRF52Board::shutdownPeripherals();
|
||||
|
||||
Reference in new issue
Block a user