Commit f510d621 authored by Eric Duminil's avatar Eric Duminil
Browse files

util does not depend on wifi_util anymore

parent 8b7f81e4
......@@ -2,7 +2,6 @@
#define AMPEL_UTIL_H_INCLUDED
#include <Arduino.h>
#include "config.h"
#include "wifi_util.h" // To get MAC
#ifdef AMPEL_CSV
# include "csv_writer.h" // To close filesystem before reset
#endif
......@@ -12,9 +11,11 @@
#if defined(ESP8266)
# define BOARD "ESP8266"
# include <ESP8266WiFi.h>
# define get_free_heap_size() system_get_free_heap_size()
#elif defined(ESP32)
# define BOARD "ESP32"
# include <WiFi.h>
# define get_free_heap_size() esp_get_free_heap_size()
#else
# define BOARD "Unknown"
......
......@@ -16,7 +16,7 @@ namespace config {
void WiFiConnect(const String &hostname) {
//NOTE: WiFi Multi could allow multiple SSID and passwords.
WiFi.persistent(false); // Don't write user & password to Flash.
WiFi.mode(WIFI_STA); // Set ESP8266 to be a WiFi-client only
WiFi.mode(WIFI_STA); // Set ESP to be a WiFi-client only
#if defined(ESP8266)
WiFi.hostname(hostname);
#elif defined(ESP32)
......
#ifndef WIFI_UTIL_H_INCLUDED
# define WIFI_UTIL_H_INCLUDED
# if defined(ESP8266)
# include <ESP8266WiFi.h>
# elif defined(ESP32)
# include <WiFi.h>
# endif
#define WIFI_UTIL_H_INCLUDED
#include "led_effects.h"
#include "config.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment