Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Red Herring PCB support #22409

Merged
merged 14 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions keyboards/dcpedit/redherring/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2023 Ming-Gih Lam (@dcpedit)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE
#define SOLENOID_PIN B5
#define OLED_IC OLED_IC_SH1107
#define OLED_DISPLAY_64X128
139 changes: 139 additions & 0 deletions keyboards/dcpedit/redherring/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"manufacturer": "dcpedit",
"keyboard_name": "Red Herring",
"maintainer": "dcpedit",
"bootloader": "usbasploader",
"bootmagic": {
"matrix": [5, 14]
},
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "C2", "pin_b": "D7"}
]
},
"indicators": {
"caps_lock": "A0"
},
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"encoder": true,
"oled": true,
"haptic": true
},
"matrix_pins": {
"cols": ["A1", "A2", "A3", "B0", "B1", "B2", "B3", "B4", "D0", "D1", "D5", "D6", "C5", "C4", "C3"],
"rows": ["C6", "A6", "A7", "A4", "C7", "A5"]
},
"processor": "atmega32a",
"qmk": {
"tap_keycode_delay": 10
},
"url": "https://github.com/dcpedit/redherring",
"usb": {
"device_version": "1.0.0",
"pid": "0x12ED",
"vid": "0xDC9E"
},
"dynamic_keymap": {
"layer_count": 2
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "5,14", "matrix": [5, 14], "x": 0.75, "y": 0.25},
{"label": "0,0", "matrix": [0, 0], "x": 2.25, "y": 0.25},
{"label": "0,1", "matrix": [0, 1], "x": 3.25, "y": 0.25},
{"label": "0,2", "matrix": [0, 2], "x": 4.75, "y": 0.25},
{"label": "0,3", "matrix": [0, 3], "x": 5.75, "y": 0.13},
{"label": "0,4", "matrix": [0, 4], "x": 6.75, "y": 0.25},
{"label": "0,5", "matrix": [0, 5], "x": 7.75, "y": 0.38},
{"label": "0,6", "matrix": [0, 6], "x": 11.5, "y": 0.38},
{"label": "0,7", "matrix": [0, 7], "x": 12.5, "y": 0.25},
{"label": "0,8", "matrix": [0, 8], "x": 13.5, "y": 0.13},
{"label": "0,9", "matrix": [0, 9], "x": 14.5, "y": 0.25},
{"label": "0,10", "matrix": [0, 10], "x": 16, "y": 0.25},
{"label": "0,11", "matrix": [0, 11], "x": 17, "y": 0.25},
{"label": "0,12", "matrix": [0, 12], "x": 18.13, "y": 0.25},
{"label": "0,13", "matrix": [0, 13], "x": 19.13, "y": 0.25},
{"label": "0,14", "matrix": [0, 14], "x": 21, "y": 0.25},
{"label": "1,0", "matrix": [1, 0], "x": 2, "y": 1.5},
{"label": "1,1", "matrix": [1, 1], "x": 3, "y": 1.5},
{"label": "1,2", "matrix": [1, 2], "x": 4.75, "y": 1.5},
{"label": "1,3", "matrix": [1, 3], "x": 5.75, "y": 1.38},
{"label": "1,4", "matrix": [1, 4], "x": 6.75, "y": 1.5},
{"label": "1,5", "matrix": [1, 5], "x": 7.75, "y": 1.63},
{"label": "1,6", "matrix": [1, 6], "x": 11.5, "y": 1.63},
{"label": "1,7", "matrix": [1, 7], "x": 12.5, "y": 1.5},
{"label": "1,8", "matrix": [1, 8], "x": 13.5, "y": 1.38},
{"label": "1,9", "matrix": [1, 9], "x": 14.5, "y": 1.5},
{"label": "1,10", "matrix": [1, 10], "x": 16.25, "y": 1.5},
{"label": "1,11", "matrix": [1, 11], "x": 17.25, "y": 1.5},
{"label": "1,12", "matrix": [1, 12], "x": 18.25, "y": 1.5},
{"label": "1,13", "matrix": [1, 13], "x": 19.25, "y": 1.5},
{"label": "1,14", "matrix": [1, 14], "x": 20.25, "y": 1.5},
{"label": "2,14", "matrix": [2, 14], "x": 21.75, "y": 1.5},
{"label": "2,0", "matrix": [2, 0], "x": 1.25, "y": 2.5, "w": 1.5},
{"label": "2,1", "matrix": [2, 1], "x": 2.75, "y": 2.5},
{"label": "2,2", "matrix": [2, 2], "x": 4.75, "y": 2.5},
{"label": "2,3", "matrix": [2, 3], "x": 5.75, "y": 2.38},
{"label": "2,4", "matrix": [2, 4], "x": 6.75, "y": 2.5},
{"label": "2,5", "matrix": [2, 5], "x": 7.75, "y": 2.63},
{"label": "2,6", "matrix": [2, 6], "x": 11.5, "y": 2.63},
{"label": "2,7", "matrix": [2, 7], "x": 12.5, "y": 2.5},
{"label": "2,8", "matrix": [2, 8], "x": 13.5, "y": 2.38},
{"label": "2,9", "matrix": [2, 9], "x": 14.5, "y": 2.5},
{"label": "2,10", "matrix": [2, 10], "x": 16.5, "y": 2.5},
{"label": "2,11", "matrix": [2, 11], "x": 17.5, "y": 2.5},
{"label": "2,12", "matrix": [2, 12], "x": 18.5, "y": 2.5},
{"label": "2,13", "matrix": [2, 13], "x": 19.5, "y": 2.5, "w": 1.5},
{"label": "3,13", "matrix": [3, 13], "x": 21.5, "y": 2.5},
{"label": "3,0", "matrix": [3, 0], "x": 0.75, "y": 3.5, "w": 1.75},
{"label": "3,1", "matrix": [3, 1], "x": 2.5, "y": 3.5},
{"label": "3,2", "matrix": [3, 2], "x": 4.75, "y": 3.5},
{"label": "3,3", "matrix": [3, 3], "x": 5.75, "y": 3.38},
{"label": "3,4", "matrix": [3, 4], "x": 6.75, "y": 3.5},
{"label": "3,5", "matrix": [3, 5], "x": 7.75, "y": 3.63},
{"label": "3,6", "matrix": [3, 6], "x": 11.5, "y": 3.63},
{"label": "3,7", "matrix": [3, 7], "x": 12.5, "y": 3.5},
{"label": "3,8", "matrix": [3, 8], "x": 13.5, "y": 3.38},
{"label": "3,9", "matrix": [3, 9], "x": 14.5, "y": 3.5},
{"label": "3,10", "matrix": [3, 10], "x": 16.75, "y": 3.5},
{"label": "3,11", "matrix": [3, 11], "x": 17.75, "y": 3.5},
{"label": "3,12", "matrix": [3, 12], "x": 18.75, "y": 3.5, "w": 2.25},
{"label": "3,14", "matrix": [3, 14], "x": 21.25, "y": 3.5},
{"label": "4,14", "matrix": [4, 14], "x": 0, "y": 4.5, "w": 1.25},
{"label": "4,0", "matrix": [4, 0], "x": 1.25, "y": 4.5},
{"label": "4,1", "matrix": [4, 1], "x": 2.25, "y": 4.5},
{"label": "4,2", "matrix": [4, 2], "x": 4.75, "y": 4.5},
{"label": "4,3", "matrix": [4, 3], "x": 5.75, "y": 4.38},
{"label": "4,4", "matrix": [4, 4], "x": 6.75, "y": 4.5},
{"label": "4,5", "matrix": [4, 5], "x": 7.75, "y": 4.63},
{"label": "5,5", "matrix": [5, 5], "x": 8.75, "y": 4.63},
{"label": "5,6", "matrix": [5, 6], "x": 10.5, "y": 4.63},
{"label": "4,6", "matrix": [4, 6], "x": 11.5, "y": 4.63},
{"label": "4,7", "matrix": [4, 7], "x": 12.5, "y": 4.5},
{"label": "4,8", "matrix": [4, 8], "x": 13.5, "y": 4.38},
{"label": "4,9", "matrix": [4, 9], "x": 14.5, "y": 4.5},
{"label": "4,10", "matrix": [4, 10], "x": 17, "y": 4.5},
{"label": "4,11", "matrix": [4, 11], "x": 18, "y": 4.5},
{"label": "4,12", "matrix": [4, 12], "x": 19, "y": 4.5, "w": 1.25},
{"label": "4,13", "matrix": [4, 13], "x": 20.5, "y": 4.75},
{"label": "5,0", "matrix": [5, 0], "x": 0.5, "y": 5.5, "w": 1.25},
{"label": "5,1", "matrix": [5, 1], "x": 1.75, "y": 5.5, "w": 1.25},
{"label": "5,2", "matrix": [5, 2], "x": 5.25, "y": 5.5, "w": 1.25},
{"label": "5,3", "matrix": [5, 3], "x": 6.5, "y": 5.5, "w": 1.25},
{"label": "5,4", "matrix": [5, 4], "x": 7.75, "y": 5.63, "w": 2},
{"label": "5,7", "matrix": [5, 7], "x": 10.5, "y": 5.63, "w": 2.75},
{"label": "5,8", "matrix": [5, 8], "x": 13.25, "y": 5.5, "w": 1.25},
{"label": "5,9", "matrix": [5, 9], "x": 16.75, "y": 5.5, "w": 1.25},
{"label": "5,10", "matrix": [5, 10], "x": 18, "y": 5.5, "w": 1.25},
{"label": "5,11", "matrix": [5, 11], "x": 19.5, "y": 5.75},
{"label": "5,12", "matrix": [5, 12], "x": 20.5, "y": 5.75},
{"label": "5,13", "matrix": [5, 13], "x": 21.5, "y": 5.75}
]
}
}
}
29 changes: 29 additions & 0 deletions keyboards/dcpedit/redherring/keymaps/default/keymap.c
dcpedit marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2023 Ming-Gih Lam (@dcpedit)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_MENU, KC_SPC, KC_SPC, KC_ALGR, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),

