1
0
Fork 0

Remove use of __flash within LED drivers (#21343)

This commit is contained in:
Joel Challis 2023-06-23 22:50:31 +01:00 committed by GitHub
parent b2a7420a22
commit 3156cf6da0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 17 deletions

View file

@ -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;