summaryrefslogtreecommitdiff
path: root/keyboards/hub20
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
committerNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
commitbacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch)
treed4e3e57aac1a829a191831efd2e62c8a43217885 /keyboards/hub20
parentd70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff)
parentb865b9e1706ad28ae4882bd2e0331e98808295fa (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/hub20')
-rw-r--r--keyboards/hub20/config.h12
-rw-r--r--keyboards/hub20/info.json8
-rw-r--r--keyboards/hub20/keymaps/macro/keymap.c6
-rw-r--r--keyboards/hub20/rules.mk6
4 files changed, 11 insertions, 21 deletions
diff --git a/keyboards/hub20/config.h b/keyboards/hub20/config.h
index 8452eab0c9..41a98ac983 100644
--- a/keyboards/hub20/config.h
+++ b/keyboards/hub20/config.h
@@ -18,21 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-/* key matrix */
-#define MATRIX_ROWS 6
-#define MATRIX_COLS 4
-
#define MATRIX_ROW_PINS { A13, B14, A10, A0, A2, A1 }
#define MATRIX_COL_PINS { A6, A7, B7, B6 }
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-/* Rotary Encoder Things */
-// #define ENCODER_DIRECTION_FLIP
-#define ENCODERS_PAD_A { B12, A8 }
-#define ENCODERS_PAD_B { B13, A9 }
-
#define RGB_DI_PIN B15
#define RGBLED_NUM 27
@@ -93,9 +84,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCE 5
-
/* Tap delay for tap vs hold */
#define TAPPING_TERM 200
diff --git a/keyboards/hub20/info.json b/keyboards/hub20/info.json
index 3f829a3c7b..10ec779fdf 100644
--- a/keyboards/hub20/info.json
+++ b/keyboards/hub20/info.json
@@ -8,6 +8,14 @@
"pid": "0x4414",
"device_version": "0.0.1"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B12", "pin_b": "B13"},
+ {"pin_a": "A8", "pin_b": "A9"}
+ ]
+ },
+ "processor": "STM32F072",
+ "bootloader": "stm32-dfu",
"layouts": {
"LAYOUT_all": {
"layout": [
diff --git a/keyboards/hub20/keymaps/macro/keymap.c b/keyboards/hub20/keymaps/macro/keymap.c
index 5fb1891ea7..c9e735d389 100644
--- a/keyboards/hub20/keymaps/macro/keymap.c
+++ b/keyboards/hub20/keymaps/macro/keymap.c
@@ -25,14 +25,14 @@ enum keyboard_layers{
};
// Tap Dance stuff
-void td_ctrl (qk_tap_dance_state_t *state, void *user_data);
+void td_ctrl (tap_dance_state_t *state, void *user_data);
enum tap_dance {
CTRL = 0,
BASE = 1
};
-qk_tap_dance_action_t tap_dance_actions[] = {
+tap_dance_action_t tap_dance_actions[] = {
// Tap once for standard key, twice to toggle layers
[CTRL] = ACTION_TAP_DANCE_FN(td_ctrl),
[BASE] = ACTION_TAP_DANCE_LAYER_MOVE(_______, _BASE)
@@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
// Below works around TD() not running key press through process_record_user
-void td_ctrl (qk_tap_dance_state_t *state, void *user_data) {
+void td_ctrl (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_code(KC_WRAP);
tap_code(KC_D);
diff --git a/keyboards/hub20/rules.mk b/keyboards/hub20/rules.mk
index 96702a3a76..2dd9c5acc6 100644
--- a/keyboards/hub20/rules.mk
+++ b/keyboards/hub20/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = STM32F072
-
-# Bootloader selection
-BOOTLOADER = stm32-dfu
-
# Build Options
# change yes to no to disable
#