Add base firmware for the Frog Numpad (#19698)
Co-authored-by: Wolf Van Herreweghe <wolfvh@getupgamesofficial.com> Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: jack <0x6a73@protonmail.com>
This commit is contained in:
parent
d322b4c041
commit
328279ac59
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
Copyright 2023 <contact@vwolf.be>
|
||||||
|
|
||||||
|
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 "quantum.h"
|
||||||
|
|
||||||
|
#ifdef ENCODER_ENABLE
|
||||||
|
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||||
|
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code_delay(KC_VOLU, 10);
|
||||||
|
} else {
|
||||||
|
tap_code_delay(KC_VOLD, 10);
|
||||||
|
}
|
||||||
|
} else if (index == 1) { /* Second encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -0,0 +1,93 @@
|
||||||
|
{
|
||||||
|
"manufacturer": "Geon",
|
||||||
|
"keyboard_name": "Frog Pad",
|
||||||
|
"maintainer": "ToastyStoemp",
|
||||||
|
"bootloader": "atmel-dfu",
|
||||||
|
"diode_direction": "COL2ROW",
|
||||||
|
"features": {
|
||||||
|
"bootmagic": true,
|
||||||
|
"command": false,
|
||||||
|
"console": false,
|
||||||
|
"extrakey": true,
|
||||||
|
"mousekey": true,
|
||||||
|
"nkro": true,
|
||||||
|
"encoder": true
|
||||||
|
},
|
||||||
|
"matrix_pins": {
|
||||||
|
"cols": ["F5", "F6", "B7", "B3"],
|
||||||
|
"rows": ["F0", "B6", "D6", "B5", "D7", "B4"]
|
||||||
|
},
|
||||||
|
"encoder": {
|
||||||
|
"rotary": [
|
||||||
|
{ "pin_a": "F4", "pin_b": "F1" },
|
||||||
|
{ "pin_a": "B1", "pin_b": "B2" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"processor": "atmega32u4",
|
||||||
|
"url": "https://geon.works/products/frog-pad",
|
||||||
|
"usb": {
|
||||||
|
"device_version": "1.0.0",
|
||||||
|
"pid": "0x0004",
|
||||||
|
"vid": "0x5453"
|
||||||
|
},
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_numpad_6x4": {
|
||||||
|
"layout": [
|
||||||
|
{"matrix": [0, 0], "x":0, "y":0},
|
||||||
|
{"matrix": [0, 1], "x":1, "y":0},
|
||||||
|
{"matrix": [0, 2], "x":2, "y":0},
|
||||||
|
{"matrix": [0, 3], "x":3, "y":0},
|
||||||
|
|
||||||
|
{"matrix": [1, 0], "x":0, "y":1},
|
||||||
|
{"matrix": [1, 1], "x":1, "y":1},
|
||||||
|
{"matrix": [1, 2], "x":2, "y":1},
|
||||||
|
{"matrix": [1, 3], "x":3, "y":1},
|
||||||
|
|
||||||
|
{"matrix": [2, 0], "x":0, "y":2},
|
||||||
|
{"matrix": [2, 1], "x":1, "y":2},
|
||||||
|
{"matrix": [2, 2], "x":2, "y":2},
|
||||||
|
|
||||||
|
{"matrix": [3, 0], "x":0, "y":3},
|
||||||
|
{"matrix": [3, 1], "x":1, "y":3},
|
||||||
|
{"matrix": [3, 2], "x":2, "y":3},
|
||||||
|
{"matrix": [2, 3], "x":3, "y":2, "h":2},
|
||||||
|
|
||||||
|
{"matrix": [4, 0], "x":0, "y":4},
|
||||||
|
{"matrix": [4, 1], "x":1, "y":4},
|
||||||
|
{"matrix": [4, 2], "x":2, "y":4},
|
||||||
|
|
||||||
|
{"matrix": [5, 0], "x":0, "y":5, "w":2},
|
||||||
|
{"matrix": [5, 2], "x":2, "y":5},
|
||||||
|
{"matrix": [4, 3], "x":3, "y":4, "h":2}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_ortho_6x4": {
|
||||||
|
"layout": [
|
||||||
|
{ "matrix": [0, 0], "x": 0, "y": 0 },
|
||||||
|
{ "matrix": [0, 1], "x": 1, "y": 0 },
|
||||||
|
{ "matrix": [0, 2], "x": 2, "y": 0 },
|
||||||
|
{ "matrix": [0, 3], "x": 3, "y": 0 },
|
||||||
|
{ "matrix": [1, 0], "x": 0, "y": 1 },
|
||||||
|
{ "matrix": [1, 1], "x": 1, "y": 1 },
|
||||||
|
{ "matrix": [1, 2], "x": 2, "y": 1 },
|
||||||
|
{ "matrix": [1, 3], "x": 3, "y": 1 },
|
||||||
|
{ "matrix": [2, 0], "x": 0, "y": 2 },
|
||||||
|
{ "matrix": [2, 1], "x": 1, "y": 2 },
|
||||||
|
{ "matrix": [2, 2], "x": 2, "y": 2 },
|
||||||
|
{ "matrix": [2, 3], "x": 3, "y": 2 },
|
||||||
|
{ "matrix": [3, 0], "x": 0, "y": 3 },
|
||||||
|
{ "matrix": [3, 1], "x": 1, "y": 3 },
|
||||||
|
{ "matrix": [3, 2], "x": 2, "y": 3 },
|
||||||
|
{ "matrix": [3, 3], "x": 3, "y": 3 },
|
||||||
|
{ "matrix": [4, 0], "x": 0, "y": 4 },
|
||||||
|
{ "matrix": [4, 1], "x": 1, "y": 4 },
|
||||||
|
{ "matrix": [4, 2], "x": 2, "y": 4 },
|
||||||
|
{ "matrix": [4, 3], "x": 3, "y": 4 },
|
||||||
|
{ "matrix": [5, 0], "x": 0, "y": 5 },
|
||||||
|
{ "matrix": [5, 1], "x": 1, "y": 5 },
|
||||||
|
{ "matrix": [5, 2], "x": 2, "y": 5 },
|
||||||
|
{ "matrix": [5, 3], "x": 3, "y": 5 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 <me@homedrop.org>
|
||||||
|
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
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_LAYER0,
|
||||||
|
_LAYER1,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_LAYER0] = LAYOUT_ortho_6x4(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4,
|
||||||
|
KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_TRNS,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_P0, KC_PDOT, KC_PDOT, MO(1)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER1] = LAYOUT_ortho_6x4(
|
||||||
|
QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_HOME, KC_UP, KC_PGUP, KC_TRNS,
|
||||||
|
KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS,
|
||||||
|
KC_END, KC_DOWN, KC_PGDN, KC_TRNS,
|
||||||
|
KC_INS, KC_TRNS, KC_DEL, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(ENCODER_MAP_ENABLE)
|
||||||
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||||
|
[_LAYER0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||||
|
[_LAYER1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
|
||||||
|
};
|
||||||
|
#endif
|
|
@ -0,0 +1 @@
|
||||||
|
ENCODER_MAP_ENABLE = yes
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 <me@homedrop.org>
|
||||||
|
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
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_LAYER0,
|
||||||
|
_LAYER1,
|
||||||
|
_LAYER2,
|
||||||
|
_LAYER3
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_LAYER0] = LAYOUT_ortho_6x4(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4,
|
||||||
|
KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_TRNS,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_P0, KC_PDOT, KC_PDOT, MO(1)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER1] = LAYOUT_ortho_6x4(
|
||||||
|
QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_HOME, KC_UP, KC_PGUP, KC_TRNS,
|
||||||
|
KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS,
|
||||||
|
KC_END, KC_DOWN, KC_PGDN, KC_TRNS,
|
||||||
|
KC_INS, KC_TRNS, KC_DEL, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER2] = LAYOUT_ortho_6x4(
|
||||||
|
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
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LAYER3] = LAYOUT_ortho_6x4(
|
||||||
|
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][2] = {
|
||||||
|
[_LAYER0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
|
||||||
|
[_LAYER1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||||
|
[_LAYER2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
|
||||||
|
[_LAYER3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
|
||||||
|
};
|
||||||
|
#endif
|
|
@ -0,0 +1,2 @@
|
||||||
|
VIA_ENABLE = yes
|
||||||
|
ENCODER_MAP_ENABLE = yes
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Frog Pad
|
||||||
|
|
||||||
|
The following is the QMK Firmware for the Frog Pad PCB.
|
||||||
|
|
||||||
|
The PCB features:
|
||||||
|
* QMK & VIA compatibility
|
||||||
|
* 2 Encoders
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [ToastyStoemp](https://github.com/ToastyStoemp)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make wolf/frogpad:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make wolf/frogpad: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 ESC key and plug in the keyboard (Top Left most switch)
|
||||||
|
* **Reset Pads**: Briefly short the pads labeled `QK_BOOT` on the back of the PCB
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Processor frequency
|
||||||
|
F_CPU = 8000000
|
Loading…
Reference in New Issue