Closed jamesadevine closed 3 years ago
This PR adds support for AP102 LEDs.
The board I tested this on had no LEDs, so this PR also adds a macro for conditional compilation of PWM led code too.
I tested the following configuration in board.h:
board.h
#define LEDS_NUMBER 0 #define LED_APA102 #define LED_APA102_CLK _PINNUM(0, 21) #define LED_APA102_DATA _PINNUM(0, 19) #define LED_APA102_BRIGHTNESS 0x8 #define BOARD_RGB_BRIGHTNESS 0xffffffff #define APA102_NUMBER 15
BOARD_RGB_BRIGHTNESS is set to max unit32_t so that colour information is not masked off. LED brightness is controlled per pixel on APA102s and relies upon the new macro LED_APA102_BRIGHTNESS which can be set to a maximum value of 0x1f.
BOARD_RGB_BRIGHTNESS
LED_APA102_BRIGHTNESS
0x1f
This PR adds support for AP102 LEDs.
The board I tested this on had no LEDs, so this PR also adds a macro for conditional compilation of PWM led code too.
I tested the following configuration in
board.h
:BOARD_RGB_BRIGHTNESS
is set to max unit32_t so that colour information is not masked off. LED brightness is controlled per pixel on APA102s and relies upon the new macroLED_APA102_BRIGHTNESS
which can be set to a maximum value of0x1f
.