summaryrefslogtreecommitdiff
path: root/keyboards/planck/keymaps/default
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2021-10-11 20:36:47 -0700
committerDrashna Jael're <drashna@live.com>2021-10-11 20:36:47 -0700
commitb34675555cbd9a71a797a7ebc2148cbf2e8f0efc (patch)
tree2d701310ccd3fc2c603d63536ab4a3c1d9b9381b /keyboards/planck/keymaps/default
parentbcddde8738dbba48c548f1e3f12a10bbf60a65d8 (diff)
parentd9e077468ab3446cbd7306a453a73dad2c1403e8 (diff)
Merge commit 'd9e077468ab3446cbd7306a453a73dad2c1403e8' into firmware_21
Diffstat (limited to 'keyboards/planck/keymaps/default')
-rw-r--r--keyboards/planck/keymaps/default/config.h27
-rw-r--r--keyboards/planck/keymaps/default/keymap.c7
2 files changed, 24 insertions, 10 deletions
diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h
index 9020d2b9f8..464b7b29f8 100644
--- a/keyboards/planck/keymaps/default/config.h
+++ b/keyboards/planck/keymaps/default/config.h
@@ -1,13 +1,27 @@
+/* Copyright 2015-2021 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#pragma once
#ifdef AUDIO_ENABLE
- #define STARTUP_SONG SONG(PLANCK_SOUND)
- // #define STARTUP_SONG SONG(NO_SOUND)
+# define STARTUP_SONG SONG(PLANCK_SOUND)
+// #define STARTUP_SONG SONG(NO_SOUND)
- #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
- SONG(COLEMAK_SOUND), \
- SONG(DVORAK_SOUND) \
- }
+# define DEFAULT_LAYER_SONGS \
+ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) }
#endif
/*
@@ -33,4 +47,3 @@
// Most tactile encoders have detents every 4 stages
#define ENCODER_RESOLUTION 4
-
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 304d320b69..7c787e0366 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2015-2017 Jack Humbert
+/* Copyright 2015-2021 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-bool encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -289,7 +289,7 @@ bool encoder_update(bool clockwise) {
return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0: {
#ifdef AUDIO_ENABLE
@@ -318,6 +318,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
muse_mode = false;
}
}
+ return true;
}
void matrix_scan_user(void) {