]> git.armaanb.net Git - 24pad.git/commitdiff
Initial commit master
authorArmaan Bhojwani <me@armaanb.net>
Sun, 9 Jan 2022 01:36:23 +0000 (20:36 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 9 Jan 2022 01:36:23 +0000 (20:36 -0500)
24pad.c [new file with mode: 0644]
24pad.h [new file with mode: 0644]
README [new file with mode: 0644]
config.h [new file with mode: 0644]
info.json [new file with mode: 0644]
keymaps/default/README [new file with mode: 0644]
keymaps/default/keymap.c [new file with mode: 0644]
rules.mk [new file with mode: 0644]

diff --git a/24pad.c b/24pad.c
new file mode 100644 (file)
index 0000000..1f8f6a3
--- /dev/null
+++ b/24pad.c
@@ -0,0 +1,4 @@
+// Copyright 2022 Armaan Bhojwani <me@armaanb.net>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "24pad.h"
diff --git a/24pad.h b/24pad.h
new file mode 100644 (file)
index 0000000..1999af6
--- /dev/null
+++ b/24pad.h
@@ -0,0 +1,25 @@
+// Copyright 2022 Armaan Bhojwani <me@armaanb.net>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "quantum.h"
+
+/* This is a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+       k00, k01, k02, k03, k10, k11, k12, k13, k20, k21, k22, k23, k30, k31, k32, k33, k40, k41, k42, k43, k50, k51, k52, k53 \
+) { \
+    { k00, k01, k02, k03 }, \
+    { k10, k11, k12, k13 }, \
+    { k20, k21, k22, k23 }, \
+    { k30, k31, k32, k33 }, \
+    { k40, k41, k42, k43 }, \
+    { k50, k51, k52, k53 }  \
+}
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..c9049ec
--- /dev/null
+++ b/README
@@ -0,0 +1,23 @@
+24pad firmware
+==============
+
+24 key macro pad from half of a Lets Split.
+
+To use, drop this directory into the QMK source tree under keyboards/24pad.
+
+Make example for this keyboard (after setting up your build environment):
+
+    make 24pad:default
+
+Flashing example for this keyboard:
+
+    make 24pad:default:flash
+
+Bootloader
+----------
+Hold down top left key (in the corner closest to the microcontroller) and plug
+in the keyboard.
+
+License
+-------
+See QMK licensing.
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..9ba62fa
--- /dev/null
+++ b/config.h
@@ -0,0 +1,87 @@
+// Copyright 2022 Armaan Bhojwani <me@armaanb.net>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID    0xFEED
+#define PRODUCT_ID   0x0000
+#define DEVICE_VER   0x0001
+#define MANUFACTURER acheam
+#define PRODUCT      24pad
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 }
+#define MATRIX_COL_PINS { B5, B4, E6, D7 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+#define SOFT_SERIAL_PIN D0  // or D1, D2, D3, E6
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+
+/* disable these deprecated features by default */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/info.json b/info.json
new file mode 100644 (file)
index 0000000..a08bd50
--- /dev/null
+++ b/info.json
@@ -0,0 +1,40 @@
+{
+    "keyboard_name": "24pad",
+    "url": "",
+    "maintainer": "acheam",
+    "layouts": {
+        "LAYOUT": {
+            "layout": [
+                {"label": "k00", "x": 0, "y": 0},
+                {"label": "k01", "x": 1, "y": 0},
+                {"label": "k02", "x": 2, "y": 0},
+                {"label": "k03", "x": 3, "y": 0},
+
+                {"label": "k10", "x": 0, "y": 1},
+                {"label": "k11", "x": 1, "y": 1},
+                {"label": "k12", "x": 2, "y": 1},
+                {"label": "k13", "x": 3, "y": 1},
+
+                {"label": "k20", "x": 0, "y": 2},
+                {"label": "k21", "x": 1, "y": 2},
+                {"label": "k22", "x": 2, "y": 2},
+                {"label": "k23", "x": 3, "y": 2},
+
+                {"label": "k30", "x": 0, "y": 3},
+                {"label": "k31", "x": 1, "y": 3},
+                {"label": "k32", "x": 2, "y": 3},
+                {"label": "k33", "x": 3, "y": 3},
+
+                {"label": "k40", "x": 0, "y": 4},
+                {"label": "k41", "x": 1, "y": 4},
+                {"label": "k42", "x": 2, "y": 4},
+                {"label": "k43", "x": 3, "y": 4},
+
+                {"label": "k50", "x": 0, "y": 5},
+                {"label": "k51", "x": 1, "y": 5},
+                {"label": "k52", "x": 2, "y": 5},
+                {"label": "k53", "x": 3, "y": 5},
+            ]
+        }
+    }
+}
diff --git a/keymaps/default/README b/keymaps/default/README
new file mode 100644 (file)
index 0000000..e9a03d5
--- /dev/null
@@ -0,0 +1 @@
+# The default keymap for 24pad
diff --git a/keymaps/default/keymap.c b/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..489d8d0
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2022 Armaan Bhojwani <me@armaanb.net>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+    _BASE,
+    _FN
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    /* Base */
+    [_BASE] = LAYOUT(
+       KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE,
+       KC_PAGE_DOWN, KC_UP, KC_PAGE_UP, KC_HOME,
+       KC_LEFT, KC_DOWN, KC_RIGHT, KC_END,
+       PROGRAMMABLE_BUTTON_8, PROGRAMMABLE_BUTTON_9, PROGRAMMABLE_BUTTON_10, PROGRAMMABLE_BUTTON_11,
+       PROGRAMMABLE_BUTTON_4, PROGRAMMABLE_BUTTON_5, PROGRAMMABLE_BUTTON_6, PROGRAMMABLE_BUTTON_7,
+       MO(_FN), PROGRAMMABLE_BUTTON_1, PROGRAMMABLE_BUTTON_2, PROGRAMMABLE_BUTTON_3
+    ),
+    [_FN] = LAYOUT(
+       KC_ESCAPE, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,
+       KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS,
+       KC_KP_4, KC_KP_5, KC_KP_6, KC_BACKSPACE,
+       KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER,
+       KC_TAB, KC_KP_0, KC_KP_DOT, KC_KP_ENTER,
+       MO(_FN), KC_CALCULATOR, KC_KP_EQUAL, KC_KP_ENTER
+    )
+};
diff --git a/rules.mk b/rules.mk
new file mode 100644 (file)
index 0000000..dddf2b0
--- /dev/null
+++ b/rules.mk
@@ -0,0 +1,19 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes      # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = no        # 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 = no            # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
+AUDIO_ENABLE = no           # Audio output
+PROGRAMMABLE_BUTTON_ENABLE = yes