summaryrefslogtreecommitdiff
path: root/keyboards/planck
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/ez/config.h3
-rw-r--r--keyboards/planck/ez/info.json3
-rw-r--r--keyboards/planck/keymaps/mwpeterson/keymap.c2
-rw-r--r--keyboards/planck/keymaps/vaire/keymap.c19
-rw-r--r--keyboards/planck/keymaps/zach/zach_common_functions.c60
-rw-r--r--keyboards/planck/rev6/config.h3
-rw-r--r--keyboards/planck/rev6/info.json3
-rw-r--r--keyboards/planck/rev6_drop/config.h3
-rw-r--r--keyboards/planck/rev6_drop/info.json3
-rw-r--r--keyboards/planck/thk/config.h2
-rw-r--r--keyboards/planck/thk/info.json3
11 files changed, 55 insertions, 49 deletions
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index 3b10a2b753..7cfc65d509 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -42,7 +42,6 @@
//#define NO_ACTION_ONESHOT
// #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
@@ -111,8 +110,6 @@
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define TAPPING_TOGGLE 1
-
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json
index 370a19357f..0bb9d35ca2 100644
--- a/keyboards/planck/ez/info.json
+++ b/keyboards/planck/ez/info.json
@@ -21,6 +21,9 @@
},
"processor": "STM32F303",
"bootloader": "stm32-dfu",
+ "tapping": {
+ "toggle": 1
+ },
"community_layouts": ["ortho_4x12", "planck_mit"],
"layout_aliases": {
"LAYOUT_planck_grid": "LAYOUT_ortho_4x12",
diff --git a/keyboards/planck/keymaps/mwpeterson/keymap.c b/keyboards/planck/keymaps/mwpeterson/keymap.c
index 5871fe4bfe..065750434f 100644
--- a/keyboards/planck/keymaps/mwpeterson/keymap.c
+++ b/keyboards/planck/keymaps/mwpeterson/keymap.c
@@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LOWER_LAYER] = LAYOUT_planck_grid(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3),
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
- _______, KC_MINS, KC_PLUS, KC_GRV, SFT_INS, KC_COLN, KC_PIPE, X(IBANG), KC_COMM, KC_DOT, KC_BSLS, _______,
+ _______, KC_MINS, KC_PLUS, KC_GRV, SFT_INS, KC_COLN, KC_PIPE, UM(IBANG), KC_COMM, KC_DOT, KC_BSLS, _______,
_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______
),
diff --git a/keyboards/planck/keymaps/vaire/keymap.c b/keyboards/planck/keymaps/vaire/keymap.c
index 05f7f4a520..f58486cda8 100644
--- a/keyboards/planck/keymaps/vaire/keymap.c
+++ b/keyboards/planck/keymaps/vaire/keymap.c
@@ -80,47 +80,48 @@ void matrix_init_user(void)
println("Matrix Init");
}
-void led_set_user(uint8_t usb_led)
+bool led_update_user(led_t led_state)
{
- static uint8_t old_usb_led = 0;
+ static led_t old_led_state = {0};
_delay_ms(10); // gets rid of tick
if (!is_playing_notes())
{
- if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
+ if (led_state.caps_lock && !old_led_state.caps_lock)
{
// If CAPS LK LED is turning on...
PLAY_SONG(tone_caps_on);
}
- else if (!(usb_led & (1<<USB_LED_CAPS_LOCK)) && (old_usb_led & (1<<USB_LED_CAPS_LOCK)))
+ else if (!led_state.caps_lock && old_led_state.caps_lock)
{
// If CAPS LK LED is turning off...
PLAY_SONG(tone_caps_off);
}
- else if ((usb_led & (1<<USB_LED_NUM_LOCK)) && !(old_usb_led & (1<<USB_LED_NUM_LOCK)))
+ else if (led_state.num_lock && !old_led_state.num_lock)
{
// If NUM LK LED is turning on...
PLAY_SONG(tone_numlk_on);
}
- else if (!(usb_led & (1<<USB_LED_NUM_LOCK)) && (old_usb_led & (1<<USB_LED_NUM_LOCK)))
+ else if (!led_state.num_lock && old_led_state.num_lock)
{
// If NUM LED is turning off...
PLAY_SONG(tone_numlk_off);
}
- else if ((usb_led & (1<<USB_LED_SCROLL_LOCK)) && !(old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
+ else if (led_state.scroll_lock && !old_led_state.scroll_lock)
{
// If SCROLL LK LED is turning on...
PLAY_SONG(tone_scroll_on);
}
- else if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)) && (old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
+ else if (!led_state.scroll_lock && old_led_state.scroll_lock)
{
// If SCROLL LED is turning off...
PLAY_SONG(tone_scroll_off);
}
}
- old_usb_led = usb_led;
+ old_led_state = led_state;
+ return false;
}
diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c
index 6ad1c7bed3..ae5f44e713 100644
--- a/keyboards/planck/keymaps/zach/zach_common_functions.c
+++ b/keyboards/planck/keymaps/zach/zach_common_functions.c
@@ -141,31 +141,31 @@ tap_dance_action_t tap_dance_actions[] = {
//#ifdef UNICODE_ENABLE
// Unicode shortcuts
-#define IBANG X(0x203D)
-#define RAROW X(0x2192)
-#define LAROW X(0x2190)
-#define DEGREE X(0x00B0)
-#define OMEGA X(0x03A9)
-#define WOMEGA X(0x03C9)
-#define MICRO X(0x00B5)
-#define PLUMIN X(0x00B1)
-#define SUPA2 X(0x00B2)
-#define ROMAN1 X(0x2160)
-#define ROMAN2 X(0x2161)
-#define ROMAN3 X(0x2162)
-#define ROMAN4 X(0x2163)
-#define ROMAN5 X(0x2164)
-#define ROMAN6 X(0x2165)
-#define ROMAN7 X(0x2166)
-#define roman1 X(0x2170)
-#define roman2 X(0x2171)
-#define roman3 X(0x2172)
-#define roman4 X(0x2173)
-#define roman5 X(0x2174)
-#define roman6 X(0x2175)
-#define roman7 X(0x2176)
+#define IBANG UM(0x203D)
+#define RAROW UM(0x2192)
+#define LAROW UM(0x2190)
+#define DEGREE UM(0x00B0)
+#define OMEGA UM(0x03A9)
+#define WOMEGA UM(0x03C9)
+#define MICRO UM(0x00B5)
+#define PLUMIN UM(0x00B1)
+#define SUPA2 UM(0x00B2)
+#define ROMAN1 UM(0x2160)
+#define ROMAN2 UM(0x2161)
+#define ROMAN3 UM(0x2162)
+#define ROMAN4 UM(0x2163)
+#define ROMAN5 UM(0x2164)
+#define ROMAN6 UM(0x2165)
+#define ROMAN7 UM(0x2166)
+#define roman1 UM(0x2170)
+#define roman2 UM(0x2171)
+#define roman3 UM(0x2172)
+#define roman4 UM(0x2173)
+#define roman5 UM(0x2174)
+#define roman6 UM(0x2175)
+#define roman7 UM(0x2176)
-#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X(<unicode>)
+#ifdef UNICODEMAP_ENABLE
enum Ext_Unicode{
PENGUIN = 0,
BOAR,
@@ -182,12 +182,12 @@ const uint32_t unicode_map[] PROGMEM = {
[CHICK] = 0x1F425,
[TUMBLER] = 0x1F943
};
-#define PENGY X(PENGUIN)
-#define BOARY X(BOAR)
-#define MNKY X(MONKEY)
-#define DRGN X(DRAGON)
-#define DUCK X(CHICK)
-#define TMBL X(TUMBLER)
+#define PENGY UM(PENGUIN)
+#define BOARY UM(BOAR)
+#define MNKY UM(MONKEY)
+#define DRGN UM(DRAGON)
+#define DUCK UM(CHICK)
+#define TMBL UM(TUMBLER)
#endif
//#endif
diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h
index 1d029dae69..c0c8dc2c55 100644
--- a/keyboards/planck/rev6/config.h
+++ b/keyboards/planck/rev6/config.h
@@ -45,8 +45,7 @@
/*
* WS2812 Underglow Matrix options
*/
-#define RGBLED_NUM 9
-#define RGB_MATRIX_LED_COUNT RGBLED_NUM
+#define RGB_MATRIX_LED_COUNT 9
#define WS2812_PWM_DRIVER PWMD2
#define WS2812_PWM_CHANNEL 2
diff --git a/keyboards/planck/rev6/info.json b/keyboards/planck/rev6/info.json
index c1e4e527ce..ac0691721c 100644
--- a/keyboards/planck/rev6/info.json
+++ b/keyboards/planck/rev6/info.json
@@ -8,6 +8,9 @@
"pid": "0xA4F9",
"device_version": "0.0.6"
},
+ "rgblight": {
+ "led_count": 9
+ },
"ws2812": {
"pin": "A1",
"driver": "pwm"
diff --git a/keyboards/planck/rev6_drop/config.h b/keyboards/planck/rev6_drop/config.h
index ff15e9628d..7050fa009c 100644
--- a/keyboards/planck/rev6_drop/config.h
+++ b/keyboards/planck/rev6_drop/config.h
@@ -46,8 +46,7 @@
/*
* WS2812 Underglow Matrix options
*/
-#define RGBLED_NUM 9
-#define RGB_MATRIX_LED_COUNT RGBLED_NUM
+#define RGB_MATRIX_LED_COUNT 9
#define WS2812_PWM_DRIVER PWMD2
#define WS2812_PWM_CHANNEL 2
diff --git a/keyboards/planck/rev6_drop/info.json b/keyboards/planck/rev6_drop/info.json
index 00f1fab14e..c5450f45c0 100644
--- a/keyboards/planck/rev6_drop/info.json
+++ b/keyboards/planck/rev6_drop/info.json
@@ -8,6 +8,9 @@
"pid": "0xA4F9",
"device_version": "0.0.6"
},
+ "rgblight": {
+ "led_count": 9
+ },
"ws2812": {
"pin": "A1",
"driver": "pwm"
diff --git a/keyboards/planck/thk/config.h b/keyboards/planck/thk/config.h
index 832fb0789c..cfb88aa0eb 100644
--- a/keyboards/planck/thk/config.h
+++ b/keyboards/planck/thk/config.h
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define TAPPING_TOGGLE 3
-
#define DIP_SWITCH_PINS { D0, D1, D4, D6 }
// THK uses D5 for audio
diff --git a/keyboards/planck/thk/info.json b/keyboards/planck/thk/info.json
index e7321ba697..f62e074e68 100644
--- a/keyboards/planck/thk/info.json
+++ b/keyboards/planck/thk/info.json
@@ -21,6 +21,9 @@
},
"processor": "atmega32a",
"bootloader": "usbasploader",
+ "tapping": {
+ "toggle": 3
+ },
"layout_aliases": {
"LAYOUT_planck_grid": "LAYOUT_ortho_4x12",
"LAYOUT_planck_mit": "LAYOUT_planck_1x2uC"