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 1282
1282
#undef MY_INCLUSION_BUTTON_FEATURE
1283
1283
#endif
1284
1284
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
+
1285
1294
/**
1286
1295
* @def MY_INCLUSION_MODE_BUTTON_PIN
1287
1296
* @brief The default input pin used for the inclusion mode button.
1927
1936
// GW
1928
1937
#define MY_DEBUG_VERBOSE_GATEWAY
1929
1938
#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
1939
+ #define MY_INCLUSION_LED_PIN
1930
1940
#define MY_GATEWAY_W5100
1931
1941
#define MY_GATEWAY_ENC28J60
1932
1942
#define MY_GATEWAY_ESP8266
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ inline void inclusionInit()
33
33
hwPinMode (MY_INCLUSION_MODE_BUTTON_PIN, INPUT);
34
34
hwDigitalWrite (MY_INCLUSION_MODE_BUTTON_PIN, HIGH);
35
35
#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
36
41
37
42
}
38
43
@@ -47,6 +52,9 @@ void inclusionModeSet(bool newMode)
47
52
_inclusionStartTime = hwMillis ();
48
53
}
49
54
}
55
+ #if defined (MY_INCLUSION_LED_PIN)
56
+ hwDigitalWrite (MY_INCLUSION_LED_PIN, _inclusionMode ? LED_ON : LED_OFF);
57
+ #endif
50
58
}
51
59
52
60
inline void inclusionProcess ()
You can’t perform that action at this time.
0 commit comments