From 3f02637f4dd765803671c2611191beb096d60b36 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 9 May 2016 13:17:15 -0400 Subject: Backlight Breathing for Planck and Atomic * Updated personal layouts * tweaked personal * Nightly - Audio Cleanup Refactored the LUTs. Abstracted some of the registers out of audio to use more functional names. Split audio into audio and audio_pwm. WIP * nightly - collapsed code * Added check for note playing to LEDs * Usability tweaks * TWEAE * nightly added extra kcs to keymap common * turned on Plank audio * Added backlight breathing to atomic * reverted accidental merge * adds backlight pulse to planck --- keyboard/planck/keymaps/pvc/keymap.c | 13 ++++++++++++- keyboard/planck/keymaps/pvc/makefile.mk | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'keyboard/planck/keymaps/pvc') diff --git a/keyboard/planck/keymaps/pvc/keymap.c b/keyboard/planck/keymaps/pvc/keymap.c index 830b00a4c4..177f04484d 100644 --- a/keyboard/planck/keymaps/pvc/keymap.c +++ b/keyboard/planck/keymaps/pvc/keymap.c @@ -38,6 +38,7 @@ #define MACRO_AUDIO_OFF 17 #define MACRO_INC_VOICE 18 #define MACRO_DEC_VOICE 19 +#define MACRO_BACKLIGHT 20 #define M_QWRTY M(MACRO_QWERTY) #define M_COLMK M(MACRO_COLEMAK) @@ -53,6 +54,7 @@ #define TMPO_UP M(MACRO_TEMPO_U) #define TMPO_DN M(MACRO_TEMPO_D) #define TMPO_DF M(MACRO_TONE_DEFAULT) +#define M_BACKL M(MACRO_BACKLIGHT) #define MUS_ON M(MACRO_MUSIC_ON) @@ -217,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_ADJUST] = { /* ADJUST */ { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, MUS_ON, MUS_OFF, AUD_ON, AUD_OFF }, { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, RESET, _______, M_MOUSE, _______, _______, _______, _______ }, + { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, VC_UP, VC_DOWN, _______, _______ }, }, @@ -337,6 +339,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + +#ifdef BACKLIGHT_ENABLE + case MACRO_BACKLIGHT: + if (record->event.pressed) + { + backlight_step(); + } +#endif + #ifdef MOUSEKEY_ENABLE case MACRO_MOUSE: diff --git a/keyboard/planck/keymaps/pvc/makefile.mk b/keyboard/planck/keymaps/pvc/makefile.mk index b3f1b9e51c..f7798b09d5 100644 --- a/keyboard/planck/keymaps/pvc/makefile.mk +++ b/keyboard/planck/keymaps/pvc/makefile.mk @@ -1,12 +1,12 @@ BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -- cgit v1.2.3