Add init function to RGBLight driver struct (#23076)
This commit is contained in:
parent
23b7a02ebe
commit
f7cf40fa77
42 changed files with 306 additions and 93 deletions
|
@ -37,9 +37,11 @@
|
|||
|
||||
static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi);
|
||||
|
||||
void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds) {
|
||||
void ws2812_init(void) {
|
||||
DDRx_ADDRESS(WS2812_DI_PIN) |= pinmask(WS2812_DI_PIN);
|
||||
}
|
||||
|
||||
void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds) {
|
||||
uint8_t masklo = ~(pinmask(WS2812_DI_PIN)) & PORTx_ADDRESS(WS2812_DI_PIN);
|
||||
uint8_t maskhi = pinmask(WS2812_DI_PIN) | PORTx_ADDRESS(WS2812_DI_PIN);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue