aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dumbpad
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-08-20 04:22:05 +0000
committerQMK Bot <hello@qmk.fm>2021-08-20 04:22:05 +0000
commitc6f24f66bd60e67fb9eca689bb46aa23a10a0e5a (patch)
treeef1f9b69679190ba4ae21ad4bc7f053f88f633b1 /keyboards/dumbpad
parent0a1bf7f6aa6e44557041e03f6e58df5a180c6d79 (diff)
parentcc0ae9cc4ceaf3bdd5d33e1d410b319db617c4eb (diff)
downloadqmk_firmware-c6f24f66bd60e67fb9eca689bb46aa23a10a0e5a.tar.gz
qmk_firmware-c6f24f66bd60e67fb9eca689bb46aa23a10a0e5a.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/dumbpad')
-rw-r--r--keyboards/dumbpad/config.h23
-rw-r--r--keyboards/dumbpad/dumbpad.c59
-rw-r--r--keyboards/dumbpad/dumbpad.h39
-rw-r--r--keyboards/dumbpad/info.json18
-rw-r--r--keyboards/dumbpad/keymaps/default/keymap.c89
-rw-r--r--keyboards/dumbpad/keymaps/via/keymap.c175
-rw-r--r--keyboards/dumbpad/keymaps/via/rules.mk3
-rw-r--r--keyboards/dumbpad/rules.mk26
8 files changed, 5 insertions, 427 deletions
diff --git a/keyboards/dumbpad/config.h b/keyboards/dumbpad/config.h
index 7322d1bbb..5a1a1c92b 100644
--- a/keyboards/dumbpad/config.h
+++ b/keyboards/dumbpad/config.h
@@ -21,29 +21,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21/* USB Device descriptor parameter */ 21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED 22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0x0913 23#define PRODUCT_ID 0x0913
24#define DEVICE_VER 0x0007
25#define MANUFACTURER imchipwood 24#define MANUFACTURER imchipwood
26#define PRODUCT dumbpad 25#define PRODUCT dumbpad
27 26
28/* Column/Row IO definitions */ 27/* Column/Row IO definitions */
29#define MATRIX_ROWS 4
30#define MATRIX_COLS 5
31#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
32#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 }
33#define UNUSED_PINS
34
35/* COL2ROW, ROW2COL*/
36#define DIODE_DIRECTION COL2ROW 28#define DIODE_DIRECTION COL2ROW
37 29
38/* Single rotary encoder */ 30/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
39#define ENCODERS_PAD_A { B2, D0 } 31#define DEBOUNCE 5
40#define ENCODERS_PAD_B { D4, D1 }
41#define ENCODER_RESOLUTIONS { 4, 4 }
42
43/* Onboard LEDs */
44#define LED_00 B3
45#define LED_01 B1
46 32
47/* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */ 33/* Reduce tapdance required taps from 5 to 2 */
48#define BOOTMAGIC_LITE_ROW 3 34#define TAPPING_TOGGLE 2
49#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/dumbpad/dumbpad.c b/keyboards/dumbpad/dumbpad.c
deleted file mode 100644
index b575662a8..000000000
--- a/keyboards/dumbpad/dumbpad.c
+++ /dev/null
@@ -1,59 +0,0 @@
1/* Copyright 2019 Chip
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "dumbpad.h"
17
18void keyboard_pre_init_kb(void) {
19 // Set LED IO as outputs
20 setPinOutput(LED_00);
21 setPinOutput(LED_01);
22 keyboard_pre_init_user();
23}
24
25void shutdown_user() {
26 // Shutdown LEDs
27 writePinLow(LED_00);
28 writePinLow(LED_01);
29}
30
31layer_state_t layer_state_set_kb(layer_state_t state) {
32 // Layer LEDs act as binary indication of current layer
33 uint8_t layer = get_highest_layer(state);
34 writePin(LED_00, layer & 0b1);
35 writePin(LED_01, (layer >> 1) & 0b1);
36 return layer_state_set_user(state);
37}
38
39// Optional override functions below.
40// You can leave any or all of these undefined.
41// These are only required if you want to perform custom actions.
42
43void matrix_init_kb(void) {
44 // put your keyboard start-up code here
45 // runs once when the firmware starts up
46 uint8_t led_delay_ms = 80;
47 for (int i = 0; i < 2; i++) {
48 writePinHigh(LED_00);
49 writePinHigh(LED_01);
50 wait_ms(led_delay_ms);
51 writePinLow(LED_00);
52 writePinLow(LED_01);
53 if (i < 1) {
54 wait_ms(led_delay_ms);
55 }
56 }
57
58 matrix_init_user();
59}
diff --git a/keyboards/dumbpad/dumbpad.h b/keyboards/dumbpad/dumbpad.h
deleted file mode 100644
index b7c7694e3..000000000
--- a/keyboards/dumbpad/dumbpad.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/* Copyright 2019 Chip
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28#define LAYOUT( \
29 k01, k02, k03, k04, \
30 k11, k12, k13, k14, \
31 k21, k22, k23, k24, \
32 k30, k31, k32, k33, k34 \
33) \
34{ \
35 { KC_NO, k01, k02, k03, k04 }, \
36 { KC_NO, k11, k12, k13, k14 }, \
37 { KC_NO, k21, k22, k23, k24 }, \
38 { k30, k31, k32, k33, k34 }, \
39}
diff --git a/keyboards/dumbpad/info.json b/keyboards/dumbpad/info.json
deleted file mode 100644
index 82a53d852..000000000
--- a/keyboards/dumbpad/info.json
+++ /dev/null
@@ -1,18 +0,0 @@
1{
2 "keyboard_name": "dumbpad",
3 "keyboard_folder": "dumbpad",
4 "url": "https://www.github.com/imchipwood/dumbpad",
5 "maintainer": "imchipwood",
6 "width": 5,
7 "height": 4,
8 "layouts": {
9 "LAYOUT": {
10 "layout": [
11 {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
12 {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1},
13 {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2},
14 {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}
15 ]
16 }
17 }
18}
diff --git a/keyboards/dumbpad/keymaps/default/keymap.c b/keyboards/dumbpad/keymaps/default/keymap.c
deleted file mode 100644
index 9263af428..000000000
--- a/keyboards/dumbpad/keymaps/default/keymap.c
+++ /dev/null
@@ -1,89 +0,0 @@
1/* Copyright 2020 imchipwood
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 /*
20 BASE LAYER
21 /-----------------------------------------------------`
22 | | 7 | 8 | 9 | Bkspc |
23 | |---------|---------|---------|---------|
24 | | 4 | 5 | 6 | Esc |
25 | |---------|---------|---------|---------|
26 | | 1 | 2 | 3 | Tab |
27 |-------------|---------|---------|---------|---------|
28 | Left mouse | TT(1) | 0 | . | Enter |
29 \-----------------------------------------------------'
30 */
31 [0] = LAYOUT(
32 KC_7, KC_8, KC_9, KC_BSPC,
33 KC_4, KC_5, KC_6, KC_ESC,
34 KC_1, KC_2, KC_3, KC_TAB,
35 KC_BTN1, TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER
36 ),
37 /*
38 SUB LAYER
39 /-----------------------------------------------------`
40 | | | | | Reset |
41 | |---------|---------|---------|---------|
42 | | | | | + |
43 | |---------|---------|---------|---------|
44 | | | | | - |
45 |-------------|---------|---------|---------|---------|
46 | LOCK | | | | = |
47 \-----------------------------------------------------'
48 */
49 [1] = LAYOUT(
50 _______, _______, _______, RESET,
51 _______, _______, _______, KC_KP_PLUS,
52 _______, _______, _______, KC_KP_MINUS,
53 KC_LOCK, _______, _______, _______, KC_EQL
54 ),
55};
56
57bool encoder_update_user(uint8_t index, bool clockwise) {
58 /* Custom encoder control - handles CW/CCW turning of encoder
59 * Default behavior:
60 * main layer:
61 * CW: move mouse right
62 * CCW: move mouse left
63 * other layers:
64 * CW: = (equals/plus - increase slider in Adobe products)
65 * CCW: - (minus/underscore - decrease slider in adobe products)
66 */
67 if (index == 0) {
68 switch (get_highest_layer(layer_state)) {
69 case 0:
70 // main layer - move mouse right (CW) and left (CCW)
71 if (clockwise) {
72 tap_code(KC_MS_R);
73 } else {
74 tap_code(KC_MS_L);
75 }
76 break;
77
78 default:
79 // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW)
80 if (clockwise) {
81 tap_code(KC_EQL);
82 } else {
83 tap_code(KC_MINS);
84 }
85 break;
86 }
87 }
88 return true;
89}
diff --git a/keyboards/dumbpad/keymaps/via/keymap.c b/keyboards/dumbpad/keymaps/via/keymap.c
deleted file mode 100644
index d9f997531..000000000
--- a/keyboards/dumbpad/keymaps/via/keymap.c
+++ /dev/null
@@ -1,175 +0,0 @@
1/* Copyright 2019 imchipwood
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 /*
20 BASE LAYER
21 /-----------------------------------------------------`
22 | | 7 | 8 | 9 | Bkspc |
23 | |---------|---------|---------|---------|
24 | | 4 | 5 | 6 | Esc |
25 | |---------|---------|---------|---------|
26 | | 1 | 2 | 3 | Tab |
27 |-------------|---------|---------|---------|---------|
28 | Left mouse | MO(1) | 0 | . | Enter |
29 \-----------------------------------------------------'
30 */
31 [0] = LAYOUT(
32 KC_7, KC_8, KC_9, KC_BSPC,
33 KC_4, KC_5, KC_6, KC_ESC,
34 KC_1, KC_2, KC_3, KC_TAB,
35 KC_BTN1, MO(1), KC_0, KC_PDOT, KC_ENTER
36 ),
37 /*
38 SUB LAYER
39 /-----------------------------------------------------`
40 | | | | | Reset |
41 | |---------|---------|---------|---------|
42 | | | | | + |
43 | |---------|---------|---------|---------|
44 | | | | | - |
45 |-------------|---------|---------|---------|---------|
46 | LOCK | | MO(2) | | = |
47 \-----------------------------------------------------'
48 */
49 [1] = LAYOUT(
50 _______, _______, _______, RESET,
51 _______, _______, _______, KC_KP_PLUS,
52 _______, _______, _______, KC_KP_MINUS,
53 KC_MUTE, _______, MO(2) , _______, KC_EQL
54 ),
55
56 /*
57 DEBUG LAYER
58 /-----------------------------------------------------`
59 | | | | | Reset |
60 | |---------|---------|---------|---------|
61 | | | | | |
62 | |---------|---------|---------|---------|
63 | | | | | |
64 |-------------|---------|---------|---------|---------|
65 | | | | | |
66 \-----------------------------------------------------'
67 */
68 [2] = LAYOUT(
69 _______, _______, _______, RESET,
70 _______, _______, _______, _______,
71 _______, _______, _______, _______,
72 _______, _______, _______, MO(3) , _______
73 ),
74
75 /*
76 EXTRA LAYER
77 /-----------------------------------------------------`
78 | | | | | |
79 | |---------|---------|---------|---------|
80 | | | | | |
81 | |---------|---------|---------|---------|
82 | | | | | |
83 |-------------|---------|---------|---------|---------|
84 | | | | | |
85 \-----------------------------------------------------'
86 */
87 [3] = LAYOUT(
88 _______, _______, _______, _______,
89 _______, _______, _______, _______,
90 _______, _______, _______, _______,
91 _______, _______, _______, _______, _______
92 ),
93};
94
95bool encoder_update_user(uint8_t index, bool clockwise) {
96 if (index == 0) {
97 switch (get_highest_layer(layer_state)) {
98 case 0:
99 // sub layer - Scroll
100 if (clockwise) {
101 tap_code(KC_MS_WH_DOWN);
102 } else {
103 tap_code(KC_MS_WH_UP);
104 }
105 break;
106
107 case 1:
108 // main layer - Volume
109 if (clockwise) {
110 tap_code(KC_VOLU);
111 } else {
112 tap_code(KC_VOLD);
113 }
114 break;
115
116 case 2:
117 // debug layer - Change track
118 if (clockwise) {
119 tap_code(KC_MNXT);
120 } else {
121 tap_code(KC_MPRV);
122 }
123 break;
124
125 default:
126 // any other layer Scroll
127 if (clockwise) {
128 tap_code(KC_MS_WH_DOWN);
129 } else {
130 tap_code(KC_MS_WH_UP);
131 }
132 break;
133 }
134 }
135 else if (index == 1) {
136 switch (get_highest_layer(layer_state)) {
137 case 0:
138 // sub layer - Volume
139 if (clockwise) {
140 tap_code(KC_VOLU);
141 } else {
142 tap_code(KC_VOLD);
143 }
144 break;
145
146 case 1:
147 // main layer - Scroll
148 if (clockwise) {
149 tap_code(KC_MS_WH_DOWN);
150 } else {
151 tap_code(KC_MS_WH_UP);
152 }
153 break;
154
155 case 2:
156 // debug layer - Brightness
157 if (clockwise) {
158 tap_code(KC_BRID);
159 } else {
160 tap_code(KC_BRIU);
161 }
162 break;
163
164 default:
165 // any other layer Scroll
166 if (clockwise) {
167 tap_code(KC_MS_WH_DOWN);
168 } else {
169 tap_code(KC_MS_WH_UP);
170 }
171 break;
172 }
173 }
174 return true;
175}
diff --git a/keyboards/dumbpad/keymaps/via/rules.mk b/keyboards/dumbpad/keymaps/via/rules.mk
deleted file mode 100644
index 4650c471e..000000000
--- a/keyboards/dumbpad/keymaps/via/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
1CONSOLE_ENABLE = no
2LTO_ENABLE = yes
3VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk
index 309e3d48c..87ec1ab01 100644
--- a/keyboards/dumbpad/rules.mk
+++ b/keyboards/dumbpad/rules.mk
@@ -1,25 +1 @@
1# MCU name DEFAULT_FOLDER = dumbpad/v0x
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = yes # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23
24ENCODER_ENABLE = yes
25KEY_LOCK_ENABLE = yes