From 2947a1e53c9f4dbb935b1112843fb7b973fe1ab1 Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Sat, 23 Mar 2019 15:58:52 +0300 Subject: [PATCH] Environment nrf52840_dk [SUCCESS] Environment esp32 [SUCCESS] Environment due [SUCCESS] Environment megaatmega2560 [SUCCESS] Environment esp8266 [SUCCESS] Environment megaatmega2560-net [SUCCESS] Environment due-5500 [SUCCESS] Environment controllino [SUCCESS] Environment stm32 [SUCCESS] --- check_custom_build_flags_nrf52840.sh | 2 +- lighthub/inputs.cpp | 1 - lighthub/main.cpp | 6 +++--- lighthub/main.h | 6 ++++++ lighthub/options.h | 7 +++++++ lighthub/utils.cpp | 4 ++-- platformio.ini | 24 ++++++++++++++++-------- 7 files changed, 35 insertions(+), 15 deletions(-) diff --git a/check_custom_build_flags_nrf52840.sh b/check_custom_build_flags_nrf52840.sh index ca88af5..5b8cce5 100755 --- a/check_custom_build_flags_nrf52840.sh +++ b/check_custom_build_flags_nrf52840.sh @@ -3,7 +3,7 @@ export FLAGS="$FLAGS -DWiz5500" export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short) export FLAGS="$FLAGS -DDMX_DISABLE" export FLAGS="$FLAGS -DMODBUS_DISABLE" -export FLAGS="$FLAGS -DOWIRE_DISABLE" +#export FLAGS="$FLAGS -DOWIRE_DISABLE" export FLAGS="$FLAGS -std=gnu++11" export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE" export FLAGS="$FLAGS -DCOUNTER_DISABLE" diff --git a/lighthub/inputs.cpp b/lighthub/inputs.cpp index 3304044..ebfd794 100644 --- a/lighthub/inputs.cpp +++ b/lighthub/inputs.cpp @@ -26,7 +26,6 @@ e-mail anklimov@gmail.com #ifndef DHT_DISABLE #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) #include - #else #include "DHT.h" #endif diff --git a/lighthub/main.cpp b/lighthub/main.cpp index a3e5b7a..e720103 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -86,13 +86,13 @@ WiFiClient ethClient; NRFFlashStorage EEPROM; #endif -#ifdef ARDUINO_ARCH_STM32F1 +#ifdef ARDUINO_ARCH_STM32 #include "HttpClient.h" //#include -//#include "UIPEthernet.h" +#include "UIPEthernet.h" //#include "UIPUdp.h" //#include -#include +//#include #include "Dns.h" //#include "utility/logging.h" diff --git a/lighthub/main.h b/lighthub/main.h index 29090a3..f5a6fc6 100644 --- a/lighthub/main.h +++ b/lighthub/main.h @@ -79,6 +79,12 @@ #define wdt_dis() #endif +#if defined(ARDUINO_ARCH_STM32) +#define wdt_res() +#define wdt_en() +#define wdt_dis() +#endif + //#if defined(ESP8266) //#define wdt_res() //#define wdt_en() diff --git a/lighthub/options.h b/lighthub/options.h index a7c5a0e..65d3084 100644 --- a/lighthub/options.h +++ b/lighthub/options.h @@ -138,6 +138,13 @@ #define dmxin DmxDue1 #endif +#if defined(NRF5) +//#define modbusSerial Serial1 +#undef _dmxin +#undef _dmxout +#undef _modbus +#endif + #if defined(ARDUINO_ARCH_ESP8266) #undef _dmxin #undef _modbus diff --git a/lighthub/utils.cpp b/lighthub/utils.cpp index 1b94fc7..1031ed8 100644 --- a/lighthub/utils.cpp +++ b/lighthub/utils.cpp @@ -22,7 +22,7 @@ e-mail anklimov@gmail.com #include "options.h" #include "stdarg.h" -#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32F1) +#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32) #include #endif @@ -103,7 +103,7 @@ unsigned long freeRam () } #endif -#if defined(ARDUINO_ARCH_STM32F1) +#if defined(ARDUINO_ARCH_STM32) extern char _end; extern "C" char *sbrk(int i); diff --git a/platformio.ini b/platformio.ini index 0ccda53..6bb34d8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; http://docs.platformio.org/page/projectconf.html [platformio] src_dir = lighthub -env_default = esp8266 +;env_default = esp8266 ;monitor_speed = 115200 ; megaatmega2560 ; megaatmega2560-net @@ -47,11 +47,12 @@ lib_ignore = ESPDMX DueFlashStorage PrintEx - DHT sensor library + ;DHT sensor library DHT sensor library for ESPx - Adafruit Unified Sensor + ;Adafruit Unified Sensor WebServer -; Adafruit_Sensor + UIPEthernet + ;Adafruit_Sensor lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire @@ -63,9 +64,9 @@ lib_deps = https://github.com/knolleary/pubsubclient.git ; https://github.com/anklimov/Artnet.git ; FastLED -; Adafruit Unified Sensor + Adafruit Unified Sensor ; DHT sensor library for ESPx -; DHT sensor library + DHT sensor library Streaming https://github.com/anklimov/NRFFlashStorage ; https://github.com/livello/PrintEx#is-select-redecl @@ -107,6 +108,7 @@ lib_ignore = DHT sensor library for ESPx DHT sensor library Wire + UIPEthernet ;WifiManager ;HTTPClient ;HttpClient @@ -134,6 +136,7 @@ lib_ignore = Ethernet3 NRFFlashStorage WebServer + UIPEthernet lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/anklimov/Arduino-Temperature-Control-Library.git @@ -170,6 +173,7 @@ lib_ignore = HTTPClient NRFFlashStorage WebServer + UIPEthernet lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire @@ -208,6 +212,7 @@ lib_ignore = Ethernet2 Ethernet NRFFlashStorage + UIPEthernet lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire @@ -242,6 +247,7 @@ lib_ignore = Ethernet2 NRFFlashStorage WebServer + UIPEthernet lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire @@ -278,7 +284,7 @@ lib_ignore = Ethernet3 NRFFlashStorage WebServer - + UIPEthernet lib_deps = https://github.com/sebnil/DueFlashStorage https://github.com/anklimov/Arduino-Temperature-Control-Library.git @@ -315,6 +321,7 @@ lib_ignore = Ethernet2 NRFFlashStorage WebServer + UIPEthernet lib_deps = https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/DS2482_OneWire @@ -361,7 +368,6 @@ lib_ignore = NRFFlashStorage WebServer - lib_deps = ; DallasTemperature https://github.com/anklimov/aJson @@ -371,3 +377,5 @@ lib_deps = Adafruit Unified Sensor DHT sensor library Streaming + UIPEthernet + EEPROM