Remove use of __flash within LED drivers (#21343)
This commit is contained in:
parent
b2a7420a22
commit
3156cf6da0
6 changed files with 27 additions and 17 deletions
|
@ -193,8 +193,9 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
|
|||
}
|
||||
|
||||
void IS31FL3733_set_value(int index, uint8_t value) {
|
||||
is31_led led;
|
||||
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.v] == value) {
|
||||
return;
|
||||
|
@ -211,7 +212,8 @@ void IS31FL3733_set_value_all(uint8_t value) {
|
|||
}
|
||||
|
||||
void IS31FL3733_set_led_control_register(uint8_t index, bool value) {
|
||||
is31_led led = g_is31_leds[index];
|
||||
is31_led led;
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = led.v / 8;
|
||||
uint8_t bit_value = led.v % 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue