diff options
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/common/backlight.c | 5 | ||||
-rw-r--r-- | tmk_core/common/backlight.h | 1 | ||||
-rw-r--r-- | tmk_core/common/command.c | 4 | ||||
-rw-r--r-- | tmk_core/common/nodebug.h | 12 |
4 files changed, 17 insertions, 5 deletions
diff --git a/tmk_core/common/backlight.c b/tmk_core/common/backlight.c index 2f6fc1cd6c..c9e8fd3fd2 100644 --- a/tmk_core/common/backlight.c +++ b/tmk_core/common/backlight.c @@ -83,3 +83,8 @@ void backlight_level(uint8_t level) eeconfig_update_backlight(backlight_config.raw); backlight_set(backlight_config.level); } + +uint8_t get_backlight_level(void) +{ + return backlight_config.level; +}
\ No newline at end of file diff --git a/tmk_core/common/backlight.h b/tmk_core/common/backlight.h index 525ec8bbef..f573092674 100644 --- a/tmk_core/common/backlight.h +++ b/tmk_core/common/backlight.h @@ -36,5 +36,6 @@ void backlight_toggle(void); void backlight_step(void); void backlight_set(uint8_t level); void backlight_level(uint8_t level); +uint8_t get_backlight_level(void); #endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index f06abaf7f0..9edcc42a05 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -357,9 +357,11 @@ static bool command_common(uint8_t code) clear_keyboard(); // clear to prevent stuck keys print("\n\nJumping to bootloader... "); #ifdef AUDIO_ENABLE + stop_all_notes(); play_goodbye_tone(); + #else + _delay_ms(1000); #endif - _delay_ms(1000); bootloader_jump(); // not return break; diff --git a/tmk_core/common/nodebug.h b/tmk_core/common/nodebug.h index 93309ada47..5e18656e5b 100644 --- a/tmk_core/common/nodebug.h +++ b/tmk_core/common/nodebug.h @@ -16,10 +16,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef NODEBUG_H -#define NODEBUG_H 1 +#define NODEBUG_H -#define NO_DEBUG -#include "debug.h" -#undef NO_DEBUG +#ifndef NO_DEBUG + #define NO_DEBUG + #include "debug.h" + #undef NO_DEBUG +#else + #include "debug.h" +#endif #endif |