[Keyboard] Add Ortho60 v2 Keyboard (#18890)

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
Andrew Kannan 2022-12-04 02:15:44 -05:00 committed by GitHub
parent f32070bfef
commit f288a3bb3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 387 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/*
Copyright 2022 CannonKeys
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
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur.
#define BACKLIGHT_PWM_DRIVER PWMD6
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A

View File

@ -0,0 +1,23 @@
/*
* Copyright Andrew Kannan 2022
*
* 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
#define HAL_USE_PWM TRUE
#include_next <halconf.h>

View File

@ -0,0 +1,105 @@
{
"keyboard_name": "Ortho60 v2",
"maintainer": "awkannan",
"manufacturer": "CannonKeys",
"processor": "RP2040",
"bootloader": "rp2040",
"usb": {
"vid": "0xCA04",
"pid": "0x0019",
"device_version": "0.0.1"
},
"url": "https://cannonkeys.com",
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0", "GP13", "GP24", "GP23", "GP22"],
"rows": ["GP27", "GP18", "GP19", "GP25", "GP26"]
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"backlight": true,
"encoder": true
},
"encoder": {
"rotary": [
{ "pin_a": "GP28", "pin_b": "GP29" }
]
},
"backlight": {
"breathing": true,
"breathing_period": 5,
"levels": 15,
"pin": "GP12"
},
"layouts": {
"LAYOUT_ortho_5x12": {
"layout": [
{ "label": "`", "matrix": [0, 0], "x": 0.0, "y": 0.0 },
{ "label": "1", "matrix": [0, 1], "x": 1.0, "y": 0.0 },
{ "label": "2", "matrix": [0, 2], "x": 2.0, "y": 0.0 },
{ "label": "3", "matrix": [0, 3], "x": 3.0, "y": 0.0 },
{ "label": "4", "matrix": [0, 4], "x": 4.0, "y": 0.0 },
{ "label": "5", "matrix": [0, 5], "x": 5.0, "y": 0.0 },
{ "label": "6", "matrix": [0, 6], "x": 6.0, "y": 0.0 },
{ "label": "7", "matrix": [0, 7], "x": 7.0, "y": 0.0 },
{ "label": "8", "matrix": [0, 8], "x": 8.0, "y": 0.0 },
{ "label": "9", "matrix": [0, 9], "x": 9.0, "y": 0.0 },
{ "label": "0", "matrix": [0, 10], "x": 10.0, "y": 0.0 },
{ "label": "Del", "matrix": [0, 11], "x": 11.0, "y": 0.0 },
{ "label": "Tab", "matrix": [1, 0], "x": 0.0, "y": 1.0 },
{ "label": "Q", "matrix": [1, 1], "x": 1.0, "y": 1.0 },
{ "label": "W", "matrix": [1, 2], "x": 2.0, "y": 1.0 },
{ "label": "E", "matrix": [1, 3], "x": 3.0, "y": 1.0 },
{ "label": "R", "matrix": [1, 4], "x": 4.0, "y": 1.0 },
{ "label": "T", "matrix": [1, 5], "x": 5.0, "y": 1.0 },
{ "label": "Y", "matrix": [1, 6], "x": 6.0, "y": 1.0 },
{ "label": "U", "matrix": [1, 7], "x": 7.0, "y": 1.0 },
{ "label": "I", "matrix": [1, 8], "x": 8.0, "y": 1.0 },
{ "label": "O", "matrix": [1, 9], "x": 9.0, "y": 1.0 },
{ "label": "P", "matrix": [1, 10], "x": 10.0, "y": 1.0 },
{ "label": "Back Space", "matrix": [1, 11], "x": 11.0, "y": 1.0 },
{ "label": "Esc", "matrix": [2, 0], "x": 0.0, "y": 2.0 },
{ "label": "A", "matrix": [2, 1], "x": 1.0, "y": 2.0 },
{ "label": "S", "matrix": [2, 2], "x": 2.0, "y": 2.0 },
{ "label": "D", "matrix": [2, 3], "x": 3.0, "y": 2.0 },
{ "label": "F", "matrix": [2, 4], "x": 4.0, "y": 2.0 },
{ "label": "G", "matrix": [2, 5], "x": 5.0, "y": 2.0 },
{ "label": "H", "matrix": [2, 6], "x": 6.0, "y": 2.0 },
{ "label": "J", "matrix": [2, 7], "x": 7.0, "y": 2.0 },
{ "label": "K", "matrix": [2, 8], "x": 8.0, "y": 2.0 },
{ "label": "L", "matrix": [2, 9], "x": 9.0, "y": 2.0 },
{ "label": ";", "matrix": [2, 10], "x": 10.0, "y": 2.0 },
{ "label": "'", "matrix": [2, 11], "x": 11.0, "y": 2.0 },
{ "label": "Shift", "matrix": [3, 0], "x": 0.0, "y": 3.0 },
{ "label": "Z", "matrix": [3, 1], "x": 1.0, "y": 3.0 },
{ "label": "X", "matrix": [3, 2], "x": 2.0, "y": 3.0 },
{ "label": "C", "matrix": [3, 3], "x": 3.0, "y": 3.0 },
{ "label": "V", "matrix": [3, 4], "x": 4.0, "y": 3.0 },
{ "label": "B", "matrix": [3, 5], "x": 5.0, "y": 3.0 },
{ "label": "N", "matrix": [3, 6], "x": 6.0, "y": 3.0 },
{ "label": "M", "matrix": [3, 7], "x": 7.0, "y": 3.0 },
{ "label": ",", "matrix": [3, 8], "x": 8.0, "y": 3.0 },
{ "label": ".", "matrix": [3, 9], "x": 9.0, "y": 3.0 },
{ "label": "/", "matrix": [3, 10], "x": 10.0, "y": 3.0 },
{ "label": "Return", "matrix": [3, 11], "x": 11.0, "y": 3.0 },
{ "matrix": [4, 0], "x": 0.0, "y": 4.0 },
{ "label": "Ctrl", "matrix": [4, 1], "x": 1.0, "y": 4.0 },
{ "label": "Alt", "matrix": [4, 2], "x": 2.0, "y": 4.0 },
{ "label": "Super", "matrix": [4, 3], "x": 3.0, "y": 4.0 },
{ "label": "Lower", "matrix": [4, 4], "x": 4.0, "y": 4.0 },
{ "matrix": [4, 5], "x": 5.0, "y": 4.0 },
{ "matrix": [4, 6], "x": 6.0, "y": 4.0 },
{ "label": "Raise", "matrix": [4, 7], "x": 7.0, "y": 4.0 },
{ "label": "&larr;", "matrix": [4, 8], "x": 8.0, "y": 4.0 },
{ "label": "&darr;", "matrix": [4, 9], "x": 9.0, "y": 4.0 },
{ "label": "&uarr;", "matrix": [4, 10], "x": 10.0, "y": 4.0 },
{ "label": "&rarr;", "matrix": [4, 11], "x": 11.0, "y": 4.0 }
]
}
}
}

View File

@ -0,0 +1,99 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@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/>.
*/
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum custom_layers {
_BASE,
_RAISE,
_LOWER,
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_BASE] = LAYOUT_ortho_5x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_5x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_5x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
)
};

