diff options
author | GLozares <49708169+GLozares@users.noreply.github.com> | 2021-04-20 09:15:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 09:15:21 -0700 |
commit | 666944df2e2172614f9bdeef227b2d89ed511a36 (patch) | |
tree | 81bb8b36b7e3d43f9db2e029eb0bec392ef9a12d | |
parent | 3d37afd495da35e30961969de27190e9e3a4d7e7 (diff) | |
download | qmk_firmware-666944df2e2172614f9bdeef227b2d89ed511a36.tar.gz qmk_firmware-666944df2e2172614f9bdeef227b2d89ed511a36.zip |
[Keyboard] Add millipad keypad and default keymap (#12522)
-rw-r--r-- | keyboards/millipad/config.h | 94 | ||||
-rw-r--r-- | keyboards/millipad/info.json | 26 | ||||
-rw-r--r-- | keyboards/millipad/keymaps/default/keymap.c | 41 | ||||
-rw-r--r-- | keyboards/millipad/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/millipad/millipad.c | 17 | ||||
-rw-r--r-- | keyboards/millipad/millipad.h | 35 | ||||
-rw-r--r-- | keyboards/millipad/readme.md | 29 | ||||
-rw-r--r-- | keyboards/millipad/rules.mk | 23 |
8 files changed, 266 insertions, 0 deletions
diff --git a/keyboards/millipad/config.h b/keyboards/millipad/config.h new file mode 100644 index 000000000..c15d433a4 --- /dev/null +++ b/keyboards/millipad/config.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | Copyright 2021 Jirou | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0xFEED | ||
24 | #define PRODUCT_ID 0x1A1B | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER Jirou | ||
27 | #define PRODUCT millipad | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 2 | ||
31 | #define MATRIX_COLS 6 | ||
32 | |||
33 | /* | ||
34 | * Keyboard Matrix Assignments | ||
35 | * | ||
36 | * Change this to how you wired your keyboard | ||
37 | * COLS: AVR pins used for columns, left to right | ||
38 | * ROWS: AVR pins used for rows, top to bottom | ||
39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
41 | * | ||
42 | */ | ||
43 | #define MATRIX_ROW_PINS { C6, C7 } | ||
44 | #define MATRIX_COL_PINS { F0, F1, F4, D7, D6, D4 } | ||
45 | #define UNUSED_PINS | ||
46 | |||
47 | /* COL2ROW, ROW2COL */ | ||
48 | #define DIODE_DIRECTION COL2ROW | ||
49 | |||
50 | |||
51 | |||
52 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
53 | #define DEBOUNCE 5 | ||
54 | |||
55 | |||
56 | #define LOCKING_RESYNC_ENABLE | ||
57 | |||
58 | |||
59 | /* | ||
60 | * Force NKRO | ||
61 | * | ||
62 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
63 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
64 | * makefile for this to work.) | ||
65 | * | ||
66 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
67 | * until the next keyboard reset. | ||
68 | * | ||
69 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
70 | * fully operational during normal computer usage. | ||
71 | * | ||
72 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
73 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
74 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
75 | * power-up. | ||
76 | * | ||
77 | */ | ||
78 | #define FORCE_NKRO | ||
79 | |||
80 | |||
81 | |||
82 | /* disable these deprecated features by default */ | ||
83 | #define NO_ACTION_MACRO | ||
84 | #define NO_ACTION_FUNCTION | ||
85 | |||
86 | /* Bootmagic Lite key configuration */ | ||
87 | //#define BOOTMAGIC_LITE_ROW 0 | ||
88 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
89 | |||
90 | /* Encoder Definitions */ | ||
91 | |||
92 | #define ENCODERS_PAD_A { D3 } | ||
93 | #define ENCODERS_PAD_B { D2 } | ||
94 | #define ENCODER_RESOLUTION 4 \ No newline at end of file | ||
diff --git a/keyboards/millipad/info.json b/keyboards/millipad/info.json new file mode 100644 index 000000000..565ec7136 --- /dev/null +++ b/keyboards/millipad/info.json | |||
@@ -0,0 +1,26 @@ | |||
1 | { | ||
2 | "keyboard_name": "millipad", | ||
3 | "url": "https://github.com/GLozares/millipad", | ||
4 | "maintainer": "Jirou", | ||
5 | "width": 6, | ||
6 | "height": 2, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | {"label": "k00", "x": 0, "y": 0}, | ||
11 | {"label": "k01", "x": 1, "y": 0}, | ||
12 | {"label": "k02", "x": 2, "y": 0}, | ||
13 | {"label": "k03", "x": 3, "y": 0}, | ||
14 | {"label": "k04", "x": 4, "y": 0}, | ||
15 | {"label": "k05", "x": 5, "y": 0}, | ||
16 | |||
17 | {"label": "k10", "x": 0, "y": 1}, | ||
18 | {"label": "k11", "x": 1, "y": 1}, | ||
19 | {"label": "k12", "x": 2, "y": 1}, | ||
20 | {"label": "k13", "x": 3, "y": 1}, | ||
21 | {"label": "k14", "x": 4, "y": 1}, | ||
22 | {"label": "k15", "x": 5, "y": 1} | ||
23 | ] | ||
24 | } | ||
25 | } | ||
26 | } | ||
diff --git a/keyboards/millipad/keymaps/default/keymap.c b/keyboards/millipad/keymaps/default/keymap.c new file mode 100644 index 000000000..0fd145dd0 --- /dev/null +++ b/keyboards/millipad/keymaps/default/keymap.c | |||
@@ -0,0 +1,41 @@ | |||
1 | /* Copyright 2021 Jirou | ||
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 | |||
18 | // Defines names for use in layer keycodes and the keymap | ||
19 | enum layer_names { | ||
20 | _BASE | ||
21 | }; | ||
22 | |||
23 | |||
24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
25 | |||
26 | [_BASE] = LAYOUT( | ||
27 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, | ||
28 | KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 | ||
29 | ) | ||
30 | }; | ||
31 | |||
32 | |||
33 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
34 | if (index == 0) { /* First encoder */ | ||
35 | if (clockwise) { | ||
36 | tap_code(KC_VOLU); | ||
37 | } else { | ||
38 | tap_code(KC_VOLD); | ||
39 | } | ||
40 | } | ||
41 | } \ No newline at end of file | ||
diff --git a/keyboards/millipad/keymaps/default/readme.md b/keyboards/millipad/keymaps/default/readme.md new file mode 100644 index 000000000..effc205a2 --- /dev/null +++ b/keyboards/millipad/keymaps/default/readme.md | |||
@@ -0,0 +1 @@ | |||
# The default keymap for millipad | |||
diff --git a/keyboards/millipad/millipad.c b/keyboards/millipad/millipad.c new file mode 100644 index 000000000..5b6b66828 --- /dev/null +++ b/keyboards/millipad/millipad.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2021 Jirou | ||
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 | |||
17 | #include "millipad.h" | ||
diff --git a/keyboards/millipad/millipad.h b/keyboards/millipad/millipad.h new file mode 100644 index 000000000..35eb843d6 --- /dev/null +++ b/keyboards/millipad/millipad.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright 2021 Jirou | ||
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 | |||
17 | #pragma once | ||
18 | |||
19 | #include "quantum.h" | ||
20 | |||
21 | /* This is a shortcut to help you visually see your layout. | ||
22 | * | ||
23 | * The first section contains all of the arguments representing the physical | ||
24 | * layout of the board and position of the keys. | ||
25 | * | ||
26 | * The second converts the arguments into a two-dimensional array which | ||
27 | * represents the switch matrix. | ||
28 | */ | ||
29 | #define LAYOUT( \ | ||
30 | k00, k01, k02, k03, k04, k05, \ | ||
31 | k10, k11, k12, k13, k14, k15 \ | ||
32 | ) { \ | ||
33 | { k00, k01, k02, k03, k04, k05 }, \ | ||
34 | { k10, k11, k12, k13, k14, k15 } \ | ||
35 | } | ||
diff --git a/keyboards/millipad/readme.md b/keyboards/millipad/readme.md new file mode 100644 index 000000000..8cabc8a96 --- /dev/null +++ b/keyboards/millipad/readme.md | |||
@@ -0,0 +1,29 @@ | |||
1 | # millipad | ||
2 | |||
3 |  | ||
4 | |||
5 | An open source 2x6 macropad with rotary encoder. Designed to be cheap and simple. | ||
6 | |||
7 | |||
8 | ## More Pictures: | ||
9 |  | ||
10 |  | ||
11 |  | ||
12 | |||
13 | |||
14 | * Keyboard Maintainer: [Jirou](https://github.com/GLozares) | ||
15 | * Hardware Supported: Jirou.Design Millipad | ||
16 | * Hardware Availability: Open Source at https://github.com/GLozares/millipad | ||
17 | |||
18 | ## Bootloader Mode (Flashing Hex Files): | ||
19 | To flash a new hex file, press the hardware reset button located to the left of the rotary encoder to enter Bootloader mode. | ||
20 | |||
21 | Make example for this keyboard (after setting up your build environment): | ||
22 | |||
23 | make millipad:default | ||
24 | |||
25 | Flashing example for this keyboard: | ||
26 | |||
27 | make millipad:default:flash | ||
28 | |||
29 | 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). | ||
diff --git a/keyboards/millipad/rules.mk b/keyboards/millipad/rules.mk new file mode 100644 index 000000000..57daefea4 --- /dev/null +++ b/keyboards/millipad/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_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 | ||
18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
22 | AUDIO_ENABLE = no # Audio output | ||
23 | ENCODER_ENABLE = yes \ No newline at end of file | ||