STM32 fix&slim, Wifi manager ESP32, compiled binaries updated for all platforms

This commit is contained in:
2019-03-23 22:26:58 +03:00
parent 6fa661690b
commit 8b9584f975
22 changed files with 15977 additions and 7258 deletions

View File

@@ -51,7 +51,7 @@ static volatile long counter_value[6];
static volatile long counter_value[6];
#endif
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32F1)
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32)
static short counter_irq_map[54];
static long counter_value[54];
static int counters_count;
@@ -343,12 +343,15 @@ void Input::dht22Poll() {
void Input::contactPoll() {
boolean currentInputState;
#if defined(ARDUINO_ARCH_STM32F1)
/*
#if defined(ARDUINO_ARCH_STM32)
WiringPinMode inputPinMode;
#endif
#if defined(__SAM3X8E__)||defined(ARDUINO_ARCH_AVR)||defined(ARDUINO_ARCH_ESP8266)||defined(ARDUINO_ARCH_ESP32)
#endif
*/
uint32_t inputPinMode;
uint8_t inputOnLevel;
if (inType & IN_ACTIVE_HIGH) {
@@ -387,12 +390,14 @@ void Input::analogPoll() {
short Noize = ANALOG_NOIZE;
short simple = 0;
#if defined(ARDUINO_ARCH_STM32F1)
/*
#if defined(ARDUINO_ARCH_STM32)
WiringPinMode inputPinMode;
#endif
#if defined(__SAM3X8E__)||defined(ARDUINO_ARCH_AVR)||defined(ARDUINO_ARCH_ESP8266)||defined(ARDUINO_ARCH_ESP32)
#endif
#endif */
uint32_t inputPinMode;
if (inType & IN_ACTIVE_HIGH) {
inputPinMode = INPUT;

View File

@@ -277,7 +277,7 @@ if (isSet)
case -1: //Not known command
case -2: //JSON input (not implemented yet
break;
#if not defined(ARDUINO_ARCH_ESP32) and not defined(ESP8266) and not defined(ARDUINO_ARCH_STM32F1) and not defined(DMX_DISABLE)
#if not defined(ARDUINO_ARCH_ESP32) and not defined(ESP8266) and not defined(ARDUINO_ARCH_STM32) and not defined(DMX_DISABLE)
case -3: //RGB color in #RRGGBB notation
{
CRGB rgb;

View File

@@ -88,6 +88,7 @@ NRFFlashStorage EEPROM;
#ifdef ARDUINO_ARCH_STM32
EthernetClient ethClient;
NRFFlashStorage EEPROM;
#endif
#ifdef NRF5
@@ -618,7 +619,7 @@ void onInitialStateInitLAN() {
}
#endif
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1)
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32)
#ifdef W5500_CS_PIN
Ethernet.w5500_cspin = W5500_CS_PIN;
debugSerial<<F("Use W5500 pin: ");
@@ -652,7 +653,7 @@ void onInitialStateInitLAN() {
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__)
res = Ethernet.begin(mac, 12000);
#endif
#if defined(ARDUINO_ARCH_STM32F1)
#if defined(ARDUINO_ARCH_STM32)
res = Ethernet.begin(mac);
#endif
wdt_en();
@@ -678,9 +679,10 @@ void onInitialStateInitLAN() {
#endif
}
#ifdef ARDUINO_ARCH_STM32F1
#ifdef ARDUINO_ARCH_STM32
void softRebootFunc() {
nvic_sys_reset();
//nvic_sys_reset();
Serial.println("not implemented");
}
#endif
@@ -1162,7 +1164,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
return READ_RE_CONFIG;//-11;
}
#endif
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_ESP32)
#if defined(__SAM3X8E__) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ESP32)
#if defined(ARDUINO_ARCH_ESP32)
WiFiClient configEthClient;
#else
@@ -1301,7 +1303,7 @@ void setup_main() {
ArtnetSetup();
#endif
#if defined(ARDUINO_ARCH_ESP8266) and not defined(WIFI_MANAGER_DISABLE)
#if (defined(ARDUINO_ARCH_ESP8266) or defined(ARDUINO_ARCH_ESP32)) and not defined(WIFI_MANAGER_DISABLE)
WiFiManager wifiManager;
#if defined(ESP_WIFI_AP) and defined(ESP_WIFI_PWD)
wifiManager.autoConnect(QUOTE(ESP_WIFI_AP), QUOTE(ESP_WIFI_PWD));

View File

@@ -48,7 +48,8 @@
#ifdef ARDUINO_ARCH_STM32
#include "HttpClient.h"
#include "UIPEthernet.h"
#include <EEPROM.h>
#include <NRFFlashStorage.h>
//#include <EEPROM.h>
#endif
#if defined(__SAM3X8E__)