summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranubhav dhiman <104914147+anubhavd7@users.noreply.github.com>2022-05-20 10:58:41 +0530
committerGitHub <noreply@github.com>2022-05-19 22:28:41 -0700
commitc7e114e0bb1d8ecb76de632c93db165695f06873 (patch)
tree5a3d6dfcd5a725f1b0107f0bf21c99c91fb60eff
parent38073c3d44f5e1093a529803cb724b744af91160 (diff)
[Keyboard] add rad keyboard (#17088)
Co-authored-by: zvecr <git@zvecr.com>
-rw-r--r--keyboards/rad/config.h33
-rw-r--r--keyboards/rad/info.json59
-rw-r--r--keyboards/rad/keymaps/default/keymap.c23
-rw-r--r--keyboards/rad/keymaps/default/readme.md1
-rw-r--r--keyboards/rad/keymaps/via/keymap.c41
-rw-r--r--keyboards/rad/keymaps/via/rules.mk1
-rw-r--r--keyboards/rad/rad.c15
-rw-r--r--keyboards/rad/rad.h29
-rw-r--r--keyboards/rad/readme.md24
-rw-r--r--keyboards/rad/rules.mk18
10 files changed, 244 insertions, 0 deletions
diff --git a/keyboards/rad/config.h b/keyboards/rad/config.h
new file mode 100644
index 0000000000..47048722b1
--- /dev/null
+++ b/keyboards/rad/config.h
@@ -0,0 +1,33 @@
+/*
+ * 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 "config_common.h"
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 3
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D7, C6, B6, D0 }
+#define MATRIX_COL_PINS { B5, B4, E6 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Bootmagic key configuration */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 2
diff --git a/keyboards/rad/info.json b/keyboards/rad/info.json
new file mode 100644
index 0000000000..b8098c89a9
--- /dev/null
+++ b/keyboards/rad/info.json
@@ -0,0 +1,59 @@
+{
+ "keyboard_name": "rad",
+ "manufacturer": "anubhavd7",
+ "usb": {
+ "vid": "0xFEED",
+ "pid": "0x6060",
+ "device_version": "0.0.1"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {
+ "x": 1,
+ "y": 0
+ },
+ {
+ "x": 2,
+ "y": 0
+ },
+ {
+ "x": 0,
+ "y": 1
+ },
+ {
+ "x": 1,
+ "y": 1
+ },
+ {
+ "x": 2,
+ "y": 1
+ },
+ {
+ "x": 0,
+ "y": 2
+ },
+ {
+ "x": 1,
+ "y": 2
+ },
+ {
+ "x": 2,
+ "y": 2
+ },
+ {
+ "x": 0,
+ "y": 3
+ },
+ {
+ "x": 1,
+ "y": 3
+ },
+ {
+ "x": 2,
+ "y": 3
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/rad/keymaps/default/keymap.c b/keyboards/rad/keymaps/default/keymap.c
new file mode 100644
index 0000000000..a4f0291040
--- /dev/null
+++ b/keyboards/rad/keymaps/default/keymap.c
@@ -0,0 +1,23 @@
+/*
+ * 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
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_SPC, KC_SPC,
+ KC_SPC, KC_SPC, KC_SPC,
+ KC_SPC, KC_SPC, KC_SPC,
+ KC_SPC, KC_SPC, KC_SPC),
+};
diff --git a/keyboards/rad/keymaps/default/readme.md b/keyboards/rad/keymaps/default/readme.md
new file mode 100644
index 0000000000..e3562e4f0b
--- /dev/null
+++ b/keyboards/rad/keymaps/default/readme.md
@@ -0,0 +1 @@
+# rad - Default layout
diff --git a/keyboards/rad/keymaps/via/keymap.c b/keyboards/rad/keymaps/via/keymap.c
new file mode 100644
index 0000000000..c994bcc079
--- /dev/null
+++ b/keyboards/rad/keymaps/via/keymap.c
@@ -0,0 +1,41 @@
+/*
+ * 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
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_SPC, KC_SPC,
+ KC_SPC, KC_SPC, KC_SPC,
+ KC_SPC, KC_SPC, KC_SPC,
+ KC_SPC, KC_SPC, KC_SPC),
+ [1] = LAYOUT(
+ _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+ ),
+ [2] = LAYOUT(
+ _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+ ),
+ [3] = LAYOUT(
+ _______, _______,
+ _______, _______, _______,
+ _______, _______, _______,
+ _______, _______, _______
+ )
+};
diff --git a/keyboards/rad/keymaps/via/rules.mk b/keyboards/rad/keymaps/via/rules.mk
new file mode 100644
index 0000000000..69de2e4c5a
--- /dev/null
+++ b/keyboards/rad/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/rad/rad.c b/keyboards/rad/rad.c
new file mode 100644
index 0000000000..b3fed54696
--- /dev/null
+++ b/keyboards/rad/rad.c
@@ -0,0 +1,15 @@
+/*
+ * 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 "rad.h"
diff --git a/keyboards/rad/rad.h b/keyboards/rad/rad.h
new file mode 100644
index 0000000000..a9d669c929
--- /dev/null
+++ b/keyboards/rad/rad.h
@@ -0,0 +1,29 @@
+/*
+ * 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 LAYOUT( \
+ K01, K02, \
+ K10, K11, K12, \
+ K20, K21, K22, \
+ K30, K31, K32 \
+) { \
+ { KC_NO, K01, K02 }, \
+ { K10, K11, K12 }, \
+ { K20, K21, K22 }, \
+ { K30, K31, K32 } \
+}
diff --git a/keyboards/rad/readme.md b/keyboards/rad/readme.md
new file mode 100644
index 0000000000..3a0fc76230
--- /dev/null
+++ b/keyboards/rad/readme.md
@@ -0,0 +1,24 @@
+# rad
+
+The Rad Macro Pad is a USB-C, Macro Pad with 11 keys powered by QMK
+
+* Keyboard Maintainer: Anubhav Dhiman
+* Hardware Supported: ATmega32U4
+* Hardware Availability: Interest Check
+
+Make example for this keyboard (after setting up your build environment):
+
+ make rad:default
+
+Flashing example for this keyboard:
+
+ make rad:default:flash
+
+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).
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,2) in the matrix (top right) and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `RESET` if it is available
diff --git a/keyboards/rad/rules.mk b/keyboards/rad/rules.mk
new file mode 100644
index 0000000000..7dae3a8423
--- /dev/null
+++ b/keyboards/rad/rules.mk
@@ -0,0 +1,18 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+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
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output