diff options
author | Joel Challis <git@zvecr.com> | 2021-11-24 07:38:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 18:38:49 +1100 |
commit | 282e916d86a5d353b7cbdfef3afad3c7b011eb14 (patch) | |
tree | d711831ca1accadede43c38bc1bcd91d73ad3dc9 /drivers/led/issi/is31fl3737.c | |
parent | 80f91f7b9aa8987d4594a466d2348830b1c32dc2 (diff) |
Remove use of __flash due to LTO issues (#15268)
Diffstat (limited to 'drivers/led/issi/is31fl3737.c')
-rw-r--r-- | drivers/led/issi/is31fl3737.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c index 62862e0d41..0722e18869 100644 --- a/drivers/led/issi/is31fl3737.c +++ b/drivers/led/issi/is31fl3737.c @@ -166,8 +166,9 @@ void IS31FL3737_init(uint8_t addr) { } void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; @@ -183,7 +184,8 @@ void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); uint8_t control_register_r = led.r / 8; uint8_t control_register_g = led.g / 8; |