Browse Source

Fix ARNIEX_SWIFITCH definitions

rfm69
Xose Pérez 6 years ago
parent
commit
aedbff583d
3 changed files with 55 additions and 39 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +30
    -27
      code/espurna/config/hardware.h
  3. +24
    -12
      code/platformio.ini

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

@ -70,6 +70,7 @@
//#define TONBUX_XSSSA06 //#define TONBUX_XSSSA06
//#define GREEN_ESP8266RELAY //#define GREEN_ESP8266RELAY
//#define IKE_ESPIKE //#define IKE_ESPIKE
//#define ARNIEX_SWIFITCH
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


+ 30
- 27
code/espurna/config/hardware.h View File

@ -51,33 +51,6 @@
// Development boards // Development boards
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#elif defined(SWIFITCH)
// https://github.com/ArnieX/swifitch
// Info
#define MANUFACTURER "SWIFITCH"
#define DEVICE "SWIFITCH"
// Buttons
#define BUTTON1_PIN 4 // D2
#define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
#define BUTTON1_PRESS BUTTON_MODE_NONE
#define BUTTON1_CLICK BUTTON_MODE_TOGGLE
#define BUTTON1_DBLCLICK BUTTON_MODE_NONE
#define BUTTON1_LNGCLICK BUTTON_MODE_NONE
#define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
// Relays
#define RELAY1_PIN 5 // D1
#define RELAY1_TYPE RELAY_TYPE_INVERSE
// LEDs
#define LED1_PIN 12 // D6
#define LED1_PIN_INVERSE 1
#elif defined(NODEMCU_LOLIN) #elif defined(NODEMCU_LOLIN)
// Info // Info
@ -1794,6 +1767,36 @@
#define LED1_PIN 2 #define LED1_PIN 2
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
// -----------------------------------------------------------------------------
// SWIFITCH
// https://github.com/ArnieX/swifitch
// -----------------------------------------------------------------------------
#elif defined(ARNIEX_SWIFITCH)
// Info
#define MANUFACTURER "ARNIEX"
#define DEVICE "SWIFITCH"
// Buttons
#define BUTTON1_PIN 4 // D2
#define BUTTON1_MODE BUTTON_SWITCH | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
#define BUTTON1_PRESS BUTTON_MODE_NONE
#define BUTTON1_CLICK BUTTON_MODE_TOGGLE
#define BUTTON1_DBLCLICK BUTTON_MODE_NONE
#define BUTTON1_LNGCLICK BUTTON_MODE_NONE
#define BUTTON1_LNGLNGCLICK BUTTON_MODE_NONE
// Relays
#define RELAY1_PIN 5 // D1
#define RELAY1_TYPE RELAY_TYPE_INVERSE
// LEDs
#define LED1_PIN 12 // D6
#define LED1_PIN_INVERSE 1
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TEST boards (do not use!!) // TEST boards (do not use!!)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 24
- 12
code/platformio.ini View File

@ -1723,6 +1723,30 @@ upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
[env:arniex-swifitch]
platform = ${common.platform}
framework = arduino
board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DARNIEX_SWIFITCH
extra_scripts = ${common.extra_scripts}
monitor_baud = 115200
[env:arniex-swifitch-ota]
platform = ${common.platform}
framework = arduino
board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DARNIEX_SWIFITCH
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS # GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -1753,18 +1777,6 @@ upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
[env:swifitch]
platform = espressif8266@1.6.0
framework = arduino
board = nodemcuv2
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DSWIFITCH
extra_scripts = ${common.extra_scripts}
monitor_baud = 115200
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# SPECIAL BUILDS - DO. NOT. USE. ever --- # SPECIAL BUILDS - DO. NOT. USE. ever ---
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------


Loading…
Cancel
Save