8000 Merge pull request #621 from tannewt/tweak_itsybitsy_status_brightness · ladyada/circuitpython@ee90056 · GitHub
[go: up one dir, main page]

Skip to content

Commit ee90056

Browse files
authored
Merge pull request adafruit#621 from tannewt/tweak_itsybitsy_status_brightness
Increase the status LED brightness a bit so that newer DotStars
2 parents 59ad16b + 06c9445 commit ee90056

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

atmel-samd/rgb_led_colors.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#define BLACK 0x000000
2-
#define GREEN 0x001000
3-
#define BLUE 0x000010
4-
#define CYAN 0x001010
5-
#define RED 0x100000
6-
#define ORANGE 0x100800
7-
#define YELLOW 0x101000
8-
#define PURPLE 0x100010
9-
#define WHITE 0x101010
2+
#define GREEN 0x003000
3+
#define BLUE 0x000030
4+
#define CYAN 0x003030
5+
#define RED 0x300000
6+
#define ORANGE 0x302000
7+
#define YELLOW 0x303000
8+
#define PURPLE 0x300030
9+
#define WHITE 0x303030
1010

1111
#define BOOT_RUNNING BLUE
1212
#define MAIN_RUNNING GREEN

atmel-samd/rgb_led_status.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
#include "rgb_led_status.h"
1313
#include "samd21_pins.h"
1414

15-
uint8_t rgb_status_brightness = 255;
1615
#ifdef MICROPY_HW_NEOPIXEL
16+
uint8_t rgb_status_brightness = 63;
1717
static uint8_t status_neopixel_color[3];
1818
static digitalio_digitalinout_obj_t status_neopixel;
1919
#endif
2020

2121

2222
#if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
23+
uint8_t rgb_status_brightness = 255;
2324
static uint8_t status_apa102_color[12] = {0, 0, 0, 0, 0xff, 0, 0, 0};
2425
#ifdef CIRCUITPY_BITBANG_APA102
2526
static bitbangio_spi_obj_t status_apa102;
@@ -174,5 +175,7 @@ uint32_t color_brightness(uint32_t color, uint8_t brightness) {
174175
}
175176

176177
void set_rgb_status_brightness(uint8_t level){
177-
rgb_status_brightness = level;
178+
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
179+
rgb_status_brightness = level;
180+
#endif
178181
}

0 commit comments

Comments
 (0)
0