2020-09-25 22:14:20 +02:00
|
|
|
/*
|
|
|
|
© 2020, Harald Barth.
|
|
|
|
|
|
|
|
This file is part of CommandStation-EX
|
|
|
|
|
|
|
|
This is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
It is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// WIFI_ON: All prereqs for running with WIFI are met
|
2021-02-14 14:09:36 +01:00
|
|
|
// Note: WIFI_CHANNEL may not exist in early config.h files so is added here if needed.
|
2020-10-04 17:31:24 +02:00
|
|
|
|
2021-01-28 19:27:55 +01:00
|
|
|
#if ENABLE_WIFI && (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_AVR_UNO_WIFI_REV2))
|
2020-10-04 17:29:48 +02:00
|
|
|
#define WIFI_ON true
|
2021-02-14 14:09:36 +01:00
|
|
|
#ifndef WIFI_CHANNEL
|
|
|
|
#define WIFI_CHANNEL 1
|
|
|
|
#endif
|
2020-10-04 17:29:48 +02:00
|
|
|
#else
|
|
|
|
#define WIFI_ON false
|
2020-09-25 22:14:20 +02:00
|
|
|
#endif
|
|
|
|
|
2020-10-30 14:00:02 +01:00
|
|
|
#if ENABLE_ETHERNET && (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_SAMD_ZERO))
|
|
|
|
#define ETHERNET_ON true
|
|
|
|
#else
|
|
|
|
#define ETHERNET_ON false
|
|
|
|
#endif
|
|
|
|
|
2020-09-25 22:14:20 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// This defines the speed at which the Arduino will communicate with the ESP8266 module.
|
|
|
|
// Currently only devices which can communicate at 115200 are supported.
|
|
|
|
//
|
|
|
|
#define WIFI_SERIAL_LINK_SPEED 115200
|