Skip to content

Commit

Permalink
Define ESPURNA_CORE as a special device (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Mar 2, 2018
1 parent 353b739 commit b0aa352
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
//--------------------------------------------------------------------------------

//#define ALEXA_SUPPORT 0
//#define BROKER_SUPPORT 0
//#define DEBUG_SERIAL_SUPPORT 0
//#define DEBUG_TELNET_SUPPORT 0
//#define DEBUG_UDP_SUPPORT 1
Expand All @@ -77,7 +78,6 @@
//#define LLMNR_SUPPORT 1 // Only with Arduino Core 2.4.0
//#define MDNS_SERVER_SUPPORT 0
//#define MDNS_CLIENT_SUPPORT 1
//#define BROKER_SUPPORT 0
//#define MQTT_SUPPORT 0
//#define NETBIOS_SUPPORT 1 // Only with Arduino Core 2.4.0
//#define NOFUSS_SUPPORT 1
Expand Down
18 changes: 0 additions & 18 deletions code/espurna/config/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@
#define ARRAYINIT(type, name, ...) \
type name[] = {__VA_ARGS__};

//------------------------------------------------------------------------------
// ESPURNA CORE
//------------------------------------------------------------------------------

#ifdef ESPURNA_CORE
#define ALEXA_SUPPORT 0
#define BROKER_SUPPORT 0
#define DOMOTICZ_SUPPORT 0
#define HOMEASSISTANT_SUPPORT 0
#define I2C_SUPPORT 0
#define MQTT_SUPPORT 0
#define NTP_SUPPORT 0
#define SCHEDULER_SUPPORT 0
#define SENSOR_SUPPORT 0
#define THINGSPEAK_SUPPORT 0
#define WEB_SUPPORT 0
#endif

//------------------------------------------------------------------------------
// TELNET
//------------------------------------------------------------------------------
Expand Down
29 changes: 28 additions & 1 deletion code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,38 @@
//
// Besides, other hardware specific information should be stated here

// -----------------------------------------------------------------------------
// ESPurna Core
// -----------------------------------------------------------------------------

#if defined(ESPURNA_CORE)

// This is a special device targeted to generate a light-weight binary image
// meant to be able to do two-step-updates:
// https://github.com/xoseperez/espurna/wiki/TwoStepUpdates

// Info
#define MANUFACTURER "ESPRESSIF"
#define DEVICE "ESPURNA_CORE"

// Disable non-core modules
#define ALEXA_SUPPORT 0
#define BROKER_SUPPORT 0
#define DOMOTICZ_SUPPORT 0
#define HOMEASSISTANT_SUPPORT 0
#define I2C_SUPPORT 0
#define MQTT_SUPPORT 0
#define NTP_SUPPORT 0
#define SCHEDULER_SUPPORT 0
#define SENSOR_SUPPORT 0
#define THINGSPEAK_SUPPORT 0
#define WEB_SUPPORT 0

// -----------------------------------------------------------------------------
// Development boards
// -----------------------------------------------------------------------------

#if defined(NODEMCU_LOLIN)
#elif defined(NODEMCU_LOLIN)

// Info
#define MANUFACTURER "NODEMCU"
Expand Down
3 changes: 2 additions & 1 deletion code/espurna/utils.ino
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ void info() {

#if SENSOR_SUPPORT

DEBUG_MSG_P(PSTR("\n[INIT] SENSORS:"));
DEBUG_MSG_P(PSTR("\n"));
DEBUG_MSG_P(PSTR("[INIT] SENSORS:"));

#if ANALOG_SUPPORT
DEBUG_MSG_P(PSTR(" ANALOG"));
Expand Down
4 changes: 2 additions & 2 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DITEAD_SONOFF_BASIC -DESPURNA_CORE
build_flags = ${common.build_flags_1m} -DESPURNA_CORE
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}

Expand All @@ -55,7 +55,7 @@ board = d1_mini
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DITEAD_SONOFF_BASIC -DESPURNA_CORE
build_flags = ${common.build_flags} -DESPURNA_CORE
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}

Expand Down

0 comments on commit b0aa352

Please sign in to comment.