File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 12821282#undef MY_INCLUSION_BUTTON_FEATURE
12831283#endif
12841284
1285+ /**
1286+ * @def MY_INCLUSION_LED_PIN
1287+ * @brief Enables an inclusion mode LED indicator on the gateway device.
1288+ *
1289+ * With this defined, inclusion mode status (on or off) is indicated by the LED.
1290+ * This feature obeys @ref MY_WITH_LEDS_BLINKING_INVERSE
1291+ */
1292+ //#define MY_INCLUSION_LED_PIN (7)
1293+
12851294/**
12861295 * @def MY_INCLUSION_MODE_BUTTON_PIN
12871296 * @brief The default input pin used for the inclusion mode button.
19271936// GW
19281937#define MY_DEBUG_VERBOSE_GATEWAY
19291938#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
1939+ #define MY_INCLUSION_LED_PIN
19301940#define MY_GATEWAY_W5100
19311941#define MY_GATEWAY_ENC28J60
19321942#define MY_GATEWAY_ESP8266
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ inline void inclusionInit()
3333 hwPinMode (MY_INCLUSION_MODE_BUTTON_PIN, INPUT);
3434 hwDigitalWrite (MY_INCLUSION_MODE_BUTTON_PIN, HIGH);
3535#endif
36+ #if defined (MY_INCLUSION_LED_PIN)
37+ // Setup LED pin that indicates inclusion mode
38+ hwPinMode (MY_INCLUSION_LED_PIN, OUTPUT);
39+ hwDigitalWrite (MY_INCLUSION_LED_PIN, LED_OFF);
40+ #endif
3641
3742}
3843
@@ -47,6 +52,9 @@ void inclusionModeSet(bool newMode)
4752 _inclusionStartTime = hwMillis ();
4853 }
4954 }
55+ #if defined (MY_INCLUSION_LED_PIN)
56+ hwDigitalWrite (MY_INCLUSION_LED_PIN, _inclusionMode ? LED_ON : LED_OFF);
57+ #endif
5058}
5159
5260inline void inclusionProcess ()
You can’t perform that action at this time.
0 commit comments