diff options
Diffstat (limited to 'supervisor/shared/rgb_led_status.c')
| -rw-r--r-- | supervisor/shared/rgb_led_status.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/supervisor/shared/rgb_led_status.c b/supervisor/shared/rgb_led_status.c index 4ea090042..2899c1f5d 100644 --- a/supervisor/shared/rgb_led_status.c +++ b/supervisor/shared/rgb_led_status.c @@ -29,8 +29,8 @@ #include "rgb_led_status.h" #include "pins.h" -uint8_t rgb_status_brightness = 255; #ifdef MICROPY_HW_NEOPIXEL +uint8_t rgb_status_brightness = 63; #include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/neopixel_write/__init__.h" static uint8_t status_neopixel_color[3]; @@ -39,7 +39,7 @@ static digitalio_digitalinout_obj_t status_neopixel; #if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) - +uint8_t rgb_status_brightness = 255; static uint8_t status_apa102_color[12] = {0, 0, 0, 0, 0xff, 0, 0, 0}; #ifdef CIRCUITPY_BITBANG_APA102 #include "shared-bindings/bitbangio/SPI.h" @@ -196,7 +196,9 @@ uint32_t color_brightness(uint32_t color, uint8_t brightness) { } void set_rgb_status_brightness(uint8_t level){ - rgb_status_brightness = level; + #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) + rgb_status_brightness = level; + #endif } void prep_rgb_status_animation(const pyexec_result_t* result, |
