32static_assert((PRIORITY_ROTATION ==
RotationModes::PIN) ^ (
rotationPin == 0xff),
"******** Wrong pin value for rotation command. Please check your config.h ! ********");
33static_assert(
OVERRIDE_PIN_PRESENT ^ (
forcePin == 0xff),
"******** Wrong pin value for override command. Please check your config.h ! ********");
36static_assert(
DUAL_TARIFF ^ (
dualTariffPin == 0xff),
"******** Wrong pin value for dual tariff. Please check your config.h ! ********");
38static_assert(!(
DUAL_TARIFF & (
ul_OFF_PEAK_DURATION > 12)),
"******** Off-peak duration cannot last more than 12 hours. Please check your config.h ! ********");
44static_assert(
NO_OF_DUMPLOADS > 0,
"Number of dump loads must be greater than 0");
51 uint32_t used_pins{ 0 };
105 for (uint8_t idx = 0; idx <
relays.get_size(); ++idx)
107 const auto relayPin =
relays.get_relay(idx).get_pin();
109 if (relayPin != 0xff)
171 bool pins_ok{
true };
173 for (uint8_t idx = 0; idx <
relays.get_size(); ++idx)
175 const auto relayPin =
relays.get_relay(idx).get_pin();
179 pins_ok &= (relayPin != 0xff);
183 pins_ok &= (relayPin == 0xff);
193 uint16_t _enum_val{ 0 };
210static_assert(
check_load_priorities(),
"******** Load Priorities wrong ! Please check your config ! ********");
211static_assert(
check_pins(),
"******** Duplicate pin definition ! Please check your config ! ********");
212static_assert((
check_pins() & B00000011) == 0,
"******** Pins 0 & 1 are reserved for RX/TX ! Please check your config ! ********");
215static_assert(
check_relay_pins(),
"******** Wrong pin(s) configuration for relay(s) ********");
Configuration values to be set by the end-user.
constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS]
constexpr bool RELAY_DIVERSION
constexpr bool OVERRIDE_PIN_PRESENT
constexpr uint8_t dualTariffPin
constexpr TemperatureSensing temperatureSensing
constexpr uint8_t forcePin
constexpr RelayEngine relays
constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]
constexpr bool DUAL_TARIFF
constexpr uint8_t diversionPin
constexpr bool EMONESP_CONTROL
constexpr uint8_t NO_OF_DUMPLOADS
constexpr DisplayType TYPE_OF_DISPLAY
constexpr uint8_t ul_OFF_PEAK_DURATION
constexpr bool TEMP_SENSOR_PRESENT
constexpr int16_t iTemperatureThreshold
constexpr bool WATCHDOG_PIN_PRESENT
constexpr bool DIVERSION_PIN_PRESENT
constexpr uint8_t rotationPin
constexpr uint8_t watchDogPin
Basic configuration values to be set by the end-user.
constexpr uint8_t DATALOG_PERIOD_IN_SECONDS
constexpr uint8_t digitLocationLine[noOfDigitLocationLines]
constexpr uint8_t digitSelectionLine[noOfDigitSelectionLines]
constexpr uint8_t digitSelectorPin[noOfDigitLocations]
constexpr uint8_t segmentDrivePin[noOfSegmentsPerDigit]
Some utility functions for pins manipulation.
constexpr void bit_set(T &_dest, const uint8_t bit)
Set the specified bit to 1.
constexpr uint8_t bit_read(const T &_src, const uint8_t bit)
Read the specified bit.
constexpr uint16_t check_pins()
constexpr uint16_t check_relay_pins()
constexpr bool check_load_priorities()