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

Add base firmware for the Frog Numpad #19698

Merged
merged 24 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
17 changes: 17 additions & 0 deletions keyboards/wolf/frogpad/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
ToastyStoemp marked this conversation as resolved.
Show resolved Hide resolved
Copyright 2020 <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/>.
*/
#pragma once
35 changes: 35 additions & 0 deletions keyboards/wolf/frogpad/frogpad.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
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"

bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
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 false;
}
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
ToastyStoemp marked this conversation as resolved.
Show resolved Hide resolved
63 changes: 63 additions & 0 deletions keyboards/wolf/frogpad/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"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
ToastyStoemp marked this conversation as resolved.
Show resolved Hide resolved
},
"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": {
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
"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.25 },
{ "matrix": [1, 1], "x": 1, "y": 1.25 },
{ "matrix": [1, 2], "x": 2, "y": 1.25 },
{ "matrix": [1, 3], "x": 3, "y": 1.25 },
{ "matrix": [2, 0], "x": 0, "y": 2.25 },
{ "matrix": [2, 1], "x": 1, "y": 2.25 },
{ "matrix": [2, 2], "x": 2, "y": 2.25 },
{ "matrix": [2, 3], "x": 3, "y": 2.25 },
{ "matrix": [3, 0], "x": 0, "y": 3.25 },
{ "matrix": [3, 1], "x": 1, "y": 3.25 },
{ "matrix": [3, 2], "x": 2, "y": 3.25 },
{ "matrix": [3, 3], "x": 3, "y": 3.25 },
{ "matrix": [4, 0], "x": 0, "y": 4.25 },
{ "matrix": [4, 1], "x": 1, "y": 4.25 },
{ "matrix": [4, 2], "x": 2, "y": 4.25 },
{ "matrix": [4, 3], "x": 3, "y": 4.25 },
{ "matrix": [5, 0], "x": 0, "y": 5.25 },
{ "matrix": [5, 1], "x": 1, "y": 5.25 },
{ "matrix": [5, 2], "x": 2, "y": 5.25 },
{ "matrix": [5, 3], "x": 3, "y": 5.25 }
]
}
}
}
48 changes: 48 additions & 0 deletions keyboards/wolf/frogpad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -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_numpad_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_numpad_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_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
1 change: 1 addition & 0 deletions keyboards/wolf/frogpad/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
70 changes: 70 additions & 0 deletions keyboards/wolf/frogpad/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -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_numpad_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_numpad_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
),

[_LAYER2] = LAYOUT_numpad_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_numpad_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
2 changes: 2 additions & 0 deletions keyboards/wolf/frogpad/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
25 changes: 25 additions & 0 deletions keyboards/wolf/frogpad/readme.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions keyboards/wolf/frogpad/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Processor frequency
F_CPU = 8000000