Merge remote-tracking branch 'upstream/develop' into xap

This commit is contained in:
Nick Brassel
2022-11-01 15:13:23 +11:00
13 changed files with 133 additions and 26 deletions
+4 -7
View File
@@ -48,10 +48,8 @@ void eeconfig_init_quantum(void) {
eeprom_update_byte(EECONFIG_DEBUG, 0);
eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0);
default_layer_state = 0;
eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, 0);
// Enable oneshot and autocorrect by default: 0b0001 0100
eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0x14);
eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0);
// Enable oneshot and autocorrect by default: 0b0001 0100 0000 0000
eeprom_update_word(EECONFIG_KEYMAP, 0x1400);
eeprom_update_byte(EECONFIG_BACKLIGHT, 0);
eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
@@ -180,15 +178,14 @@ void eeconfig_update_default_layer(uint8_t val) {
* FIXME: needs doc
*/
uint16_t eeconfig_read_keymap(void) {
return (eeprom_read_byte(EECONFIG_KEYMAP_LOWER_BYTE) | (eeprom_read_byte(EECONFIG_KEYMAP_UPPER_BYTE) << 8));
return eeprom_read_word(EECONFIG_KEYMAP);
}
/** \brief eeconfig update keymap
*
* FIXME: needs doc
*/
void eeconfig_update_keymap(uint16_t val) {
eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, val & 0xFF);
eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, (val >> 8) & 0xFF);
eeprom_update_word(EECONFIG_KEYMAP, val);
}
/** \brief eeconfig read audio
+3 -7
View File
@@ -51,13 +51,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EECONFIG_LED_MATRIX_EXTENDED (uint16_t *)32
#define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32
// TODO: Combine these into a single word and single block of EEPROM
#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34
#define EECONFIG_KEYMAP_HASH (uint32_t *)35
#define EECONFIG_KEYMAP_HASH (uint32_t *)34
// Size of EEPROM being used, other code can refer to this for available EEPROM
#define EECONFIG_SIZE 39
#define EECONFIG_SIZE 38
/* debug bit */
#define EECONFIG_DEBUG_ENABLE (1 << 0)
#define EECONFIG_DEBUG_MATRIX (1 << 1)
@@ -74,8 +72,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EECONFIG_KEYMAP_SWAP_BACKSLASH_BACKSPACE (1 << 6)
#define EECONFIG_KEYMAP_NKRO (1 << 7)
#define EECONFIG_KEYMAP_LOWER_BYTE EECONFIG_KEYMAP
bool eeconfig_is_enabled(void);
bool eeconfig_is_disabled(void);