From 8e8c990ff0294fd85c9b5f510dd873f1493c948d Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Mon, 16 Dec 2019 14:08:24 +0300 Subject: [PATCH] Device: MAGICHOME_ZJ_WFMN_C_11 (#2051) --- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 23 +++++++++++++++++++++++ code/platformio.ini | 10 ++++++++++ 3 files changed, 34 insertions(+) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index d5806215..3b151db2 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -109,6 +109,7 @@ //#define MAGICHOME_ZJ_ESPM_5CH_B_13 //#define MAGICHOME_ZJ_WFMN_A_11 //#define MAGICHOME_ZJ_WFMN_B_11 +//#define MAGICHOME_ZJ_WFMN_C_11 //#define MANCAVEMADE_ESPLIVE //#define MAXCIO_WDE004 //#define MAXCIO_WUS002S diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index d1c381ec..7e8e2f07 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1380,6 +1380,28 @@ #define RFB_DIRECT 1 #define RFB_RX_PIN 4 +#elif defined(MAGICHOME_ZJ_WFMN_C_11) + + // Info + #define MANUFACTURER "MAGICHOME" + #define DEVICE "ZJ_WFMN_C_11" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Buttons + #define BUTTON1_PIN 0 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // LEDs + #define LED1_PIN 2 + #define LED1_PIN_INVERSE 1 + + // Light + #define LIGHT_CHANNELS 1 + #define LIGHT_CH1_PIN 12 // WHITE + #elif defined(MAGICHOME_ZJ_ESPM_5CH_B_13) // Info @@ -4221,6 +4243,7 @@ #define RELAY2_TYPE RELAY_TYPE_NORMAL #define RELAY3_TYPE RELAY_TYPE_NORMAL #define RELAY4_TYPE RELAY_TYPE_NORMAL + // ----------------------------------------------------------------------------- #else diff --git a/code/platformio.ini b/code/platformio.ini index 0b524e19..a6cd4e23 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -755,6 +755,16 @@ build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_ESPM_5CH_B_13 upload_port = ${common.ota_upload_port} upload_flags = ${common.ota_upload_flags} +[env:magichome-zj-wfmn-c-11] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_WFMN_C_11 + +[env:magichome-zj-wfmn-c-11-ota] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_WFMN_C_11 +upload_port = ${common.ota_upload_port} +upload_flags = ${common.ota_upload_flags} + [env:huacanxing-h801] board = ${common.board_1m} build_flags = ${common.build_flags_1m0m} -DHUACANXING_H801