WS2812 driver improvements (#20262)
This commit is contained in:
parent
7e1e662dc7
commit
647c2835e6
23 changed files with 68 additions and 77 deletions
|
@ -5,12 +5,12 @@
|
|||
# error "RGBW not supported"
|
||||
#endif
|
||||
|
||||
#ifndef WS2812_ADDRESS
|
||||
# define WS2812_ADDRESS 0xb0
|
||||
#ifndef WS2812_I2C_ADDRESS
|
||||
# define WS2812_I2C_ADDRESS 0xB0
|
||||
#endif
|
||||
|
||||
#ifndef WS2812_TIMEOUT
|
||||
# define WS2812_TIMEOUT 100
|
||||
#ifndef WS2812_I2C_TIMEOUT
|
||||
# define WS2812_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
void ws2812_init(void) {
|
||||
|
@ -25,5 +25,5 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
|||
s_init = true;
|
||||
}
|
||||
|
||||
i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_TIMEOUT);
|
||||
i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_I2C_TIMEOUT);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue