summaryrefslogtreecommitdiff
path: root/drivers/led/issi/is31fl3741.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/issi/is31fl3741.c')
-rw-r--r--drivers/led/issi/is31fl3741.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c
index 5084f3b9fc..8d347a5e60 100644
--- a/drivers/led/issi/is31fl3741.c
+++ b/drivers/led/issi/is31fl3741.c
@@ -174,8 +174,9 @@ void IS31FL3741_init(uint8_t addr) {
}
void IS31FL3741_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;
@@ -191,7 +192,8 @@ void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void IS31FL3741_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));
if (red) {
g_scaling_registers[led.driver][led.r] = 0xFF;