mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-27 03:21:15 +00:00
Update EECONFIG related codes to match breaking changes
This commit is contained in:
parent
48e2247756
commit
56a7498e1e
@ -29,7 +29,7 @@
|
|||||||
#define DEFAULT_BOTTOMING_READING 0
|
#define DEFAULT_BOTTOMING_READING 0
|
||||||
#define DEFAULT_CALIBRATION_STARTER true
|
#define DEFAULT_CALIBRATION_STARTER true
|
||||||
|
|
||||||
#define EECONFIG_KB_DATA_SIZE 256
|
#define EECONFIG_KB_DATA_SIZE 105
|
||||||
|
|
||||||
#define DEBUG_MATRIX_SCAN_RATE
|
#define DEBUG_MATRIX_SCAN_RATE
|
||||||
|
|
||||||
|
@ -49,6 +49,9 @@ typedef struct {
|
|||||||
uint16_t bottoming_reading[MATRIX_ROWS][MATRIX_COLS]; // bottoming reading
|
uint16_t bottoming_reading[MATRIX_ROWS][MATRIX_COLS]; // bottoming reading
|
||||||
} he_config_t;
|
} he_config_t;
|
||||||
|
|
||||||
|
// Check if the size of the reserved persistent memory is the same as the size of struct eeprom_ec_config_t
|
||||||
|
_Static_assert(sizeof(eeprom_he_config_t) == EECONFIG_KB_DATA_SIZE, "Mismatch in keyboard EECONFIG stored data");
|
||||||
|
|
||||||
extern eeprom_he_config_t eeprom_he_config;
|
extern eeprom_he_config_t eeprom_he_config;
|
||||||
extern he_config_t he_config;
|
extern he_config_t he_config;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void eeconfig_init_kb(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write default value to EEPROM now
|
// Write default value to EEPROM now
|
||||||
eeconfig_update_kb_datablock(&eeprom_he_config);
|
eeconfig_update_kb_datablock(&eeprom_he_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
eeconfig_init_user();
|
eeconfig_init_user();
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ void keyboard_post_init_kb(void) {
|
|||||||
keyboard_post_init_user();
|
keyboard_post_init_user();
|
||||||
|
|
||||||
// Read custom menu variables from memory
|
// Read custom menu variables from memory
|
||||||
eeconfig_read_kb_datablock(&eeprom_he_config);
|
eeconfig_read_kb_datablock(&eeprom_he_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
// Set runtime values to EEPROM values
|
// Set runtime values to EEPROM values
|
||||||
he_config.actuation_mode = eeprom_he_config.actuation_mode;
|
he_config.actuation_mode = eeprom_he_config.actuation_mode;
|
||||||
|
@ -262,7 +262,7 @@ void he_save_threshold_data(uint8_t option) {
|
|||||||
eeprom_he_config.mode_1_release_offset = he_config.mode_1_release_offset;
|
eeprom_he_config.mode_1_release_offset = he_config.mode_1_release_offset;
|
||||||
he_rescale_values(2);
|
he_rescale_values(2);
|
||||||
}
|
}
|
||||||
eeconfig_update_kb_datablock(&eeprom_he_config);
|
eeconfig_update_kb_datablock(&eeprom_he_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
uprintf("####################################\n");
|
uprintf("####################################\n");
|
||||||
uprintf("# New thresholds applied and saved #\n");
|
uprintf("# New thresholds applied and saved #\n");
|
||||||
uprintf("####################################\n");
|
uprintf("####################################\n");
|
||||||
@ -287,7 +287,7 @@ void he_save_bottoming_reading(void) {
|
|||||||
he_rescale_values(0);
|
he_rescale_values(0);
|
||||||
he_rescale_values(1);
|
he_rescale_values(1);
|
||||||
he_rescale_values(2);
|
he_rescale_values(2);
|
||||||
eeconfig_update_kb_datablock(&eeprom_he_config);
|
eeconfig_update_kb_datablock(&eeprom_he_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the calibration data
|
// Show the calibration data
|
||||||
|
Loading…
Reference in New Issue
Block a user