View File

@ -0,0 +1,53 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@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/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_5x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[1] = LAYOUT_ortho_5x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______,
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
[2] = LAYOUT_ortho_5x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),
[3] = LAYOUT_ortho_5x12(
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
)
};

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -0,0 +1,9 @@
// Copyright 2022 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next "mcuconf.h"
#undef RP_PWM_USE_PWM6
#define RP_PWM_USE_PWM6 TRUE

View File

@ -0,0 +1,31 @@
/*
Copyright 2022 CannonKeys
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 "ortho60v2.h"
#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
if (clockwise) {
tap_code_delay(KC_VOLU, 10);
} else {
tap_code_delay(KC_VOLD, 10);
}
return true;
}
#endif

View File

@ -0,0 +1,19 @@
/*
Copyright 2022 CannonKeys
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"

View File

@ -0,0 +1,22 @@
# Ortho60 v2
A 5x12 Ortholinear keyboard powered by an onboard RP2040
* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1)
* Hardware Supported: RP2040
* Hardware Availability: [CannonKeys](https://cannonkeys.com)
Make example for this keyboard (after setting up your build environment):
make cannonkeys/ortho60v2:default
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 (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Swap the boot switch on the back of the PCB to "1" and hit the reset button. Or double tap the reset button quickly while the boot switch is set to "0".
* **Keycode in layout**: Press the key mapped to `RESET` if it is available

View File

@ -0,0 +1,2 @@
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = rp2040_flash