summaryrefslogtreecommitdiff
path: root/quantum/rgblight
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-04-29 07:58:55 +0100
committerGitHub <noreply@github.com>2022-04-28 23:58:55 -0700
commitef8db9f1040f139e0c30db853dc4f5b61d7dee77 (patch)
treecb46b128f3157179d755fcb2889b63e57699f54b /quantum/rgblight
parent6e819945ed7d0084f22cbf4221eb166243c3ce07 (diff)
downloadqmk_firmware-ef8db9f1040f139e0c30db853dc4f5b61d7dee77.tar.gz
qmk_firmware-ef8db9f1040f139e0c30db853dc4f5b61d7dee77.zip
Remove ARM pgm_read_word workaround in rgblight (#16961)
Diffstat (limited to 'quantum/rgblight')
-rw-r--r--quantum/rgblight/rgblight.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c
index cc856a0e86..e5d3a98bea 100644
--- a/quantum/rgblight/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -559,12 +559,8 @@ void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool w
// static gradient
uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
bool direction = (delta % 2) == 0;
-# ifdef __AVR__
- // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line
- uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]);
-# else
- uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2];
-# endif
+
+ uint8_t range = pgm_read_byte(&RGBLED_GRADIENT_RANGES[delta / 2]);
for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
uint8_t _hue = ((uint16_t)i * (uint16_t)range) / rgblight_ranges.effect_num_leds;
if (direction) {