Browse Source

Add Idle Builds Dinkey 34 keyboard (#26176)

Idle Builds 2 months ago
parent
commit
5e3985024d

+ 42 - 0
keyboards/idlebuilds/dinkey34/dinkey34.c

@@ -0,0 +1,42 @@
+// Copyright 2023 Idle Builds (@IdleBuilds)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#ifdef OLED_ENABLE
+oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
+    return OLED_ROTATION_180;
+}
+
+bool oled_task_kb(void) {
+    if (!oled_task_user()) {
+        return false;
+    }
+    if (is_keyboard_master()) {
+        oled_write_P(PSTR("LAYER:\n\n"), false);
+        switch (get_highest_layer(layer_state)) {
+            case 0:
+                oled_write_P(PSTR("BASE\n"), false);
+                break;
+            case 1:
+                oled_write_P(PSTR("LAYER 1\n"), false);
+                break;
+            case 2:
+                oled_write_P(PSTR("LAYER 2\n"), false);
+                break;
+            case 3:
+                oled_write_P(PSTR("LAYER 3\n"), false);
+                break;
+            default:
+                oled_write_P(PSTR("UNKNOWN\n"), false);
+        }
+    } else {
+        static const char PROGMEM my_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                                               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xff, 0x3f, 0x03, 0x03, 0x03, 0x03, 0x07, 0xce, 0xfc, 0x10, 0x00, 0x80, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0x7e, 0x1e, 0x78, 0xe0, 0x80, 0x00, 0xc0, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0xfe, 0xff, 0xe0, 0xb0, 0x18, 0x1c, 0x0e, 0x02, 0x00, 0x00, 0x00, 0xc0, 0xfe, 0xfe, 0xe2, 0xe2, 0x63, 0x63, 0x63, 0x03, 0x00, 0x03, 0x06, 0x1c, 0x38, 0xf0, 0xf0, 0x38, 0x1c, 0x0e, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0e, 0xcc, 0xe4, 0xf4, 0xde, 0xde, 0xce, 0x80, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xcc, 0xfe, 0xdf, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                                               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x04, 0x06, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x00, 0x00, 0x0f, 0x0f, 0x08, 0x08, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x08, 0x08, 0x08, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                                               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+        oled_write_raw_P(my_logo, sizeof(my_logo));
+    }
+    return true;
+}
+#endif

+ 82 - 0
keyboards/idlebuilds/dinkey34/keyboard.json

@@ -0,0 +1,82 @@
+{
+    "keyboard_name": "dinkey34",
+    "manufacturer": "Idle Builds",
+    "maintainer": "IdleBuilds",
+    "url": "https://github.com/IdleBuilds/Dinkey",
+    "bootloader": "atmel-dfu",
+    "processor": "atmega32u4",
+    "usb": {
+        "device_version": "1.0.0",
+        "pid": "0x3400",
+        "vid": "0xFEED"
+    },
+    "features": {
+        "bootmagic": true,
+        "extrakey": true,
+        "nkro": true,
+        "oled": true
+    },
+    "split": {
+        "enabled": true,
+        "serial": {
+            "pin": "D2"
+        },
+        "transport": {
+            "sync": {
+                "modifiers": true
+            }
+        }
+    },
+    "diode_direction": "COL2ROW",
+    "matrix_pins": {
+        "cols": ["E6", "D7", "C6", "D4", "F6"],
+        "rows": ["F4", "F5", "B4", "B5"]
+    },
+   "layouts": {
+        "LAYOUT": {
+            "layout": [
+                {"x": 0, "y": 0.93, "matrix": [0, 0]},
+                {"x": 1, "y": 0.31, "matrix": [0, 1]},
+                {"x": 2, "y": 0, "matrix": [0, 2]},
+                {"x": 3, "y": 0.28, "matrix": [0, 3]},
+                {"x": 4, "y": 0.42, "matrix": [0, 4]},
+
+                {"x": 7, "y": 0.42, "matrix": [4, 4]},
+                {"x": 8, "y": 0.28, "matrix": [4, 3]},
+                {"x": 9, "y": 0, "matrix": [4, 2]},
+                {"x": 10, "y": 0.31, "matrix": [4, 1]},
+                {"x": 11, "y": 0.93, "matrix": [4, 0]},
+
+                {"x": 0, "y": 1.93, "matrix": [1, 0]},
+                {"x": 1, "y": 1.31, "matrix": [1, 1]},
+                {"x": 2, "y": 1, "matrix": [1, 2]},
+                {"x": 3, "y": 1.28, "matrix": [1, 3]},
+                {"x": 4, "y": 1.42, "matrix": [1, 4]},
+
+                {"x": 7, "y": 1.42, "matrix": [5, 4]},
+                {"x": 8, "y": 1.28, "matrix": [5, 3]},
+                {"x": 9, "y": 1, "matrix": [5, 2]},
+                {"x": 10, "y": 1.31, "matrix": [5, 1]},
+                {"x": 11, "y": 1.93, "matrix": [5, 0]},
+
+                {"x": 0, "y": 2.93, "matrix": [2, 0]},
+                {"x": 1, "y": 2.31, "matrix": [2, 1]},
+                {"x": 2, "y": 2, "matrix": [2, 2]},
+                {"x": 3, "y": 2.28, "matrix": [2, 3]},
+                {"x": 4, "y": 2.42, "matrix": [2, 4]},
+
+                {"x": 7, "y": 2.42, "matrix": [6, 4]},
+                {"x": 8, "y": 2.28, "matrix": [6, 3]},
+                {"x": 9, "y": 2, "matrix": [6, 2]},
+                {"x": 10, "y": 2.31, "matrix": [6, 1]},
+                {"x": 11, "y": 2.93, "matrix": [6, 0]},
+
+                {"matrix": [3, 0], "x": 3.5, "y": 3.75},
+                {"matrix": [3, 1], "x": 4.5, "y": 4},
+
+                {"matrix": [7, 1], "x": 6.5, "y": 4},
+                {"matrix": [7, 0], "x": 7.5, "y": 3.75}
+            ]
+        }
+    }
+}

+ 13 - 0
keyboards/idlebuilds/dinkey34/keymaps/default/keymap.c

@@ -0,0 +1,13 @@
+// Copyright 2023 Idle Builds (@IdleBuilds)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = LAYOUT(
+        KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,
+        KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN,
+        KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH,
+                                   KC_BSPC, KC_TAB,  KC_SPC, KC_ENT
+    ),
+};

+ 27 - 0
keyboards/idlebuilds/dinkey34/readme.md

@@ -0,0 +1,27 @@
+# Dinkey 34
+
+![Dinkey 34](https://i.imgur.com/MhrvYzo.jpeg)
+
+A low-profile split keyboard with 34 keys. Part of the Dinkey keyboard series by Idle Builds.
+
+* Keyboard Maintainer: [IdleBuilds](https://github.com/IdleBuilds)
+* Hardware Supported: Dinkey 34 PCB, ATmega32U4
+* Hardware Availability: [Store](https://www.idlebuilds.com), [Idle Builds GitHub](https://github.com/IdleBuilds/Dinkey)
+
+Make example for this keyboard (after setting up your build environment):
+
+    make idlebuilds/dinkey34:default
+
+Flashing example for this keyboard:
+
+    make idlebuilds/dinkey34: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,0) in the matrix (top left key on left half) and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available