mirror of
https://github.com/sanni/cartreader.git
synced 2025-03-12 22:36:36 +01:00
Add more sanity checks to OSCR.h
This commit is contained in:
parent
3ccab84048
commit
61c17b2c80
@ -15,10 +15,16 @@
|
||||
#include "Config.h"
|
||||
|
||||
/*==== SANITY CHECKS ==============================================*/
|
||||
// Error if no hardware version is enabled
|
||||
# if !(defined(HW1) || defined(HW2) || defined(HW3) || defined(HW4) || defined(HW5) || defined(SERIAL_MONITOR))
|
||||
# error !!! PLEASE CHOOSE HARDWARE VERSION IN CONFIG.H !!!
|
||||
# endif
|
||||
|
||||
// Error if more than one hardware version is enabled
|
||||
# if (defined(HW1) + defined(HW2) + defined(HW3) + defined(HW4) + defined(HW5) + defined(SERIAL_MONITOR)) > 1
|
||||
# error !!! PLEASE CHOOSE ONLY ONE HARDWARE VERSION IN CONFIG.H !!!
|
||||
# endif
|
||||
|
||||
// Let user know unsafe configs are allowed
|
||||
# if defined(ALLOW_UNSAFE_CONFIG)
|
||||
// Error if defined during GitHub CI tests. This should not happen unless someone accidentally committed their Config.h
|
||||
@ -67,6 +73,26 @@
|
||||
|
||||
# endif /* ENABLE_VSELECT */
|
||||
|
||||
// ENABLE_SERIAL && ENABLE_3V3FIX are incompatible options
|
||||
# if defined(ENABLE_SERIAL) && defined(ENABLE_3V3FIX)
|
||||
# if defined(ALLOW_UNSAFE_CONFIG)
|
||||
# warning Using a configuration with ENABLE_SERIAL and ENABLE_3V3FIX is incompatible.
|
||||
# else /* !defined(ALLOW_UNSAFE_CONFIG) */
|
||||
# error Using a configuration with ENABLE_SERIAL and ENABLE_3V3FIX is incompatible. \
|
||||
If you are a developer trying to make this work you can define ALLOW_UNSAFE_CONFIG in Config.h to allow compiling.
|
||||
# endif /* ALLOW_UNSAFE_CONFIG */
|
||||
# endif /* ENABLE_SERIAL && ENABLE_3V3FIX */
|
||||
|
||||
// ENABLE_SERIAL && ENABLE_UPDATER are incompatible options
|
||||
# if defined(ENABLE_SERIAL) && defined(ENABLE_UPDATER)
|
||||
# if defined(ALLOW_UNSAFE_CONFIG)
|
||||
# warning Using a configuration with ENABLE_SERIAL and ENABLE_UPDATER is incompatible.
|
||||
# else /* !defined(ALLOW_UNSAFE_CONFIG) */
|
||||
# error Using a configuration with ENABLE_SERIAL and ENABLE_UPDATER is incompatible. \
|
||||
If you are a developer trying to make this work you can define ALLOW_UNSAFE_CONFIG in Config.h to allow compiling.
|
||||
# endif /* ALLOW_UNSAFE_CONFIG */
|
||||
# endif /* ENABLE_SERIAL && ENABLE_UPDATER */
|
||||
|
||||
/*==== CONSTANTS ==================================================*/
|
||||
/**
|
||||
* String Constants
|
||||
|
Loading…
x
Reference in New Issue
Block a user