From dd64a4e73868027b44a018278039cc42a01e730b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 4 Mar 2019 22:10:13 -0800 Subject: Init RGB Matrix EEPROM I'm not sure how to check if it's the same as RGBLIGHT's EEPROM, but if you don't init it, it **will not** work properly until it is initialized. --- tmk_core/common/eeconfig.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 9c1e3520ee..30dc7a48d4 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -47,6 +47,9 @@ void eeconfig_init_quantum(void) { eeprom_update_byte(EECONFIG_STENOMODE, 0); eeprom_update_dword(EECONFIG_HAPTIC, 0); eeprom_update_byte(EECONFIG_VELOCIKEY, 0); +#ifdef EECONFIG_RGB_MATRIX + eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); +#endif eeconfig_init_kb(); } @@ -185,5 +188,3 @@ uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAP * FIXME: needs doc */ void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); } - - -- cgit v1.2.3 From e2dfb787da2a2ba88e0e074b396a2b988e10eccf Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 16 Jul 2019 02:40:43 -0500 Subject: Adding rgb matrix speed into eeprom storage. (#5965) Zeroing out spd in eeconfig_init_quantum Switched to block read & update Update tmk_core/common/eeconfig.h Co-Authored-By: Drashna Jaelre Fixing init compile error Update eeconfig.c Dead / Missing API cleanup alignment --- tmk_core/common/eeconfig.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 30dc7a48d4..4f440abc9c 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -47,9 +47,8 @@ void eeconfig_init_quantum(void) { eeprom_update_byte(EECONFIG_STENOMODE, 0); eeprom_update_dword(EECONFIG_HAPTIC, 0); eeprom_update_byte(EECONFIG_VELOCIKEY, 0); -#ifdef EECONFIG_RGB_MATRIX eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); -#endif + eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0); eeconfig_init_kb(); } -- cgit v1.2.3 From d534c72a544454132b3c6c05af85c821f6a93d65 Mon Sep 17 00:00:00 2001 From: Stephen Wanhella Date: Wed, 21 Aug 2019 17:07:08 -0700 Subject: Added keycodes for swapping and unswapping the Control and OS keys (#6110) * Add MAGIC_SWAP_CONTROL_LGUI and MAGIC_UNSWAP_CONTROL_LGUI keycodes Key codes to swap and unswap the control and windows/cmd keys * Fix issues with pull request #6110 Renamed swap/unswap lctl and lgui key codes, added key codes to swap/unswap rctl and rgui, and moved new bool inside keycode_config.h struct to the end * Move new keycodes to the end of the enum (#6110) * add cases for swapped control and OS keys to mod_config (#6110) * Add new keycodes to feature_bootmagic.md (#6110) * Add R+L swap codes to keep in parity with AG_* codes * Extend Magic range check to include new magic codes * Update audio docs * Combine 2 byte ranges into 1 word for EECONFG Fix names for Keymap config EEPROM * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- tmk_core/common/eeconfig.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 4f440abc9c..28f5d3ad5e 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -39,7 +39,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, 0); + eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, 0); + eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0); eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); eeprom_update_byte(EECONFIG_BACKLIGHT, 0); eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default @@ -127,12 +128,17 @@ void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DE * * FIXME: needs doc */ -uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } +uint16_t eeconfig_read_keymap(void) { + return ( eeprom_read_byte(EECONFIG_KEYMAP_LOWER_BYTE) | (eeprom_read_byte(EECONFIG_KEYMAP_UPPER_BYTE) << 8) ); +} /** \brief eeconfig update keymap * * FIXME: needs doc */ -void eeconfig_update_keymap(uint8_t val) { eeprom_update_byte(EECONFIG_KEYMAP, val); } +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 ); +} /** \brief eeconfig read backlight * -- cgit v1.2.3 From b624f32f944acdc59dcb130674c09090c5c404cb Mon Sep 17 00:00:00 2001 From: skullY Date: Fri, 30 Aug 2019 11:19:03 -0700 Subject: clang-format changes --- tmk_core/common/eeconfig.c | 101 ++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 61 deletions(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 28f5d3ad5e..61aaec2054 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -4,8 +4,8 @@ #include "eeconfig.h" #ifdef STM32_EEPROM_ENABLE -#include "hal.h" -#include "eeprom_stm32.h" +# include "hal.h" +# include "eeprom_stm32.h" #endif extern uint32_t default_layer_state; @@ -13,21 +13,18 @@ extern uint32_t default_layer_state; * * FIXME: needs doc */ -__attribute__ ((weak)) -void eeconfig_init_user(void) { - // Reset user EEPROM value to blank, rather than to a set value - eeconfig_update_user(0); +__attribute__((weak)) void eeconfig_init_user(void) { + // Reset user EEPROM value to blank, rather than to a set value + eeconfig_update_user(0); } -__attribute__ ((weak)) -void eeconfig_init_kb(void) { - // Reset Keyboard EEPROM value to blank, rather than to a set value - eeconfig_update_kb(0); +__attribute__((weak)) void eeconfig_init_kb(void) { + // Reset Keyboard EEPROM value to blank, rather than to a set value + eeconfig_update_kb(0); - eeconfig_init_user(); + eeconfig_init_user(); } - /* * FIXME: needs doc */ @@ -35,49 +32,42 @@ void eeconfig_init_quantum(void) { #ifdef STM32_EEPROM_ENABLE EEPROM_Erase(); #endif - eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); - 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); - eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0); - eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); - eeprom_update_byte(EECONFIG_BACKLIGHT, 0); - eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default - eeprom_update_dword(EECONFIG_RGBLIGHT, 0); - eeprom_update_byte(EECONFIG_STENOMODE, 0); - eeprom_update_dword(EECONFIG_HAPTIC, 0); - eeprom_update_byte(EECONFIG_VELOCIKEY, 0); - eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); - eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0); - - eeconfig_init_kb(); + eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); + 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); + eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0); + eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); + eeprom_update_byte(EECONFIG_BACKLIGHT, 0); + eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default + eeprom_update_dword(EECONFIG_RGBLIGHT, 0); + eeprom_update_byte(EECONFIG_STENOMODE, 0); + eeprom_update_dword(EECONFIG_HAPTIC, 0); + eeprom_update_byte(EECONFIG_VELOCIKEY, 0); + eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); + eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0); + + eeconfig_init_kb(); } /** \brief eeconfig initialization * * FIXME: needs doc */ -void eeconfig_init(void) { - - eeconfig_init_quantum(); -} +void eeconfig_init(void) { eeconfig_init_quantum(); } /** \brief eeconfig enable * * FIXME: needs doc */ -void eeconfig_enable(void) -{ - eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); -} +void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); } /** \brief eeconfig disable * * FIXME: needs doc */ -void eeconfig_disable(void) -{ +void eeconfig_disable(void) { #ifdef STM32_EEPROM_ENABLE EEPROM_Erase(); #endif @@ -88,25 +78,19 @@ void eeconfig_disable(void) * * FIXME: needs doc */ -bool eeconfig_is_enabled(void) -{ - return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); -} +bool eeconfig_is_enabled(void) { return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); } /** \brief eeconfig is disabled * * FIXME: needs doc */ -bool eeconfig_is_disabled(void) -{ - return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER_OFF); -} +bool eeconfig_is_disabled(void) { return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER_OFF); } /** \brief eeconfig read debug * * FIXME: needs doc */ -uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } +uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } /** \brief eeconfig update debug * * FIXME: needs doc @@ -117,7 +101,7 @@ void eeconfig_update_debug(uint8_t val) { eeprom_update_byte(EECONFIG_DEBUG, val * * FIXME: needs doc */ -uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } +uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } /** \brief eeconfig update default layer * * FIXME: needs doc @@ -128,47 +112,43 @@ void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DE * * 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) ); -} +uint16_t eeconfig_read_keymap(void) { return (eeprom_read_byte(EECONFIG_KEYMAP_LOWER_BYTE) | (eeprom_read_byte(EECONFIG_KEYMAP_UPPER_BYTE) << 8)); } /** \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_byte(EECONFIG_KEYMAP_UPPER_BYTE, (val >> 8) & 0xFF); } /** \brief eeconfig read backlight * * FIXME: needs doc */ -uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } +uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } /** \brief eeconfig update backlight * * FIXME: needs doc */ void eeconfig_update_backlight(uint8_t val) { eeprom_update_byte(EECONFIG_BACKLIGHT, val); } - /** \brief eeconfig read audio * * FIXME: needs doc */ -uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } +uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } /** \brief eeconfig update audio * * FIXME: needs doc */ void eeconfig_update_audio(uint8_t val) { eeprom_update_byte(EECONFIG_AUDIO, val); } - /** \brief eeconfig read kb * * FIXME: needs doc */ -uint32_t eeconfig_read_kb(void) { return eeprom_read_dword(EECONFIG_KEYBOARD); } +uint32_t eeconfig_read_kb(void) { return eeprom_read_dword(EECONFIG_KEYBOARD); } /** \brief eeconfig update kb * * FIXME: needs doc @@ -179,15 +159,14 @@ void eeconfig_update_kb(uint32_t val) { eeprom_update_dword(EECONFIG_KEYBOARD, v * * FIXME: needs doc */ -uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER); } +uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER); } /** \brief eeconfig update user * * FIXME: needs doc */ void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); } - -uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } +uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } /** \brief eeconfig update user * * FIXME: needs doc -- cgit v1.2.3 From ad8dbd5ca5390ad9e441943b705684fce521bc15 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 24 Sep 2019 15:24:12 +0100 Subject: ARM split - Add bootmagic/magic keycodes for setting handedness (#6545) * Add docs on bootmagic/magic keycodes for setting handedness * Clang format fixes * Maintain backwards compatibility * Maintain backwards compatibility --- tmk_core/common/eeconfig.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 61aaec2054..933ac42bd2 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -153,8 +153,8 @@ uint32_t eeconfig_read_kb(void) { return eeprom_read_dword(EECONFIG_KEYBOARD); } * * FIXME: needs doc */ - void eeconfig_update_kb(uint32_t val) { eeprom_update_dword(EECONFIG_KEYBOARD, val); } + /** \brief eeconfig read user * * FIXME: needs doc @@ -166,9 +166,24 @@ uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER); } */ void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); } +/** \brief eeconfig read haptic + * + * FIXME: needs doc + */ uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } -/** \brief eeconfig update user +/** \brief eeconfig update haptic * * FIXME: needs doc */ void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); } + +/** \brief eeconfig read split handedness + * + * FIXME: needs doc + */ +bool eeconfig_read_handedness(void) { return !!eeprom_read_byte(EECONFIG_HANDEDNESS); } +/** \brief eeconfig update split handedness + * + * FIXME: needs doc + */ +void eeconfig_update_handedness(bool val) { eeprom_update_byte(EECONFIG_HANDEDNESS, !!val); } -- cgit v1.2.3 From 17794e0b2502371eaf155328d4e4195aef703163 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 27 Sep 2019 21:33:55 +0100 Subject: ARM split - Add support for dfu-util EE_HANDS flashing (#6543) * Initial stab at some fake dfu-util-split-left behaviour * Apply suggestions from code review Co-Authored-By: fauxpark * Clang format fixes * Fake eeprom init for both left and right hand --- tmk_core/common/eeconfig.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 933ac42bd2..4cf4ca3ace 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -48,6 +48,16 @@ void eeconfig_init_quantum(void) { eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0); + // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS + // within the emulated eeprom via dfu-util or another tool +#if defined INIT_EE_HANDS_LEFT + #pragma message "Faking EE_HANDS for left hand" + eeprom_update_byte(EECONFIG_HANDEDNESS, 1); +#elif defined INIT_EE_HANDS_RIGHT + #pragma message "Faking EE_HANDS for right hand" + eeprom_update_byte(EECONFIG_HANDEDNESS, 0); +#endif + eeconfig_init_kb(); } -- cgit v1.2.3 From c1970e284d9718a62a973442ec9f0801365cff60 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 9 Nov 2019 02:23:26 +0000 Subject: Fix LAYER_STATE_8BIT compile issues (#7304) --- tmk_core/common/eeconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 4cf4ca3ace..72f198d6ce 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -2,13 +2,13 @@ #include #include "eeprom.h" #include "eeconfig.h" +#include "action_layer.h" #ifdef STM32_EEPROM_ENABLE # include "hal.h" # include "eeprom_stm32.h" #endif -extern uint32_t default_layer_state; /** \brief eeconfig enable * * FIXME: needs doc -- cgit v1.2.3 From a91c0c476507cb8c12840abb59bff34ab0de3c03 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 17 Nov 2019 14:02:26 +0000 Subject: Run clang-format manually to fix recently changed files --- tmk_core/common/eeconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 72f198d6ce..7cec4bd7df 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -51,10 +51,10 @@ void eeconfig_init_quantum(void) { // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS // within the emulated eeprom via dfu-util or another tool #if defined INIT_EE_HANDS_LEFT - #pragma message "Faking EE_HANDS for left hand" +# pragma message "Faking EE_HANDS for left hand" eeprom_update_byte(EECONFIG_HANDEDNESS, 1); #elif defined INIT_EE_HANDS_RIGHT - #pragma message "Faking EE_HANDS for right hand" +# pragma message "Faking EE_HANDS for right hand" eeprom_update_byte(EECONFIG_HANDEDNESS, 0); #endif -- cgit v1.2.3 From d13ada11622977bcc0b530212b4405229805016d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 6 Nov 2019 08:04:50 +1100 Subject: Add customisable EEPROM driver selection (#7274) - uprintf -> dprintf - Fix atsam "vendor" eeprom. - Bump Kinetis K20x to 64 bytes, too. - Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value. - Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage. - Add 24LC128 by request. --- tmk_core/common/eeconfig.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 7cec4bd7df..fe56c57d11 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -9,6 +9,10 @@ # include "eeprom_stm32.h" #endif +#if defined(EEPROM_DRIVER) +# include "eeprom_driver.h" +#endif + /** \brief eeconfig enable * * FIXME: needs doc @@ -31,6 +35,9 @@ __attribute__((weak)) void eeconfig_init_kb(void) { void eeconfig_init_quantum(void) { #ifdef STM32_EEPROM_ENABLE EEPROM_Erase(); +#endif +#if defined(EEPROM_DRIVER) + eeprom_driver_erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); eeprom_update_byte(EECONFIG_DEBUG, 0); @@ -80,6 +87,9 @@ void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_N void eeconfig_disable(void) { #ifdef STM32_EEPROM_ENABLE EEPROM_Erase(); +#endif +#if defined(EEPROM_DRIVER) + eeprom_driver_erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); } -- cgit v1.2.3 From c66df1664497546f32662409778731143e45a552 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 28 Nov 2020 12:02:18 -0800 Subject: 2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change --- tmk_core/common/eeconfig.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index fe56c57d11..e15897552f 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -13,6 +13,10 @@ # include "eeprom_driver.h" #endif +#if defined(HAPTIC_ENABLE) +# include "haptic.h" +#endif + /** \brief eeconfig enable * * FIXME: needs doc @@ -65,6 +69,15 @@ void eeconfig_init_quantum(void) { eeprom_update_byte(EECONFIG_HANDEDNESS, 0); #endif +#if defined(HAPTIC_ENABLE) + haptic_reset(); +#else + // this is used in case haptic is disabled, but we still want sane defaults + // in the haptic configuration eeprom. All zero will trigger a haptic_reset + // when a haptic-enabled firmware is loaded onto the keyboard. + eeprom_update_dword(EECONFIG_HAPTIC, 0); +#endif + eeconfig_init_kb(); } -- cgit v1.2.3 From 501f2fdef115314713e94428d409e5c3b5bfc1c2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 11 Dec 2020 13:45:24 +1100 Subject: Normalise include statements in core code (#11153) * Normalise include statements in core code * Missed one --- tmk_core/common/eeconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/common/eeconfig.c') diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index e15897552f..5e3ebe6ee6 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -5,7 +5,7 @@ #include "action_layer.h" #ifdef STM32_EEPROM_ENABLE -# include "hal.h" +# include # include "eeprom_stm32.h" #endif -- cgit v1.2.3