mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
50a9e08d1f
now just 2 places where config is included... 1) in defines.h 2) At the start of the .ino so it can be made obvious to the user what is happening.
72 lines
2.1 KiB
C
72 lines
2.1 KiB
C
/*
|
|
© 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/>.
|
|
|
|
*/
|
|
|
|
#ifndef DEFINES_H
|
|
#define DEFINES_H
|
|
|
|
// defines.h relies on macros defined in config.h
|
|
// but it may have already been included (for cosmetic convenence) by the .ino
|
|
#ifndef MOTOR_SHIELD_TYPE
|
|
#if __has_include ( "config.h")
|
|
#include "config.h"
|
|
#else
|
|
#include "config.example.h"
|
|
#endif
|
|
#endif
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// WIFI_ON: All prereqs for running with WIFI are met
|
|
// Note: WIFI_CHANNEL may not exist in early config.h files so is added here if needed.
|
|
|
|
#if (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_SAMD_ZERO) || defined(TEENSYDUINO))
|
|
#define BIG_RAM
|
|
#endif
|
|
#if ENABLE_WIFI && defined(BIG_RAM)
|
|
#define WIFI_ON true
|
|
#ifndef WIFI_CHANNEL
|
|
#define WIFI_CHANNEL 1
|
|
#endif
|
|
#else
|
|
#define WIFI_ON false
|
|
#endif
|
|
|
|
#if ENABLE_ETHERNET && defined(BIG_RAM)
|
|
#define ETHERNET_ON true
|
|
#else
|
|
#define ETHERNET_ON false
|
|
#endif
|
|
|
|
#if WIFI_ON && ETHERNET_ON
|
|
#error Command Station does not support WIFI and ETHERNET at the same time.
|
|
#endif
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// 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
|
|
|
|
#if __has_include ( "myAutomation.h") && defined(BIG_RAM)
|
|
#define RMFT_ACTIVE
|
|
#endif
|
|
|
|
#endif |