summaryrefslogtreecommitdiffstats
path: root/keyboards/adafruit/macropad
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/adafruit/macropad
parentd70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff)
parentb865b9e1706ad28ae4882bd2e0331e98808295fa (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/adafruit/macropad')
-rw-r--r--keyboards/adafruit/macropad/config.h28
-rw-r--r--keyboards/adafruit/macropad/info.json45
-rw-r--r--keyboards/adafruit/macropad/macropad.c2
-rw-r--r--keyboards/adafruit/macropad/macropad.h38
-rw-r--r--keyboards/adafruit/macropad/rules.mk4
5 files changed, 33 insertions, 84 deletions
diff --git a/keyboards/adafruit/macropad/config.h b/keyboards/adafruit/macropad/config.h
index 99f4477990..c493c487e3 100644
--- a/keyboards/adafruit/macropad/config.h
+++ b/keyboards/adafruit/macropad/config.h
@@ -16,23 +16,6 @@
#pragma once
-#include "config_common.h"
-
-/* key matrix size */
-#define MATRIX_ROWS 5
-#define MATRIX_COLS 3
-
-/* Keyboard Matrix Assignments */
-// clang-format off
-#define DIRECT_PINS { \
- { NO_PIN, NO_PIN, GP0 }, \
- { GP1, GP2, GP3 }, \
- { GP4, GP5, GP6 }, \
- { GP7, GP8, GP9 }, \
- { GP10, GP11, GP12 } \
-}
-// clang-format on
-
/* OLED SPI Defines */
#define OLED_DISPLAY_128X64
#define OLED_IC OLED_IC_SH1106
@@ -54,17 +37,6 @@
#define SPI_MOSI_PIN GP27
#define SPI_MISO_PIN GP28
-/* Encoders */
-#define ENCODERS_PAD_A { GP18 }
-#define ENCODERS_PAD_B { GP17 }
-
-#define DEBOUNCE 5
-
-/* Bootmagic lite */
-/* (Press the key below the encoder button while plugging the keyboard to enter the bootloader and clear flash) */
-#define BOOTMAGIC_LITE_ROW 1
-#define BOOTMAGIC_LITE_COLUMN 2
-
/* Double tap the side button to enter bootloader */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP13
diff --git a/keyboards/adafruit/macropad/info.json b/keyboards/adafruit/macropad/info.json
index e9bd7d85b1..75c859adb1 100644
--- a/keyboards/adafruit/macropad/info.json
+++ b/keyboards/adafruit/macropad/info.json
@@ -8,22 +8,41 @@
"pid": "0x0108",
"device_version": "0.0.1"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "GP18", "pin_b": "GP17"}
+ ]
+ },
+ "bootmagic": {
+ "matrix": [1, 2]
+ },
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "matrix_pins": {
+ "direct": [
+ [null, null, "GP0"],
+ ["GP1", "GP2", "GP3"],
+ ["GP4", "GP5", "GP6"],
+ ["GP7", "GP8", "GP9"],
+ ["GP10", "GP11", "GP12"]
+ ]
+ },
"layouts": {
"LAYOUT": {
"layout": [
- {"label":"Mute", "x":2, "y":0},
- {"label":"Enter", "x":0, "y":1},
- {"label":"KC_0", "x":1, "y":1},
- {"label":"BackSpace", "x":2, "y":1},
- {"label":"KC_7", "x":0, "y":2},
- {"label":"KC_8", "x":1, "y":2},
- {"label":"KC_9", "x":2, "y":2},
- {"label":"KC_4", "x":0, "y":3},
- {"label":"KC_5", "x":1, "y":3},
- {"label":"KC_6", "x":2, "y":3},
- {"label":"KC_1", "x":0, "y":4},
- {"label":"KC_2", "x":1, "y":4},
- {"label":"KC_3", "x":2, "y":4}
+ {"x":2, "y":0, "matrix": [0, 2]},
+ {"x":0, "y":1, "matrix": [1, 0]},
+ {"x":1, "y":1, "matrix": [1, 1]},
+ {"x":2, "y":1, "matrix": [1, 2]},
+ {"x":0, "y":2, "matrix": [2, 0]},
+ {"x":1, "y":2, "matrix": [2, 1]},
+ {"x":2, "y":2, "matrix": [2, 2]},
+ {"x":0, "y":3, "matrix": [3, 0]},
+ {"x":1, "y":3, "matrix": [3, 1]},
+ {"x":2, "y":3, "matrix": [3, 2]},
+ {"x":0, "y":4, "matrix": [4, 0]},
+ {"x":1, "y":4, "matrix": [4, 1]},
+ {"x":2, "y":4, "matrix": [4, 2]}
]
}
}
diff --git a/keyboards/adafruit/macropad/macropad.c b/keyboards/adafruit/macropad/macropad.c
index a82a2dabb1..5cffdc6c97 100644
--- a/keyboards/adafruit/macropad/macropad.c
+++ b/keyboards/adafruit/macropad/macropad.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "macropad.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
diff --git a/keyboards/adafruit/macropad/macropad.h b/keyboards/adafruit/macropad/macropad.h
deleted file mode 100644
index 6e2e3524b7..0000000000
--- a/keyboards/adafruit/macropad/macropad.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@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 ___ KC_NO
-
-// clang-format off
- #define LAYOUT( \
- K02, \
- K10, K11, K12, \
- K20, K21, K22, \
- K30, K31, K32, \
- K40, K41, K42 \
- ) \
- { \
- { ___, ___, K02 }, \
- { K10, K11, K12 }, \
- { K20, K21, K22 }, \
- { K30, K31, K32 }, \
- { K40, K41, K42 } \
- }
-// clang-format on
diff --git a/keyboards/adafruit/macropad/rules.mk b/keyboards/adafruit/macropad/rules.mk
index 3636424a71..0d1e17dde1 100644
--- a/keyboards/adafruit/macropad/rules.mk
+++ b/keyboards/adafruit/macropad/rules.mk
@@ -1,7 +1,3 @@
-# MCU name
-MCU = RP2040
-# Bootloader selection
-BOOTLOADER = rp2040
# Build Options
# change yes to no to disable
#