[1] = LAYOUT(
QK_RBT, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, HF_TOGG,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS )
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) },
};
#endif
1 change: 1 addition & 0 deletions keyboards/dcpedit/redherring/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
31 changes: 31 additions & 0 deletions keyboards/dcpedit/redherring/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2023 Ming-Gih Lam (@dcpedit)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(

KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_MUTE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_MENU, KC_SPC, KC_SPC, KC_ALGR, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),

[1] = LAYOUT(

QK_RBT, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, HF_TOGG,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS )
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) },
};
#endif
2 changes: 2 additions & 0 deletions keyboards/dcpedit/redherring/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes
27 changes: 27 additions & 0 deletions keyboards/dcpedit/redherring/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Red Herring

![Red Herring](https://i.imgur.com/b6lKmW0h.jpg)

Unibody ergonomic orthilinar keyboard with through-hole components. Supports standard keycaps, a 64x128 OLED, large rotary encoder knob, and a solenoid.

* Keyboard Maintainer: [dcpedit](https://github.com/dcpedit)
* Hardware Supported: ATMEGA32A
* Hardware Availability: https://github.com/dcpedit/redherring

Make example for this keyboard (after setting up your build environment):

make dcpedit/redherring:default

Flashing example for this keyboard:

make dcpedit/redherring: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 ESC key (top-left key) and plug in the keyboard
* **Physical reset button**: On the PCB, while holding down the BOOT button, press and release the RESET button
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
Loading