1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00

defines.h - cosmetic change to indenting.

Lay out long #if statement with indents to make it a bit easier to read.
This commit is contained in:
Neil McKechnie 2023-02-21 11:12:31 +00:00
parent 8e90bb6996
commit c2e8557c4c

184
defines.h
View File

@ -47,115 +47,115 @@
#define I2C_EXTENDED_ADDRESS #define I2C_EXTENDED_ADDRESS
#if defined(ARDUINO_AVR_UNO) #if defined(ARDUINO_AVR_UNO)
#define ARDUINO_TYPE "UNO" #define ARDUINO_TYPE "UNO"
#undef HAS_ENOUGH_MEMORY #undef HAS_ENOUGH_MEMORY
#define NO_EXTENDED_CHARACTERS #define NO_EXTENDED_CHARACTERS
#undef I2C_EXTENDED_ADDRESS #undef I2C_EXTENDED_ADDRESS
#elif defined(ARDUINO_AVR_NANO) #elif defined(ARDUINO_AVR_NANO)
#define ARDUINO_TYPE "NANO" #define ARDUINO_TYPE "NANO"
#undef HAS_ENOUGH_MEMORY #undef HAS_ENOUGH_MEMORY
#define NO_EXTENDED_CHARACTERS #define NO_EXTENDED_CHARACTERS
#undef I2C_EXTENDED_ADDRESS #undef I2C_EXTENDED_ADDRESS
#elif defined(ARDUINO_AVR_MEGA) #elif defined(ARDUINO_AVR_MEGA)
#define ARDUINO_TYPE "MEGA" #define ARDUINO_TYPE "MEGA"
#elif defined(ARDUINO_AVR_MEGA2560) #elif defined(ARDUINO_AVR_MEGA2560)
#define ARDUINO_TYPE "MEGA" #define ARDUINO_TYPE "MEGA"
#elif defined(ARDUINO_ARCH_MEGAAVR) #elif defined(ARDUINO_ARCH_MEGAAVR)
#define ARDUINO_TYPE "MEGAAVR" #define ARDUINO_TYPE "MEGAAVR"
#undef HAS_ENOUGH_MEMORY #undef HAS_ENOUGH_MEMORY
#define NO_EXTENDED_CHARACTERS #define NO_EXTENDED_CHARACTERS
#undef I2C_EXTENDED_ADDRESS #undef I2C_EXTENDED_ADDRESS
#elif defined(ARDUINO_TEENSY31) #elif defined(ARDUINO_TEENSY31)
#define ARDUINO_TYPE "TEENSY3132" #define ARDUINO_TYPE "TEENSY3132"
#undef USB_SERIAL #undef USB_SERIAL
#define USB_SERIAL SerialUSB #define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM #ifndef DISABLE_EEPROM
#define DISABLE_EEPROM #define DISABLE_EEPROM
#endif #endif
// Teensy support for native I2C is awaiting development // Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE #ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY35)
#define ARDUINO_TYPE "TEENSY35"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
// Teensy support for I2C is awaiting development
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY36)
#define ARDUINO_TYPE "TEENSY36"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY40)
#define ARDUINO_TYPE "TEENSY40"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY41)
#define ARDUINO_TYPE "TEENSY41"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE #define I2C_USE_WIRE
#endif #endif
#elif defined(ARDUINO_TEENSY35)
#define ARDUINO_TYPE "TEENSY35"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
// Teensy support for I2C is awaiting development
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY36)
#define ARDUINO_TYPE "TEENSY36"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY40)
#define ARDUINO_TYPE "TEENSY40"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_TEENSY41)
#define ARDUINO_TYPE "TEENSY41"
#undef USB_SERIAL
#define USB_SERIAL SerialUSB
#ifndef DISABLE_EEPROM
#define DISABLE_EEPROM
#endif
// Teensy support for native I2C is awaiting development
#ifndef I2C_USE_WIRE
#define I2C_USE_WIRE
#endif
#elif defined(ARDUINO_ARCH_ESP8266) #elif defined(ARDUINO_ARCH_ESP8266)
#define ARDUINO_TYPE "ESP8266" #define ARDUINO_TYPE "ESP8266"
#warning "ESP8266 platform untested, you are on your own" #warning "ESP8266 platform untested, you are on your own"
#elif defined(ARDUINO_ARCH_ESP32) #elif defined(ARDUINO_ARCH_ESP32)
#define ARDUINO_TYPE "ESP32" #define ARDUINO_TYPE "ESP32"
#ifndef DISABLE_EEPROM #ifndef DISABLE_EEPROM
#define DISABLE_EEPROM #define DISABLE_EEPROM
#endif #endif
#elif defined(ARDUINO_ARCH_SAMD) #elif defined(ARDUINO_ARCH_SAMD)
#define ARDUINO_TYPE "SAMD21" #define ARDUINO_TYPE "SAMD21"
#undef USB_SERIAL #undef USB_SERIAL
#define USB_SERIAL SerialUSB #define USB_SERIAL SerialUSB
// SAMD no EEPROM by default // SAMD no EEPROM by default
#ifndef DISABLE_EEPROM #ifndef DISABLE_EEPROM
#define DISABLE_EEPROM #define DISABLE_EEPROM
#endif #endif
#elif defined(ARDUINO_ARCH_STM32) #elif defined(ARDUINO_ARCH_STM32)
#define ARDUINO_TYPE "STM32" #define ARDUINO_TYPE "STM32"
// STM32 no EEPROM by default // STM32 no EEPROM by default
#ifndef DISABLE_EEPROM #ifndef DISABLE_EEPROM
#define DISABLE_EEPROM #define DISABLE_EEPROM
#endif #endif
// STM32 support for native I2C is awaiting development // STM32 support for native I2C is awaiting development
#ifndef I2C_USE_WIRE #ifndef I2C_USE_WIRE
#define I2C_USE_WIRE #define I2C_USE_WIRE
#endif #endif
/* TODO when ready /* TODO when ready
#elif defined(ARDUINO_ARCH_RP2040) #elif defined(ARDUINO_ARCH_RP2040)
#define ARDUINO_TYPE "RP2040" #define ARDUINO_TYPE "RP2040"
*/ */
#else #else
#define CPU_TYPE_ERROR #define CPU_TYPE_ERROR
#endif #endif
// replace board type if provided by compiler // replace board type if provided by compiler