Skip to content

Conversation

@jamesadevine
Copy link
Contributor

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:

#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.

@jamesadevine jamesadevine mentioned this pull request Mar 3, 2021
Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me, thank you for the PR. Though the neopixel_init()/write() is confusing to use with dotstar ap102. I will do a rename later one, may be to rgb_init/write()

@hathach hathach merged commit cb916d3 into adafruit:master Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants