Skip to content

Commit

Permalink
[Keyboard] Fix mxss rgblight.c compilation issues (qmk#20804)
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored and coquizen committed Jun 22, 2023
1 parent 7c8b7bf commit 2ad4a6c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions keyboards/mxss/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,19 @@ void rgblight_check_config(void) {
}
}

uint32_t eeconfig_read_rgblight(void) {
uint64_t eeconfig_read_rgblight(void) {
#ifdef EEPROM_ENABLE
return eeprom_read_dword(EECONFIG_RGBLIGHT);
return (uint64_t)((eeprom_read_dword(EECONFIG_RGBLIGHT)) | ((uint64_t)eeprom_read_byte(EECONFIG_RGBLIGHT_EXTENDED) << 32));
#else
return 0;
#endif
}

void eeconfig_update_rgblight(uint32_t val) {
void eeconfig_update_rgblight(uint64_t val) {
#ifdef EEPROM_ENABLE
rgblight_check_config();
eeprom_update_dword(EECONFIG_RGBLIGHT, val);
eeprom_update_dword(EECONFIG_RGBLIGHT, val & 0xFFFFFFFF);
eeprom_update_byte(EECONFIG_RGBLIGHT_EXTENDED, (val >> 32) & 0xFF);
#endif
}

Expand Down

0 comments on commit 2ad4a6c

Please sign in to comment.