Browse Source

Option to disable button support

rfm69
Xose Pérez 6 years ago
parent
commit
152bf22fdd
4 changed files with 12 additions and 1 deletions
  1. +4
    -0
      code/espurna/button.ino
  2. +4
    -0
      code/espurna/config/general.h
  3. +1
    -0
      code/espurna/config/hardware.h
  4. +3
    -1
      code/espurna/espurna.ino

+ 4
- 0
code/espurna/button.ino View File

@ -10,6 +10,8 @@ Copyright (C) 2016-2018 by Xose Pérez <xose dot perez at gmail dot com>
// BUTTON // BUTTON
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#if BUTTON_SUPPORT
#include <DebounceEvent.h> #include <DebounceEvent.h>
#include <vector> #include <vector>
@ -266,3 +268,5 @@ void buttonLoop() {
#endif #endif
} }
#endif // BUTTON_SUPPORT

+ 4
- 0
code/espurna/config/general.h View File

@ -201,6 +201,10 @@
// BUTTON // BUTTON
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#ifndef BUTTON_SUPPORT
#define BUTTON_SUPPORT 1
#endif
#ifndef BUTTON_DEBOUNCE_DELAY #ifndef BUTTON_DEBOUNCE_DELAY
#define BUTTON_DEBOUNCE_DELAY 50 // Debounce delay (ms) #define BUTTON_DEBOUNCE_DELAY 50 // Debounce delay (ms)
#endif #endif


+ 1
- 0
code/espurna/config/hardware.h View File

@ -37,6 +37,7 @@
// Disable non-core modules // Disable non-core modules
#define ALEXA_SUPPORT 0 #define ALEXA_SUPPORT 0
#define BROKER_SUPPORT 0 #define BROKER_SUPPORT 0
#define BUTTON_SUPPORT 0
#define DOMOTICZ_SUPPORT 0 #define DOMOTICZ_SUPPORT 0
#define HOMEASSISTANT_SUPPORT 0 #define HOMEASSISTANT_SUPPORT 0
#define I2C_SUPPORT 0 #define I2C_SUPPORT 0


+ 3
- 1
code/espurna/espurna.ino View File

@ -99,7 +99,9 @@ void setup() {
#endif #endif
relaySetup(); relaySetup();
buttonSetup();
#if BUTTON_SUPPORT
buttonSetup();
#endif
#if LED_SUPPORT #if LED_SUPPORT
ledSetup(); ledSetup();
#endif #endif


Loading…
Cancel
Save