diff options
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c')
| -rw-r--r-- | keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index e866d897c..8fcd720e2 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c | |||
| @@ -12,7 +12,7 @@ void pre_encoder_mode_change(){ | |||
| 12 | timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; | 12 | timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; |
| 13 | rtcSetTime(&RTCD1, ×pec); | 13 | rtcSetTime(&RTCD1, ×pec); |
| 14 | } else if (encoder_mode == ENC_MODE_BACKLIGHT){ | 14 | } else if (encoder_mode == ENC_MODE_BACKLIGHT){ |
| 15 | save_backlight_config_to_eeprom(); | 15 | backlight_config_save(); |
| 16 | } | 16 | } |
| 17 | } | 17 | } |
| 18 | 18 | ||
| @@ -221,7 +221,7 @@ uint16_t handle_encoder_press(){ | |||
| 221 | 221 | ||
| 222 | uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ | 222 | uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ |
| 223 | #ifdef DYNAMIC_KEYMAP_ENABLE | 223 | #ifdef DYNAMIC_KEYMAP_ENABLE |
| 224 | void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); | 224 | void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); |
| 225 | //big endian | 225 | //big endian |
| 226 | uint16_t keycode = eeprom_read_byte(addr) << 8; | 226 | uint16_t keycode = eeprom_read_byte(addr) << 8; |
| 227 | keycode |= eeprom_read_byte(addr + 1); | 227 | keycode |= eeprom_read_byte(addr + 1); |
| @@ -233,7 +233,7 @@ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ | |||
| 233 | 233 | ||
| 234 | void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ | 234 | void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ |
| 235 | #ifdef DYNAMIC_KEYMAP_ENABLE | 235 | #ifdef DYNAMIC_KEYMAP_ENABLE |
| 236 | void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); | 236 | void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); |
| 237 | eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); | 237 | eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); |
| 238 | eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); | 238 | eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); |
| 239 | #endif | 239 | #endif |
