diff options
author | huajijam <strhuaji@gmail.com> | 2020-04-05 13:28:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 22:28:40 -0700 |
commit | 04c81a04c7d0a96818f6fd4087ca21586faa87f1 (patch) | |
tree | 260ed46cad7f96989cad7e09d0399cc0625e3849 | |
parent | 120fcc58b6454f65616ff08670d74c5b9a5059e1 (diff) | |
download | qmk_firmware-04c81a04c7d0a96818f6fd4087ca21586faa87f1.tar.gz qmk_firmware-04c81a04c7d0a96818f6fd4087ca21586faa87f1.zip |
[Keyboard] Add ReverseStudio-DecadePad (#8553)
* ADD DecadePad
* Fix Key display bug
* fix
* firmware1
THIS IS A Backup commit
* firmware2
* rename all fill with lower case
* fix bug
* Final Version
Fix all bugs
* Requested change apply
* suggested apply
* change apply
* via test
* Apply change and fix via support problem
-rw-r--r-- | keyboards/reversestudio/decadepad/config.h | 81 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/decadepad.c | 7 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/decadepad.h | 19 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/info.json | 40 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/keymaps/default/keymap.c | 12 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/keymaps/via/keymap.c | 36 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/readme.md | 12 | ||||
-rw-r--r-- | keyboards/reversestudio/decadepad/rules.mk | 38 |
9 files changed, 247 insertions, 0 deletions
diff --git a/keyboards/reversestudio/decadepad/config.h b/keyboards/reversestudio/decadepad/config.h new file mode 100644 index 000000000..0e6622daa --- /dev/null +++ b/keyboards/reversestudio/decadepad/config.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
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 | |||
23 | /* USB Device descriptor parameter */ | ||
24 | #define VENDOR_ID 0x5253 | ||
25 | #define PRODUCT_ID 0x4450 | ||
26 | #define DEVICE_VER 0x0001 | ||
27 | #define MANUFACTURER ReverseStudio | ||
28 | #define PRODUCT DecadePad | ||
29 | #define DESCRIPTION 6x4Pad | ||
30 | |||
31 | /* key matrix size */ | ||
32 | #define MATRIX_ROWS 6 | ||
33 | #define MATRIX_COLS 4 | ||
34 | |||
35 | /* NIU Mini PCB default pin-out */ | ||
36 | #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } | ||
37 | #define MATRIX_COL_PINS { D0, D1, D2, D3 } | ||
38 | #define UNUSED_PINS | ||
39 | |||
40 | /* COL2ROW or ROW2COL */ | ||
41 | #define DIODE_DIRECTION COL2ROW | ||
42 | |||
43 | /* define if matrix has ghost */ | ||
44 | //#define MATRIX_HAS_GHOST | ||
45 | |||
46 | /* number of backlight levels */ | ||
47 | /* Set 0 if debouncing isn't needed */ | ||
48 | #define DEBOUNCE 5 | ||
49 | |||
50 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
51 | #define LOCKING_SUPPORT_ENABLE | ||
52 | |||
53 | /* Locking resynchronize hack */ | ||
54 | #define LOCKING_RESYNC_ENABLE | ||
55 | |||
56 | #define RGB_DI_PIN D5 | ||
57 | #ifdef RGB_DI_PIN | ||
58 | #define RGBLIGHT_ANIMATIONS | ||
59 | #define RGBLED_NUM 20 | ||
60 | #define RGBLIGHT_HUE_STEP 8 | ||
61 | #define RGBLIGHT_SAT_STEP 8 | ||
62 | #define RGBLIGHT_VAL_STEP 8 | ||
63 | #endif | ||
64 | |||
65 | /* | ||
66 | * Feature disable options | ||
67 | * These options are also useful to firmware size reduction. | ||
68 | */ | ||
69 | |||
70 | /* disable debug print */ | ||
71 | //#define NO_DEBUG | ||
72 | |||
73 | /* disable print */ | ||
74 | //#define NO_PRINT | ||
75 | |||
76 | /* disable action features */ | ||
77 | //#define NO_ACTION_LAYER | ||
78 | //#define NO_ACTION_TAPPING | ||
79 | //#define NO_ACTION_ONESHOT | ||
80 | //#define NO_ACTION_MACRO | ||
81 | //#define NO_ACTION_FUNCTION \ No newline at end of file | ||
diff --git a/keyboards/reversestudio/decadepad/decadepad.c b/keyboards/reversestudio/decadepad/decadepad.c new file mode 100644 index 000000000..b1c3f58ce --- /dev/null +++ b/keyboards/reversestudio/decadepad/decadepad.c | |||
@@ -0,0 +1,7 @@ | |||
1 | #include "decadepad.h" | ||
2 | bool led_update_kb(led_t led_state) { | ||
3 | if (led_update_user(led_state)){ | ||
4 | writePin(D4, led_state.num_lock); | ||
5 | } | ||
6 | return true; | ||
7 | } \ No newline at end of file | ||
diff --git a/keyboards/reversestudio/decadepad/decadepad.h b/keyboards/reversestudio/decadepad/decadepad.h new file mode 100644 index 000000000..7da10094c --- /dev/null +++ b/keyboards/reversestudio/decadepad/decadepad.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | #define LAYOUT_numpad_6x4( \ | ||
5 | k01, k02, k03, k04, \ | ||
6 | k11, k12, k13, k14, \ | ||
7 | k21, k22, k23, \ | ||
8 | k31, k32, k33, k34, \ | ||
9 | k41, k42, k43, \ | ||
10 | k51, k53, k54 \ | ||
11 | ) \ | ||
12 | { \ | ||
13 | { k01, k02, k03, k04 }, \ | ||
14 | { k11, k12, k13, k14 }, \ | ||
15 | { k21, k22, k23, KC_NO }, \ | ||
16 | { k31, k32, k33, k34 }, \ | ||
17 | { k41, k42, k43, KC_NO }, \ | ||
18 | { k51, KC_NO, k53, k54 }, \ | ||
19 | } | ||
diff --git a/keyboards/reversestudio/decadepad/info.json b/keyboards/reversestudio/decadepad/info.json new file mode 100644 index 000000000..6a2219a0f --- /dev/null +++ b/keyboards/reversestudio/decadepad/info.json | |||
@@ -0,0 +1,40 @@ | |||
1 | { | ||
2 | "keyboard_name": "DecadePad", | ||
3 | "url": "", | ||
4 | "maintainer": "huajijam", | ||
5 | "width": 6, | ||
6 | "height": 4, | ||
7 | "layouts": { | ||
8 | "LAYOUT_numpad_6x4": { | ||
9 | "key_count": 21, | ||
10 | "layout": [ | ||
11 | {"x":0, "y":0}, | ||
12 | {"x":1, "y":0}, | ||
13 | {"x":2, "y":0}, | ||
14 | {"x":3, "y":0}, | ||
15 | |||
16 | {"x":0, "y":1}, | ||
17 | {"x":1, "y":1}, | ||
18 | {"x":2, "y":1}, | ||
19 | {"x":3, "y":1}, | ||
20 | |||
21 | {"x":0, "y":2}, | ||
22 | {"x":1, "y":2}, | ||
23 | {"x":2, "y":2}, | ||
24 | |||
25 | {"x":0, "y":3}, | ||
26 | {"x":1, "y":3}, | ||
27 | {"x":2, "y":3}, | ||
28 | {"x":3, "y":2, "h":2}, | ||
29 | |||
30 | {"x":0, "y":4}, | ||
31 | {"x":1, "y":4}, | ||
32 | {"x":2, "y":4}, | ||
33 | |||
34 | {"x":0, "y":5, "w":2}, | ||
35 | {"x":2, "y":5}, | ||
36 | {"x":3, "y":4, "h":2} | ||
37 | ] | ||
38 | } | ||
39 | } | ||
40 | } \ No newline at end of file | ||
diff --git a/keyboards/reversestudio/decadepad/keymaps/default/keymap.c b/keyboards/reversestudio/decadepad/keymaps/default/keymap.c new file mode 100644 index 000000000..695ceac30 --- /dev/null +++ b/keyboards/reversestudio/decadepad/keymaps/default/keymap.c | |||
@@ -0,0 +1,12 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | [0] = LAYOUT_numpad_6x4( | ||
5 | RGB_TOG, RGB_MOD, RGB_VAI, RGB_M_R, | ||
6 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
7 | KC_P7, KC_P8, KC_P9, | ||
8 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
9 | KC_P1, KC_P2, KC_P3, | ||
10 | KC_P0, KC_PDOT, KC_PENT | ||
11 | ) | ||
12 | }; | ||
diff --git a/keyboards/reversestudio/decadepad/keymaps/via/keymap.c b/keyboards/reversestudio/decadepad/keymaps/via/keymap.c new file mode 100644 index 000000000..a9ca41918 --- /dev/null +++ b/keyboards/reversestudio/decadepad/keymaps/via/keymap.c | |||
@@ -0,0 +1,36 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | [0] = LAYOUT_numpad_6x4( | ||
5 | RGB_TOG, RGB_MOD, RGB_VAI, RGB_M_R, | ||
6 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
7 | KC_P7, KC_P8, KC_P9, | ||
8 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
9 | KC_P1, KC_P2, KC_P3, | ||
10 | KC_P0, KC_PDOT, KC_PENT | ||
11 | ), | ||
12 | [1] = LAYOUT_numpad_6x4( | ||
13 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
14 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
15 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
16 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
17 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_TRNS, KC_TRNS | ||
19 | ), | ||
20 | [2] = LAYOUT_numpad_6x4( | ||
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
22 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
23 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS | ||
27 | ), | ||
28 | [3] = LAYOUT_numpad_6x4( | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS | ||
35 | ) | ||
36 | }; | ||
diff --git a/keyboards/reversestudio/decadepad/keymaps/via/rules.mk b/keyboards/reversestudio/decadepad/keymaps/via/rules.mk new file mode 100644 index 000000000..bee21da52 --- /dev/null +++ b/keyboards/reversestudio/decadepad/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | MOUSEKEY_ENABLE = no \ No newline at end of file | ||
diff --git a/keyboards/reversestudio/decadepad/readme.md b/keyboards/reversestudio/decadepad/readme.md new file mode 100644 index 000000000..8b4c9c491 --- /dev/null +++ b/keyboards/reversestudio/decadepad/readme.md | |||
@@ -0,0 +1,12 @@ | |||
1 | # DecadePad | ||
2 | |||
3 | A 6x4 Standard Numpad | ||
4 | |||
5 | * Keyboard Maintainer: [huajijam](https://github.com/huajijam) | ||
6 | * Hardware Supported: DecadePad | ||
7 | |||
8 | Make example for this keyboard (after setting up your build environment): | ||
9 | |||
10 | make reversestudio/decadepad:default | ||
11 | |||
12 | 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/reversestudio/decadepad/rules.mk b/keyboards/reversestudio/decadepad/rules.mk new file mode 100644 index 000000000..7730f09cd --- /dev/null +++ b/keyboards/reversestudio/decadepad/rules.mk | |||
@@ -0,0 +1,38 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | # Teensy halfkay | ||
6 | # Pro Micro caterina | ||
7 | # Atmel DFU atmel-dfu | ||
8 | # LUFA DFU lufa-dfu | ||
9 | # QMK DFU qmk-dfu | ||
10 | # ATmega32A bootloadHID | ||
11 | # ATmega328P USBasp | ||
12 | BOOTLOADER = atmel-dfu | ||
13 | |||
14 | # Build Options | ||
15 | # change yes to no to disable | ||
16 | # | ||
17 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | ||
18 | MOUSEKEY_ENABLE = no # Mouse keys | ||
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
20 | CONSOLE_ENABLE = yes # Console for debug | ||
21 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
25 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
26 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
27 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
28 | MIDI_ENABLE = no # MIDI support | ||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
30 | AUDIO_ENABLE = no # Audio output on port C6 | ||
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
32 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
33 | UNICODE_ENABLE = yes # Unicode | ||
34 | |||
35 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
36 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
37 | |||
38 | LAYOUTS = numpad_6x4 \ No newline at end of file | ||