Implement connection keycode logic (#25176)

This commit is contained in:
Joel Challis 2025-04-21 22:27:56 +01:00 committed by GitHub
parent ec324af22e
commit c7cb7ba976
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 347 additions and 99 deletions

View file

@ -41,6 +41,10 @@
# include "haptic.h"
#endif
#ifdef CONNECTION_ENABLE
# include "connection.h"
#endif
void nvm_eeconfig_erase(void) {
#ifdef EEPROM_DRIVER
eeprom_driver_format(false);
@ -196,6 +200,15 @@ void nvm_eeconfig_update_haptic(const haptic_config_t *haptic_config) {
}
#endif // HAPTIC_ENABLE
#ifdef CONNECTION_ENABLE
void nvm_eeconfig_read_connection(connection_config_t *config) {
config->raw = eeprom_read_byte(EECONFIG_CONNECTION);
}
void nvm_eeconfig_update_connection(const connection_config_t *config) {
eeprom_update_byte(EECONFIG_CONNECTION, config->raw);
}
#endif // CONNECTION_ENABLE
bool nvm_eeconfig_read_handedness(void) {
return !!eeprom_read_byte(EECONFIG_HANDEDNESS);
}