You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define PICO_STATUS_LED_ONLY_USING_WS2812 to make pico_status_led_set
use the ws2812 color led. This will beforced off if
PICO_DEFAULT_WS2812_PIN is not defined. It will default to true only
if neither PICO_DEFAULT_LED_PIN or CYW43_WL_GPIO_LED_PIN are defined.
PICO_STATUS_LED_WS2812_ON and PICO_STATUS_LED_WS2812_OFF can be used
to configure the on and off color led picel values.
Copy file name to clipboardExpand all lines: src/rp2_common/pico_status_led/include/pico/status_led.h
+69-37Lines changed: 69 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,39 @@ struct async_context;
28
28
extern"C" {
29
29
#endif
30
30
31
-
// PICO_CONFIG: PICO_STATUS_LED_WS2812_WRGB, Inidicate if the colored status led supports WRGB, type=bool, default=false group=pico_status_led
31
+
// PICO_CONFIG: PICO_STATUS_LED_WS2812_WRGB, Indicate if the colored status led supports WRGB, type=bool, default=false group=pico_status_led
32
32
#ifndefPICO_STATUS_LED_WS2812_WRGB
33
33
#definePICO_STATUS_LED_WS2812_WRGB 0
34
34
#endif
35
35
36
+
// PICO_CONFIG: PICO_STATUS_LED_ONLY_USING_WS2812, Indicate if only the colored status led should be used. Only true by default if a WS2812 pin is defined and no led pin is defined, type=bool group=pico_status_led
37
+
#ifdefPICO_DEFAULT_WS2812_PIN
38
+
#ifndefPICO_STATUS_LED_ONLY_USING_WS2812
39
+
#definePICO_STATUS_LED_ONLY_USING_WS2812 !(defined PICO_DEFAULT_LED_PIN || defined CYW43_WL_GPIO_LED_PIN)
40
+
#endif
41
+
#else
42
+
#undef PICO_STATUS_LED_ONLY_USING_WS2812
43
+
#definePICO_STATUS_LED_ONLY_USING_WS2812 0
44
+
#endif
45
+
46
+
// PICO_CONFIG: PICO_STATUS_LED_WS2812_ON, pixel color value of WS2812 led when status led is on. Only used when PICO_STATUS_LED_ONLY_USING_WS2812 is true , type=int group=pico_status_led
// PICO_CONFIG: PICO_STATUS_LED_WS2812_OFF, pixel color value of WS2812 led when status led is off. Only used when PICO_STATUS_LED_ONLY_USING_WS2812 is true , type=int group=pico_status_led
0 commit comments