summaryrefslogtreecommitdiff
path: root/keyboards/planck
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/config.h6
-rw-r--r--keyboards/planck/ez/chconf.h29
-rw-r--r--keyboards/planck/ez/config.h48
-rw-r--r--keyboards/planck/ez/ez.c50
-rw-r--r--keyboards/planck/ez/ez.h25
-rw-r--r--keyboards/planck/ez/glow/config.h5
-rw-r--r--keyboards/planck/ez/glow/glow.c19
-rw-r--r--keyboards/planck/ez/glow/glow.h18
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/config.h36
-rw-r--r--keyboards/planck/ez/glow/keymaps/glow/keymap.c8
-rw-r--r--keyboards/planck/ez/halconf.h23
-rw-r--r--keyboards/planck/ez/info.json5
-rw-r--r--keyboards/planck/ez/mcuconf.h41
-rw-r--r--keyboards/planck/ez/readme.md18
-rwxr-xr-x[-rw-r--r--]keyboards/planck/ez/rules.mk34
-rw-r--r--keyboards/planck/info.json199
-rw-r--r--keyboards/planck/keymaps/default/config.h30
-rw-r--r--keyboards/planck/keymaps/default/keymap.c137
-rw-r--r--keyboards/planck/keymaps/oryx/config.h27
-rw-r--r--keyboards/planck/keymaps/oryx/keymap.c229
-rw-r--r--keyboards/planck/keymaps/oryx/rules.mk3
-rw-r--r--keyboards/planck/keymaps/webusb/config.h3
-rw-r--r--keyboards/planck/keymaps/webusb/keymap.c3
-rw-r--r--keyboards/planck/planck.c12
-rw-r--r--keyboards/planck/planck.h18
-rw-r--r--keyboards/planck/readme.md5
-rw-r--r--keyboards/planck/rules.mk32
27 files changed, 587 insertions, 476 deletions
diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h
index 837311c769..9ef2b0b0dd 100644
--- a/keyboards/planck/config.h
+++ b/keyboards/planck/config.h
@@ -21,11 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
-#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x6060
+#define VENDOR_ID 0x03A8
#define MANUFACTURER OLKB
#define PRODUCT Planck
-#define DESCRIPTION A compact ortholinear keyboard
/* key matrix size */
#define MATRIX_ROWS 4
@@ -56,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
-#define DEBOUNCING_DELAY 5
+#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/planck/ez/chconf.h b/keyboards/planck/ez/chconf.h
new file mode 100644
index 0000000000..e1243f23ec
--- /dev/null
+++ b/keyboards/planck/ez/chconf.h
@@ -0,0 +1,29 @@
+/* Copyright 2020 QMK
+ *
+ * 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/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/planck/rev6/chconf.h -r platforms/chibios/QMK_PROTON_C/configs/chconf.h`
+ */
+
+#pragma once
+
+#define CH_CFG_ST_RESOLUTION 16
+
+#define CH_CFG_ST_FREQUENCY 10000
+
+#include_next <chconf.h>
+
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index e5071f7e0c..e924d077d2 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -1,5 +1,6 @@
-/*
- * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* 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
@@ -17,7 +18,7 @@
#pragma once
-/* USB Device descriptor parameter */
+
#undef VENDOR_ID
#define VENDOR_ID 0x3297
#undef PRODUCT_ID
@@ -27,7 +28,7 @@
#undef PRODUCT
#define PRODUCT Planck EZ
#define DEVICE_VER 0x0000
-#define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com"
+
#undef MATRIX_ROWS
#undef MATRIX_COLS
@@ -60,7 +61,7 @@
#undef C6_AUDIO
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCE 6
+// #define DEBOUNCE 6
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE
@@ -106,39 +107,6 @@
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-/*
- * MIDI options
- */
-
-/* Prevent use of disabled MIDI features in the keymap */
-//#define MIDI_ENABLE_STRICT 1
-
-/* enable basic MIDI features:
- - MIDI notes can be sent when in Music mode is on
-*/
-//#define MIDI_BASIC
-
-/* enable advanced MIDI features:
- - MIDI notes can be added to the keymap
- - Octave shift and transpose
- - Virtual sustain, portamento, and modulation wheel
- - etc.
-*/
-//#define MIDI_ADVANCED
-
-/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
-//#define MIDI_TONE_KEYCODE_OCTAVES 1
-
-// #define WS2812_LED_N 2
-// #define RGBLED_NUM WS2812_LED_N
-// #define WS2812_TIM_N 2
-// #define WS2812_TIM_CH 2
-// #define PORT_WS2812 GPIOA
-// #define PIN_WS2812 1
-// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
-//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
-//#define WS2812_EXTERNAL_PULLUP
-
#define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
@@ -148,13 +116,11 @@
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
-
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_LED_PROCESS_LIMIT 5
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-#define I2C1_CLOCK_SPEED 400000
#define IGNORE_MOD_TAP_INTERRUPT
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index b4f3d811ef..dc95607604 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -1,4 +1,6 @@
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* 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
@@ -18,19 +20,8 @@
#include <hal.h>
keyboard_config_t keyboard_config;
-
#ifdef RGB_MATRIX_ENABLE
-void suspend_power_down_kb(void) {
- rgb_matrix_set_suspend_state(true);
- suspend_power_down_user();
-}
-
-void suspend_wakeup_init_kb(void) {
- rgb_matrix_set_suspend_state(false);
- suspend_wakeup_init_user();
-}
-
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -114,8 +105,24 @@ led_config_t g_led_config = { {
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1
} };
+
+void suspend_power_down_kb(void) {
+ rgb_matrix_set_color_all(0, 0, 0);
+ rgb_matrix_set_suspend_state(true);
+ suspend_power_down_user();
+}
+
+ void suspend_wakeup_init_kb(void) {
+ rgb_matrix_set_suspend_state(false);
+ suspend_wakeup_init_user();
+}
+void keyboard_post_init_kb(void) {
+ rgb_matrix_enable_noeeprom();
+ keyboard_post_init_user();
+}
#endif
+/* Left B9 Right B8 */
// See http://jared.geek.nz/2013/feb/linear-led-pwm
static uint16_t cie_lightness(uint16_t v) {
@@ -133,7 +140,7 @@ static uint16_t cie_lightness(uint16_t v) {
}
}
- static PWMConfig pwmCFG = {
+static PWMConfig pwmCFG = {
0xFFFF,/* PWM clock frequency */
256,/* initial PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */
NULL,
@@ -218,29 +225,18 @@ void keyboard_pre_init_kb(void) {
rgb_matrix_set_flags(LED_FLAG_NONE);
}
#endif
-
- // initialize settings for front LEDs
led_initialize_hardware();
keyboard_pre_init_user();
}
-#ifdef RGB_MATRIX_ENABLE
-void keyboard_post_init_kb(void) {
- rgb_matrix_enable_noeeprom();
- keyboard_post_init_user();
-}
-#endif
-
void eeconfig_init_kb(void) { // EEPROM is getting reset!
keyboard_config.raw = 0;
keyboard_config.rgb_matrix_enable = true;
keyboard_config.led_level = 4;
-
eeconfig_update_kb(keyboard_config.raw);
eeconfig_init_user();
}
-
layer_state_t layer_state_set_kb(layer_state_t state) {
planck_ez_left_led_off();
planck_ez_right_led_off();
@@ -281,7 +277,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
case TOGGLE_LAYER_COLOR:
if (record->event.pressed) {
keyboard_config.disable_layer_led ^= 1;
- if (keyboard_config.disable_layer_led)
+ if (keyboard_config.disable_layer_led)
rgb_matrix_set_color_all(0, 0, 0);
eeconfig_update_kb(keyboard_config.raw);
}
@@ -306,9 +302,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return false;
#endif
}
- return process_record_user(keycode, record);
+ return process_record_user(keycode, record);
}
+
#ifdef AUDIO_ENABLE
bool music_mask_kb(uint16_t keycode) {
switch (keycode) {
@@ -324,6 +321,7 @@ bool music_mask_kb(uint16_t keycode) {
}
}
#endif
+
#ifdef ORYX_ENABLE
static uint16_t loops = 0;
static bool is_on = false;
diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h
index 07182417fc..9e572d258d 100644
--- a/keyboards/planck/ez/ez.h
+++ b/keyboards/planck/ez/ez.h
@@ -1,4 +1,6 @@
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* 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
@@ -39,19 +41,22 @@
}
#define LAYOUT_ortho_4x12( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_planck_1x2uC( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
-)
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k3a, k3b, KC_NO }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k37, k38, k39, k33, k34, k35 } \
+}
-#define KEYMAP LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
@@ -71,7 +76,7 @@ enum planck_ez_keycodes {
typedef union {
uint32_t raw;
struct {
- uint8_t led_level :3;
+ uint8_t led_level :3;
bool disable_layer_led :1;
bool rgb_matrix_enable :1;
};
diff --git a/keyboards/planck/ez/glow/config.h b/keyboards/planck/ez/glow/config.h
index 21a339da28..55ce289010 100644
--- a/keyboards/planck/ez/glow/config.h
+++ b/keyboards/planck/ez/glow/config.h
@@ -1,5 +1,6 @@
-/*
- * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* 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
diff --git a/keyboards/planck/ez/glow/glow.c b/keyboards/planck/ez/glow/glow.c
new file mode 100644
index 0000000000..c6733bbe50
--- /dev/null
+++ b/keyboards/planck/ez/glow/glow.c
@@ -0,0 +1,19 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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/>.
+ */
+
+#include "glow.h"
diff --git a/keyboards/planck/ez/glow/glow.h b/keyboards/planck/ez/glow/glow.h
index d8a01f4359..cfc26b5e03 100644
--- a/keyboards/planck/ez/glow/glow.h
+++ b/keyboards/planck/ez/glow/glow.h
@@ -1,3 +1,21 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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
#include "ez.h"
diff --git a/keyboards/planck/ez/glow/keymaps/glow/config.h b/keyboards/planck/ez/glow/keymaps/glow/config.h
index 6fa31cc8a7..501d118632 100644
--- a/keyboards/planck/ez/glow/keymaps/glow/config.h
+++ b/keyboards/planck/ez/glow/keymaps/glow/config.h
@@ -1,39 +1,7 @@
#pragma once
#ifdef AUDIO_ENABLE
- #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 STARTUP_SONG SONG(DVORAK_SOUND)
#endif
-/*
- * MIDI options
- */
-
-/* Prevent use of disabled MIDI features in the keymap */
-//#define MIDI_ENABLE_STRICT 1
-
-/* enable basic MIDI features:
- - MIDI notes can be sent when in Music mode is on
-*/
-
-#define MIDI_BASIC
-
-/* enable advanced MIDI features:
- - MIDI notes can be added to the keymap
- - Octave shift and transpose
- - Virtual sustain, portamento, and modulation wheel
- - etc.
-*/
-//#define MIDI_ADVANCED
-
-/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
-//#define MIDI_TONE_KEYCODE_OCTAVES 2
-
-// Most tactile encoders have detents every 4 stages
-#define ENCODER_RESOLUTION 4
-
+#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 5
diff --git a/keyboards/planck/ez/glow/keymaps/glow/keymap.c b/keyboards/planck/ez/glow/keymaps/glow/keymap.c
index 03cc0049e4..37659fbc32 100644
--- a/keyboards/planck/ez/glow/keymaps/glow/keymap.c
+++ b/keyboards/planck/ez/glow/keymaps/glow/keymap.c
@@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
#endif
-uint32_t layer_state_set_user(uint32_t state) {
+layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -290,9 +290,10 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
-void dip_update(uint8_t index, bool active) {
+bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if (active) {
@@ -317,6 +318,7 @@ void dip_update(uint8_t index, bool active) {
#endif
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/ez/halconf.h b/keyboards/planck/ez/halconf.h
new file mode 100644
index 0000000000..f1044867f7
--- /dev/null
+++ b/keyboards/planck/ez/halconf.h
@@ -0,0 +1,23 @@
+/* Copyright 2021 QMK
+ *
+ * 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 3 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 <https://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_GPT TRUE
+#define HAL_USE_DAC TRUE
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json
index b8382bfe0a..6c9332b052 100644
--- a/keyboards/planck/ez/info.json
+++ b/keyboards/planck/ez/info.json
@@ -1,13 +1,9 @@
{
"keyboard_name": "Planck EZ",
- "keyboard_folder": "planck/ez",
"url": "https://ergodox-ez.com/pages/planck",
"maintainer": "jackhumbert",
- "width": 12,
- "height": 4,
"layouts": {
"LAYOUT_planck_1x2uC": {
- "key_count": 47,
"layout": [
{ "x": 0, "y": 0 },
{ "x": 1, "y": 0 },
@@ -59,7 +55,6 @@
]
},
"LAYOUT_ortho_4x12": {
- "key_count": 48,
"layout": [
{ "x": 0, "y": 0 },
{ "x": 1, "y": 0 },
diff --git a/keyboards/planck/ez/mcuconf.h b/keyboards/planck/ez/mcuconf.h
new file mode 100644
index 0000000000..44035e7827
--- /dev/null
+++ b/keyboards/planck/ez/mcuconf.h
@@ -0,0 +1,41 @@
+/* Copyright 2021 QMK
+ *
+ * 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 3 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 <https://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include_next "mcuconf.h"
+
+// for i2c expander, and ISSI
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+// for indicator LEDs
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 TRUE
+#undef STM32_PWM_USE_TIM4
+#define STM32_PWM_USE_TIM4 TRUE
+
+// for audio
+#undef STM32_DAC_USE_DAC1_CH1
+#define STM32_DAC_USE_DAC1_CH1 TRUE
+#undef STM32_DAC_USE_DAC1_CH2
+#define STM32_DAC_USE_DAC1_CH2 TRUE
+#undef STM32_GPT_USE_TIM6
+#define STM32_GPT_USE_TIM6 TRUE
+#undef STM32_GPT_USE_TIM7
+#define STM32_GPT_USE_TIM7 TRUE
+#undef STM32_GPT_USE_TIM8
+#define STM32_GPT_USE_TIM8 TRUE
diff --git a/keyboards/planck/ez/readme.md b/keyboards/planck/ez/readme.md
index 247bf7448a..f85ab59693 100644
--- a/keyboards/planck/ez/readme.md
+++ b/keyboards/planck/ez/readme.md
@@ -4,24 +4,26 @@
A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting.
-Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
+Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert), [Drashna Jael're](https://github.com/drashna)
Hardware Supported: Planck EZ
-Hardware Availability: [ergodox-ez.com](https://ergodox-ez.com/pages/planck)
+Hardware Availability: [ZSA](https://www.zsa.io/planck/)
Make example for this keyboard (after setting up your build environment):
- make planck/ez:default
-
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
-
-# Planck EZ Glow
+ make planck/ez:oryx
For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example:
- make planck/ez/glow:default
+ make planck/ez/glow:oryx
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Planck EZ Configuration (from Oryx)
+To enable the features from Oryx (ZSA's Configurator), either compile the the `oryx` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file.
+
+This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR`, and `LED_LEVEL` keycodes. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. The `LED_LEVEL` cycles through the brightness levels for the front "teeth" LEDs.
+
### Indicator LEDs
The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage)
diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk
index a146c65aa9..bc18497a74 100644..100755
--- a/keyboards/planck/ez/rules.mk
+++ b/keyboards/planck/ez/rules.mk
@@ -1,24 +1,34 @@
# MCU name
MCU = STM32F303
+# Bootloader selection
+BOOTLOADER = stm32-dfu
+
# Build Options
-# comment out to disable the options.
+
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
#
-BACKLIGHT_ENABLE = no
-BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
-## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
-#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
-NKRO_ENABLE = yes # USB Nkey Rollover
-AUDIO_ENABLE = yes
+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
+AUDIO_ENABLE = yes # Audio output on port C6
RGBLIGHT_ENABLE = no
-# SERIAL_LINK_ENABLE = yes
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
ENCODER_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3737
-LAYOUTS += ortho_4x12
-
MOUSE_SHARED_EP = no
+
+LAYOUTS_HAS_RGB = no
+
+RGB_MATRIX_SUPPORTED = yes
+RGBLIGHT_SUPPORTED = no
+BAKCLIGHT_SUPPORTED = no
diff --git a/keyboards/planck/info.json b/keyboards/planck/info.json
index 765d7d06ad..a4710d781f 100644
--- a/keyboards/planck/info.json
+++ b/keyboards/planck/info.json
@@ -1,112 +1,107 @@
{
"keyboard_name": "Planck",
- "keyboard_folder": "planck",
"url": "https://olkb.com/planck",
"maintainer": "jackhumbert",
- "width": 12,
- "height": 4,
"layouts": {
- "LAYOUT_planck_mit": {
- "key_count": 47,
- "layout": [
- { "w": 1, "x": 0, "y": 0 },
- { "w": 1, "x": 1, "y": 0 },
- { "w": 1, "x": 2, "y": 0 },
- { "w": 1, "x": 3, "y": 0 },
- { "w": 1, "x": 4, "y": 0 },
- { "w": 1, "x": 5, "y": 0 },
- { "w": 1, "x": 6, "y": 0 },
- { "w": 1, "x": 7, "y": 0 },
- { "w": 1, "x": 8, "y": 0 },
- { "w": 1, "x": 9, "y": 0 },
- { "w": 1, "x": 10, "y": 0 },
- { "w": 1, "x": 11, "y": 0 },
- { "w": 1, "x": 0, "y": 1 },
- { "w": 1, "x": 1, "y": 1 },
- { "w": 1, "x": 2, "y": 1 },
- { "w": 1, "x": 3, "y": 1 },
- { "w": 1, "x": 4, "y": 1 },
- { "w": 1, "x": 5, "y": 1 },
- { "w": 1, "x": 6, "y": 1 },
- { "w": 1, "x": 7, "y": 1 },
- { "w": 1, "x": 8, "y": 1 },
- { "w": 1, "x": 9, "y": 1 },
- { "w": 1, "x": 10, "y": 1 },
- { "w": 1, "x": 11, "y": 1 },
- { "w": 1, "x": 0, "y": 2 },
- { "w": 1, "x": 1, "y": 2 },
- { "w": 1, "x": 2, "y": 2 },
- { "w": 1, "x": 3, "y": 2 },
- { "w": 1, "x": 4, "y": 2 },
- { "w": 1, "x": 5, "y": 2 },
- { "w": 1, "x": 6, "y": 2 },
- { "w": 1, "x": 7, "y": 2 },
- { "w": 1, "x": 8, "y": 2 },
- { "w": 1, "x": 9, "y": 2 },
- { "w": 1, "x": 10, "y": 2 },
- { "w": 1, "x": 11, "y": 2 },
- { "w": 1, "x": 0, "y": 3 },
- { "w": 1, "x": 1, "y": 3 },
- { "w": 1, "x": 2, "y": 3 },
- { "w": 1, "x": 3, "y": 3 },
- { "w": 1, "x": 4, "y": 3 },
- { "w": 2, "x": 5, "y": 3 },
- { "w": 1, "x": 7, "y": 3 },
- { "w": 1, "x": 8, "y": 3 },
- { "w": 1, "x": 9, "y": 3 },
- { "w": 1, "x": 10, "y": 3 },
+ "LAYOUT_planck_1x2uC": {
+ "layout": [
+ { "w": 1, "x": 0, "y": 0 },
+ { "w": 1, "x": 1, "y": 0 },
+ { "w": 1, "x": 2, "y": 0 },
+ { "w": 1, "x": 3, "y": 0 },
+ { "w": 1, "x": 4, "y": 0 },
+ { "w": 1, "x": 5, "y": 0 },
+ { "w": 1, "x": 6, "y": 0 },
+ { "w": 1, "x": 7, "y": 0 },
+ { "w": 1, "x": 8, "y": 0 },
+ { "w": 1, "x": 9, "y": 0 },
+ { "w": 1, "x": 10, "y": 0 },
+ { "w": 1, "x": 11, "y": 0 },
+ { "w": 1, "x": 0, "y": 1 },
+ { "w": 1, "x": 1, "y": 1 },
+ { "w": 1, "x": 2, "y": 1 },
+ { "w": 1, "x": 3, "y": 1 },
+ { "w": 1, "x": 4, "y": 1 },
+ { "w": 1, "x": 5, "y": 1 },
+ { "w": 1, "x": 6, "y": 1 },
+ { "w": 1, "x": 7, "y": 1 },
+ { "w": 1, "x": 8, "y": 1 },
+ { "w": 1, "x": 9, "y": 1 },
+ { "w": 1, "x": 10, "y": 1 },
+ { "w": 1, "x": 11, "y": 1 },
+ { "w": 1, "x": 0, "y": 2 },
+ { "w": 1, "x": 1, "y": 2 },
+ { "w": 1, "x": 2, "y": 2 },
+ { "w": 1, "x": 3, "y": 2 },
+ { "w": 1, "x": 4, "y": 2 },
+ { "w": 1, "x": 5, "y": 2 },
+ { "w": 1, "x": 6, "y": 2 },
+ { "w": 1, "x": 7, "y": 2 },
+ { "w": 1, "x": 8, "y": 2 },
+ { "w": 1, "x": 9, "y": 2 },
+ { "w": 1, "x": 10, "y": 2 },
+ { "w": 1, "x": 11, "y": 2 },
+ { "w": 1, "x": 0, "y": 3 },
+ { "w": 1, "x": 1, "y": 3 },
+ { "w": 1, "x": 2, "y": 3 },
+ { "w": 1, "x": 3, "y": 3 },
+ { "w": 1, "x": 4, "y": 3 },
+ { "w": 2, "x": 5, "y": 3 },
+ { "w": 1, "x": 7, "y": 3 },
+ { "w": 1, "x": 8, "y": 3 },
+ { "w": 1, "x": 9, "y": 3 },
+ { "w": 1, "x": 10, "y": 3 },
{ "w": 1, "x": 11, "y": 3 } ]
},
- "LAYOUT_planck_grid": {
- "key_count": 48,
- "layout": [
- { "w": 1, "x": 0, "y": 0 },
- { "w": 1, "x": 1, "y": 0 },
- { "w": 1, "x": 2, "y": 0 },
- { "w": 1, "x": 3, "y": 0 },
- { "w": 1, "x": 4, "y": 0 },
- { "w": 1, "x": 5, "y": 0 },
- { "w": 1, "x": 6, "y": 0 },
- { "w": 1, "x": 7, "y": 0 },
- { "w": 1, "x": 8, "y": 0 },
- { "w": 1, "x": 9, "y": 0 },
- { "w": 1, "x": 10, "y": 0 },
- { "w": 1, "x": 11, "y": 0 },
- { "w": 1, "x": 0, "y": 1 },
- { "w": 1, "x": 1, "y": 1 },
- { "w": 1, "x": 2, "y": 1 },
- { "w": 1, "x": 3, "y": 1 },
- { "w": 1, "x": 4, "y": 1 },
- { "w": 1, "x": 5, "y": 1 },
- { "w": 1, "x": 6, "y": 1 },
- { "w": 1, "x": 7, "y": 1 },
- { "w": 1, "x": 8, "y": 1 },
- { "w": 1, "x": 9, "y": 1 },
- { "w": 1, "x": 10, "y": 1 },
- { "w": 1, "x": 11, "y": 1 },
- { "w": 1, "x": 0, "y": 2 },
- { "w": 1, "x": 1, "y": 2 },
- { "w": 1, "x": 2, "y": 2 },
- { "w": 1, "x": 3, "y": 2 },
- { "w": 1, "x": 4, "y": 2 },
- { "w": 1, "x": 5, "y": 2 },
- { "w": 1, "x": 6, "y": 2 },
- { "w": 1, "x": 7, "y": 2 },
- { "w": 1, "x": 8, "y": 2 },
- { "w": 1, "x": 9, "y": 2 },
- { "w": 1, "x": 10, "y": 2 },
- { "w": 1, "x": 11, "y": 2 },
- { "w": 1, "x": 0, "y": 3 },
- { "w": 1, "x": 1, "y": 3 },
- { "w": 1, "x": 2, "y": 3 },
- { "w": 1, "x": 3, "y": 3 },
- { "w": 1, "x": 4, "y": 3 },
- { "w": 1, "x": 5, "y": 3 },
- { "w": 1, "x": 6, "y": 3 },
- { "w": 1, "x": 7, "y": 3 },
- { "w": 1, "x": 8, "y": 3 },
- { "w": 1, "x": 9, "y": 3 },
- { "w": 1, "x": 10, "y": 3 },
+ "LAYOUT_ortho_4x12": {
+ "layout": [
+ { "w": 1, "x": 0, "y": 0 },
+ { "w": 1, "x": 1, "y": 0 },
+ { "w": 1, "x": 2, "y": 0 },
+ { "w": 1, "x": 3, "y": 0 },
+ { "w": 1, "x": 4, "y": 0 },
+ { "w": 1, "x": 5, "y": 0 },
+ { "w": 1, "x": 6, "y": 0 },
+ { "w": 1, "x": 7, "y": 0 },
+ { "w": 1, "x": 8, "y": 0 },
+ { "w": 1, "x": 9, "y": 0 },
+ { "w": 1, "x": 10, "y": 0 },
+ { "w": 1, "x": 11, "y": 0 },
+ { "w": 1, "x": 0, "y": 1 },
+ { "w": 1, "x": 1, "y": 1 },
+ { "w": 1, "x": 2, "y": 1 },
+ { "w": 1, "x": 3, "y": 1 },
+ { "w": 1, "x": 4, "y": 1 },
+ { "w": 1, "x": 5, "y": 1 },
+ { "w": 1, "x": 6, "y": 1 },
+ { "w": 1, "x": 7, "y": 1 },
+ { "w": 1, "x": 8, "y": 1 },
+ { "w": 1, "x": 9, "y": 1 },
+ { "w": 1, "x": 10, "y": 1 },
+ { "w": 1, "x": 11, "y": 1 },
+ { "w": 1, "x": 0, "y": 2 },
+ { "w": 1, "x": 1, "y": 2 },
+ { "w": 1, "x": 2, "y": 2 },
+ { "w": 1, "x": 3, "y": 2 },
+ { "w": 1, "x": 4, "y": 2 },
+ { "w": 1, "x": 5, "y": 2 },
+ { "w": 1, "x": 6, "y": 2 },
+ { "w": 1, "x": 7, "y": 2 },
+ { "w": 1, "x": 8, "y": 2 },
+ { "w": 1, "x": 9, "y": 2 },
+ { "w": 1, "x": 10, "y": 2 },
+ { "w": 1, "x": 11, "y": 2 },
+ { "w": 1, "x": 0, "y": 3 },
+ { "w": 1, "x": 1, "y": 3 },
+ { "w": 1, "x": 2, "y": 3 },
+ { "w": 1, "x": 3, "y": 3 },
+ { "w": 1, "x": 4, "y": 3 },
+ { "w": 1, "x": 5, "y": 3 },
+ { "w": 1, "x": 6, "y": 3 },
+ { "w": 1, "x": 7, "y": 3 },
+ { "w": 1, "x": 8, "y": 3 },
+ { "w": 1, "x": 9, "y": 3 },
+ { "w": 1, "x": 10, "y": 3 },
{ "w": 1, "x": 11, "y": 3 } ]
}
}
diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h
index 6fa31cc8a7..464b7b29f8 100644
--- a/keyboards/planck/keymaps/default/config.h
+++ b/keyboards/planck/keymaps/default/config.h
@@ -1,22 +1,33 @@
+/* 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
/*
* MIDI options
*/
-/* Prevent use of disabled MIDI features in the keymap */
-//#define MIDI_ENABLE_STRICT 1
-
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
@@ -36,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 bc72e360ba..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
@@ -17,7 +17,6 @@
#include QMK_KEYBOARD_H
#include "muse.h"
-extern keymap_config_t keymap_config;
enum planck_layers {
_QWERTY,
@@ -46,9 +45,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
@@ -64,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
@@ -82,9 +81,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
@@ -100,9 +99,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
@@ -118,9 +117,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
@@ -136,9 +135,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | S | T | P | H | * | * | F | P | L | T | D |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | S | K | W | R | * | * | R | B | G | S | Z |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Exit | | | A | O | | E | U | | | |
@@ -152,12 +151,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
/* Adjust (Lower + Raise)
+ * v------------------------RGB CONTROL--------------------v
* ,-----------------------------------------------------------------------------------.
- * | | Reset| | | | | | | | | | Del |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
@@ -208,12 +208,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
backlight_step();
#endif
#ifdef KEYBOARD_planck_rev5
- PORTE &= ~(1<<6);
+ writePinLow(E6);
#endif
} else {
unregister_code(KC_RSFT);
#ifdef KEYBOARD_planck_rev5
- PORTE |= (1<<6);
+ writePinHigh(E6);
#endif
}
return false;
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -274,65 +274,72 @@ void encoder_update(bool clockwise) {
} else {
if (clockwise) {
#ifdef MOUSEKEY_ENABLE
- register_code(KC_MS_WH_DOWN);
- unregister_code(KC_MS_WH_DOWN);
+ tap_code(KC_MS_WH_DOWN);
#else
- register_code(KC_PGDN);
- unregister_code(KC_PGDN);
+ tap_code(KC_PGDN);
#endif
} else {
#ifdef MOUSEKEY_ENABLE
- register_code(KC_MS_WH_UP);
- unregister_code(KC_MS_WH_UP);
+ tap_code(KC_MS_WH_UP);
#else
- register_code(KC_PGUP);
- unregister_code(KC_PGUP);
+ tap_code(KC_PGUP);
#endif
}
}
+ return true;
}
-void dip_switch_update_user(uint8_t index, bool active) {
- switch (index) {
- case 0:
- if (active) {
- #ifdef AUDIO_ENABLE
- PLAY_SONG(plover_song);
- #endif
- layer_on(_ADJUST);
- } else {
- #ifdef AUDIO_ENABLE
- PLAY_SONG(plover_gb_song);
- #endif
- layer_off(_ADJUST);
- }
- break;
- case 1:
- if (active) {
- muse_mode = true;
- } else {
- muse_mode = false;
- #ifdef AUDIO_ENABLE
- stop_all_notes();
- #endif
- }
- }
+bool dip_switch_update_user(uint8_t index, bool active) {
+ switch (index) {
+ case 0: {
+#ifdef AUDIO_ENABLE
+ static bool play_sound = false;
+#endif
+ if (active) {
+#ifdef AUDIO_ENABLE
+ if (play_sound) { PLAY_SONG(plover_song); }
+#endif
+ layer_on(_ADJUST);
+ } else {
+#ifdef AUDIO_ENABLE
+ if (play_sound) { PLAY_SONG(plover_gb_song); }
+#endif
+ layer_off(_ADJUST);
+ }
+#ifdef AUDIO_ENABLE
+ play_sound = true;
+#endif
+ break;
+ }
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ }
+ }
+ return true;
}
void matrix_scan_user(void) {
- #ifdef AUDIO_ENABLE
+#ifdef AUDIO_ENABLE
if (muse_mode) {
- if (muse_counter == 0) {
- uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
- if (muse_note != last_muse_note) {
- stop_note(compute_freq_for_midi_note(last_muse_note));
- play_note(compute_freq_for_midi_note(muse_note), 0xF);
- last_muse_note = muse_note;
+ if (muse_counter == 0) {
+ uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
+ if (muse_note != last_muse_note) {
+ stop_note(compute_freq_for_midi_note(last_muse_note));
+ play_note(compute_freq_for_midi_note(muse_note), 0xF);
+ last_muse_note = muse_note;
+ }
+ }
+ muse_counter = (muse_counter + 1) % muse_tempo;
+ } else {
+ if (muse_counter) {
+ stop_all_notes();
+ muse_counter = 0;
}
- }
- muse_counter = (muse_counter + 1) % muse_tempo;
}
- #endif
+#endif
}
bool music_mask_user(uint16_t keycode) {
diff --git a/keyboards/planck/keymaps/oryx/config.h b/keyboards/planck/keymaps/oryx/config.h
index d46cb36945..d0313de699 100644
--- a/keyboards/planck/keymaps/oryx/config.h
+++ b/keyboards/planck/keymaps/oryx/config.h
@@ -1,7 +1,24 @@
+/* Copyright 2020 ZSA Technology Inc
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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(PLANCK_SOUND)
#endif
#define MIDI_BASIC
@@ -14,3 +31,11 @@
*/
#define LAYER_STATE_8BIT
+#define ORYX_CONFIGURATOR
+#define USB_SUSPEND_WAKEUP_DELAY 0
+#define FIRMWARE_VERSION u8"vAxxa/ZlQEV"
+#define RGB_MATRIX_STARTUP_SPD 60
+
+#define PLANCK_EZ_LED_LOWER 1
+#define PLANCK_EZ_LED_RAISE 2
+#define PLANCK_EZ_LED_ADJUST 3
diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c
index 55a9168dca..2ce5dc3c5e 100644
--- a/keyboards/planck/keymaps/oryx/keymap.c
+++ b/keyboards/planck/keymaps/oryx/keymap.c
@@ -1,136 +1,153 @@
+/* Copyright 2020 ZSA Technology Inc
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * 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/>.
+ */
+
#include QMK_KEYBOARD_H
-#include "muse.h"
-#include "eeprom.h"
-#include "keymap_german.h"
-#include "keymap_nordic.h"
-#include "keymap_french.h"
-#include "keymap_spanish.h"
-#include "keymap_hungarian.h"
-#include "keymap_swedish.h"
-
-#define KC_MAC_UNDO LGUI(KC_U)
-#define KC_MAC_CUT LGUI(KC_X)
-#define KC_MAC_COPY LGUI(KC_C)
-#define KC_MAC_PASTE LGUI(KC_V)
-#define KC_PC_UNDO LCTL(KC_U)
-#define KC_PC_CUT LCTL(KC_X)
-#define KC_PC_COPY LCTL(KC_C)
-#define KC_PC_PASTE LCTL(KC_V)
enum planck_keycodes {
- RGB_SLD = SAFE_RANGE,
- EPRM,
+ RGB_SLD = EZ_SAFE_RANGE,
};
enum planck_layers {
- _BASE,
- _LOWER,
- _RAISE,
- _ADJUST,
+ _BASE,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
};
+# define LOWER MO(_LOWER)
+# define RAISE MO(_RAISE)
-#define LOWER MO(_LOWER)
-#define RAISE MO(_RAISE)
-
+// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_planck_grid(KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSPACE,KC_ESCAPE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCOLON,KC_QUOTE,KC_LSHIFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMMA,KC_DOT,KC_SLASH,KC_ENTER,KC_TRANSPARENT,KC_LCTRL,KC_LALT,KC_LGUI,LOWER,KC_SPACE,KC_NO,RAISE,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT),
-
- [_LOWER] = LAYOUT_planck_grid(KC_TILD,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_TRANSPARENT,KC_DELETE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_NONUS_HASH,KC_NONUS_BSLASH,KC_HOME,KC_END,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_NO,KC_TRANSPARENT,KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_MEDIA_PLAY_PAUSE),
-
- [_RAISE] = LAYOUT_planck_grid(KC_GRAVE,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_TRANSPARENT,KC_DELETE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_MINUS,KC_EQUAL,KC_LBRACKET,KC_RBRACKET,KC_BSLASH,KC_TRANSPARENT,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_NONUS_HASH,KC_NONUS_BSLASH,KC_PGUP,KC_PGDOWN,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_NO,KC_TRANSPARENT,KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_MEDIA_PLAY_PAUSE),
-
- [_ADJUST] = LAYOUT_planck_grid(KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_DELETE,KC_TRANSPARENT,AU_ON,AU_OFF,AU_TOG,KC_TRANSPARENT,KC_TRANSPARENT,RGB_TOG,RGB_VAI,RGB_VAD,KC_TRANSPARENT,RESET,KC_TRANSPARENT,KC_TRANSPARENT,MU_ON,MU_OFF,MU_TOG,KC_TRANSPARENT,KC_TRANSPARENT,RGB_MOD,RGB_HUI,RGB_HUD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_NO,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT),
+ [_BASE] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE,
+ KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
+ KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_ENTER,
+ WEBUSB_PAIR, KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPACE, KC_NO, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+ ),
+
+ [_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ KC_DELETE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH,KC_HOME, KC_END, _______,
+ KC_COMMA, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_MEDIA_PLAY_PAUSE
+ ),
+
+ [_RAISE] = LAYOUT_planck_grid(
+ KC_GRAVE,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINUS, KC_EQUAL, KC_LBRACKET, KC_RBRACKET, KC_BSLASH,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH,KC_PGUP, KC_PGDOWN, _______,
+ _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_MEDIA_PLAY_PAUSE
+ ),
+
+ [_ADJUST] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_DEL, _______, AU_ON, AU_OFF, AU_TOG, _______, _______, RGB_TOG, RGB_VAI, RGB_VAD, LED_LEVEL, RESET,
+ _______, _______, MU_ON, MU_OFF, MU_TOG, _______, _______, RGB_MOD, RGB_HUI, RGB_HUD, TOGGLE_LAYER_COLOR, _______,
+ _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______
+ ),
};
+// clang-format on
+#ifdef RGB_MATRIX_EANBLE
+const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
+ [0] = {{42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {146, 224, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {42, 255, 255}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}, {32, 255, 234}},
+ [1] = {{89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {169, 120, 255}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}, {89, 255, 246}},
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case EPRM:
- if (record->event.pressed) {
- eeconfig_init();
- }
- return false;
-#ifdef RGBLIGHT_ENABLE
- case RGB_SLD:
- if (record->event.pressed) {
- rgblight_mode(1);
- }
- return false;
-#endif
- }
- return true;
-}
+ [2] = {{216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {249, 228, 255}, {249, 228, 255}, {249, 228, 255}, {216, 255, 255}, {216, 255, 255}, {105, 255, 255}, {105, 255, 255}, {105, 255, 255}, {216, 255, 255}, {14, 255, 255}, {216, 255, 255}, {216, 255, 255}, {249, 228, 255}, {249, 228, 255}, {249, 228, 255}, {216, 255, 255}, {216, 255, 255}, {105, 255, 255}, {105, 255, 255}, {105, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}, {216, 255, 255}},
-bool muse_mode = false;
-uint8_t last_muse_note = 0;
-uint16_t muse_counter = 0;
-uint8_t muse_offset = 70;
-uint16_t muse_tempo = 50;
-
-void encoder_update(bool clockwise) {
- if (muse_mode) {
- if (IS_LAYER_ON(_RAISE)) {
- if (clockwise) {
- muse_offset++;
- } else {
- muse_offset--;
- }
- } else {
- if (clockwise) {
- muse_tempo+=1;
- } else {
- muse_tempo-=1;
- }
- }
- } else {
- if (clockwise) {
- #ifdef MOUSEKEY_ENABLE
- register_code(KC_MS_WH_DOWN);
- unregister_code(KC_MS_WH_DOWN);
- #else
- register_code(KC_PGDN);
- unregister_code(KC_PGDN);
- #endif
+};
+
+void set_layer_color(int layer) {
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ HSV hsv = {
+ .h = pgm_read_byte(&ledmap[layer][i][0]),
+ .s = pgm_read_byte(&ledmap[layer][i][1]),
+ .v = pgm_read_byte(&ledmap[layer][i][2]),
+ };
+ if (!hsv.h && !hsv.s && !hsv.v) {
+ rgb_matrix_set_color(i, 0, 0, 0);
} else {
- #ifdef MOUSEKEY_ENABLE
- register_code(KC_MS_WH_UP);
- unregister_code(KC_MS_WH_UP);
- #else
- register_code(KC_PGUP);
- unregister_code(KC_PGUP);
- #endif
+ RGB rgb = hsv_to_rgb(hsv);
+ float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX;
+ rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b);
}
}
}
-void matrix_scan_user(void) {
-#ifdef AUDIO_ENABLE
- if (muse_mode) {
- if (muse_counter == 0) {
- uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
- if (muse_note != last_muse_note) {
- stop_note(compute_freq_for_midi_note(last_muse_note));
- play_note(compute_freq_for_midi_note(muse_note), 0xF);
- last_muse_note = muse_note;
+void rgb_matrix_indicators_user(void) {
+ if (g_suspend_state || keyboard_config.disable_layer_led) {
+ return;
+ }
+ switch (biton32(layer_state)) {
+ case 1:
+ set_layer_color(0);
+ break;
+ case 2:
+ set_layer_color(1);
+ break;
+ case 3:
+ set_layer_color(2);
+ break;
+ default:
+ if (rgb_matrix_get_flags() == LED_FLAG_NONE) rgb_matrix_set_color_all(0, 0, 0);
+ break;
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case RGB_SLD:
+ if (record->event.pressed) {
+ rgblight_mode(1);
}
- }
- muse_counter = (muse_counter + 1) % muse_tempo;
+ return false;
}
+ return true;
+}
#endif
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (clockwise) {
+# ifdef MOUSEKEY_ENABLE
+ tap_code(KC_MS_WH_DOWN);
+# else
+ tap_code(KC_PGDN);
+# endif
+ } else {
+# ifdef MOUSEKEY_ENABLE
+ tap_code(KC_MS_WH_UP);
+# else
+ tap_code(KC_PGUP);
+# endif
+ }
+ return true;
}
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
- case RAISE:
- case LOWER:
- return false;
- default:
- return true;
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
}
}
-layer_state_t layer_state_set_user(layer_state_t state) {
- return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
-}
+
+layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }
diff --git a/keyboards/planck/keymaps/oryx/rules.mk b/keyboards/planck/keymaps/oryx/rules.mk
index 27ab9be851..1e29b5f218 100644
--- a/keyboards/planck/keymaps/oryx/rules.mk
+++ b/keyboards/planck/keymaps/oryx/rules.mk
@@ -1,6 +1,7 @@
-SRC += muse.c
# Set any rules.mk overrides for your specific keymap here.
# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file
+CONSOLE_ENABLE = no
COMMAND_ENABLE = no
MOUSEKEY_ENABLE = no
+WEBUSB_ENABLE = yes
ORYX_ENABLE = yes
diff --git a/keyboards/planck/keymaps/webusb/config.h b/keyboards/planck/keymaps/webusb/config.h
index 6fa31cc8a7..9020d2b9f8 100644
--- a/keyboards/planck/keymaps/webusb/config.h
+++ b/keyboards/planck/keymaps/webusb/config.h
@@ -14,9 +14,6 @@
* MIDI options
*/
-/* Prevent use of disabled MIDI features in the keymap */
-//#define MIDI_ENABLE_STRICT 1
-
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
diff --git a/keyboards/planck/keymaps/webusb/keymap.c b/keyboards/planck/keymaps/webusb/keymap.c
index f9d6998940..ee77bf007c 100644
--- a/keyboards/planck/keymaps/webusb/keymap.c
+++ b/keyboards/planck/keymaps/webusb/keymap.c
@@ -68,7 +68,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -102,6 +102,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return false;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c
index d9e3f00f2b..a17036fcf1 100644
--- a/keyboards/planck/planck.c
+++ b/keyboards/planck/planck.c
@@ -2,7 +2,7 @@
#ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak))
-const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
@@ -12,10 +12,10 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
__attribute__ ((weak))
void matrix_init_kb(void) {
- // Turn status LED on
- #ifdef __AVR__
- DDRE |= (1<<6);
- PORTE |= (1<<6);
+ // Turn status LED on, with the exception of THK
+ #if defined(__AVR_ATmega32U4__)
+ setPinOutput(E6);
+ writePinHigh(E6);
#endif
matrix_init_user();
@@ -26,4 +26,4 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_planck_grid(
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
-); \ No newline at end of file
+);
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h
index d575112d36..0d5c14fdac 100644
--- a/keyboards/planck/planck.h
+++ b/keyboards/planck/planck.h
@@ -1,9 +1,23 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ *
+ * 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
#include "quantum.h"
-#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
-
#if defined(KEYBOARD_planck_ez)
# include "ez.h"
#endif // Planck revisions
diff --git a/keyboards/planck/readme.md b/keyboards/planck/readme.md
index d8591953b4..748c251478 100644
--- a/keyboards/planck/readme.md
+++ b/keyboards/planck/readme.md
@@ -15,6 +15,7 @@ Make example for this keyboard (after setting up your build environment):
Install examples:
- make planck/rev6:default:dfu-util
+ make planck/rev5:default:dfu # For Planck rev5 or earlier and Planck Light
+ make planck/rev6:default:dfu-util # For Planck rev6
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk
deleted file mode 100644
index 09d4a74ea6..0000000000
--- a/keyboards/planck/rules.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
-# the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = no # 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
-MIDI_ENABLE = no # MIDI controls
-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.
-API_SYSEX_ENABLE = no
-
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
-LAYOUTS = ortho_4x12 planck_mit planck_grid
-LAYOUTS_HAS_RGB = no
-
-DEFAULT_FOLDER = planck/ez