/* LIGHT MODULE */ #pragma once #include "espurna.h" constexpr const unsigned char _lightEnablePin() { return LIGHT_ENABLE_PIN; } constexpr const unsigned char _lightChannelPin(unsigned char index) { return ( (index == 0) ? LIGHT_CH1_PIN : (index == 1) ? LIGHT_CH2_PIN : (index == 2) ? LIGHT_CH3_PIN : (index == 3) ? LIGHT_CH4_PIN : (index == 4) ? LIGHT_CH5_PIN : GPIO_NONE ); } constexpr const bool _lightInverse(unsigned char index) { return ( (index == 0) ? (1 == LIGHT_CH1_INVERSE) : (index == 1) ? (1 == LIGHT_CH2_INVERSE) : (index == 2) ? (1 == LIGHT_CH3_INVERSE) : (index == 3) ? (1 == LIGHT_CH4_INVERSE) : (index == 4) ? (1 == LIGHT_CH5_INVERSE) : false ); }