Add an option for making cycle changes persistent

This commit is contained in:
Konstantin Đorđević 2018-10-23 19:35:24 +02:00
parent b01d34e1dd
commit 5d771ca933
2 changed files with 8 additions and 0 deletions

View file

@ -65,6 +65,9 @@ void cycle_unicode_input_mode(void) {
unicode_input_mode_init(); // Init selected_index
selected_index = (selected_index + 1) % selected_count;
input_mode = selected[selected_index];
# if UNICODE_CYCLE_PERSIST
eeprom_update_byte(EECONFIG_UNICODEMODE, input_mode);
# endif
#endif
}

View file

@ -25,6 +25,11 @@
#define UNICODE_SELECTED_MODES -1
#endif
// Whether input mode changes in cycle should be written to EEPROM
#ifndef UNICODE_CYCLE_PERSIST
#define UNICODE_CYCLE_PERSIST true
#endif
#ifndef UNICODE_TYPE_DELAY
#define UNICODE_TYPE_DELAY 10
#endif