diff options
author | Rifaa Subekti <68178825+oceeean@users.noreply.github.com> | 2022-01-13 06:15:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 14:15:27 -0800 |
commit | 6d06e7ce84f5e7133bf75764abdb012122468d7c (patch) | |
tree | 8a3069fbdb4502604f104ef4319aa7e577ac0f59 | |
parent | 4c8bb05dab67d0048200f3941cb97ed753cc4ae5 (diff) | |
download | qmk_firmware-6d06e7ce84f5e7133bf75764abdb012122468d7c.tar.gz qmk_firmware-6d06e7ce84f5e7133bf75764abdb012122468d7c.zip |
[Keyboard] add AddOn macropad (#15841)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/ocean/addon/addon.c | 15 | ||||
-rw-r--r-- | keyboards/ocean/addon/addon.h | 35 | ||||
-rw-r--r-- | keyboards/ocean/addon/config.h | 51 | ||||
-rw-r--r-- | keyboards/ocean/addon/info.json | 45 | ||||
-rw-r--r-- | keyboards/ocean/addon/keymaps/default/keymap.c | 50 | ||||
-rw-r--r-- | keyboards/ocean/addon/keymaps/via/keymap.c | 50 | ||||
-rw-r--r-- | keyboards/ocean/addon/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/ocean/addon/readme.md | 24 | ||||
-rw-r--r-- | keyboards/ocean/addon/rules.mk | 18 |
9 files changed, 290 insertions, 0 deletions
diff --git a/keyboards/ocean/addon/addon.c b/keyboards/ocean/addon/addon.c new file mode 100644 index 000000000..01a815a27 --- /dev/null +++ b/keyboards/ocean/addon/addon.c | |||
@@ -0,0 +1,15 @@ | |||
1 | /* Copyright 2022 Ocean | ||
2 | * This program is free software: you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation, either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
14 | */ | ||
15 | #include "addon.h" | ||
diff --git a/keyboards/ocean/addon/addon.h b/keyboards/ocean/addon/addon.h new file mode 100644 index 000000000..82bc2eee2 --- /dev/null +++ b/keyboards/ocean/addon/addon.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright 2022 Ocean | ||
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 | #define XXX KC_NO | ||
21 | |||
22 | #define LAYOUT(\ | ||
23 | K00, K01, K02, K03, K04, K05, K06, \ | ||
24 | K10, K11, K12, K13, K14, K15, K16, \ | ||
25 | K20, K21, K22, K23, K24, K25, K26, \ | ||
26 | K30, K31, K32, K33, K34, K35, K36, \ | ||
27 | K40, K41, K42, K43, K44, K45, K46 \ | ||
28 | ) \ | ||
29 | { \ | ||
30 | { K00, K01, K02, K03, K04, K05, K06 }, \ | ||
31 | { K10, K11, K12, K13, K14, K15, K16 }, \ | ||
32 | { K20, K21, K22, K23, K24, K25, K26 }, \ | ||
33 | { K30, K31, K32, K33, K34, K35, K36 }, \ | ||
34 | { K40, K41, K42, K43, K44, K45, K46 } \ | ||
35 | } | ||
diff --git a/keyboards/ocean/addon/config.h b/keyboards/ocean/addon/config.h new file mode 100644 index 000000000..1b221b65b --- /dev/null +++ b/keyboards/ocean/addon/config.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /*Copyright 2022 Ocean | ||
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 "config_common.h" | ||
20 | |||
21 | #define VENDOR_ID 0x9624 | ||
22 | #define PRODUCT_ID 0x0012 | ||
23 | #define DEVICE_VER 0x0001 | ||
24 | #define MANUFACTURER Ocean | ||
25 | #define PRODUCT AddOn | ||
26 | |||
27 | /* key matrix size */ | ||
28 | #define MATRIX_ROWS 5 | ||
29 | #define MATRIX_COLS 7 | ||
30 | |||
31 | /* | ||
32 | * Keyboard Matrix Assignments | ||
33 | * | ||
34 | * Change this to how you wired your keyboard | ||
35 | * COLS: AVR pins used for columns, left to right | ||
36 | * ROWS: AVR pins used for rows, top to bottom | ||
37 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
38 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
39 | * | ||
40 | */ | ||
41 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ | ||
42 | #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } | ||
43 | #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } | ||
44 | #define UNUSED_PINS { D0, D1, D2, D3, D4, F4 } | ||
45 | |||
46 | /* COL2ROW, ROW2COL*/ | ||
47 | #define DIODE_DIRECTION ROW2COL | ||
48 | |||
49 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
50 | #define DEBOUNCE 5 | ||
51 | |||
diff --git a/keyboards/ocean/addon/info.json b/keyboards/ocean/addon/info.json new file mode 100644 index 000000000..75e1eb2c4 --- /dev/null +++ b/keyboards/ocean/addon/info.json | |||
@@ -0,0 +1,45 @@ | |||
1 | { | ||
2 | "keyboard_name": "AddOn", | ||
3 | "url": "tokopedia.com/kbdksp", | ||
4 | "maintainer": "Ocean", | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
7 | "layout": [ | ||
8 | {"x":0, "y":0}, | ||
9 | {"x":1, "y":0}, | ||
10 | {"x":2, "y":0}, | ||
11 | {"x":3.25, "y":0}, | ||
12 | {"x":4.25, "y":0}, | ||
13 | {"x":5.25, "y":0}, | ||
14 | {"x":6.25, "y":0}, | ||
15 | {"x":0, "y":1}, | ||
16 | {"x":1, "y":1}, | ||
17 | {"x":2, "y":1}, | ||
18 | {"x":3.25, "y":1}, | ||
19 | {"x":4.25, "y":1}, | ||
20 | {"x":5.25, "y":1}, | ||
21 | {"x":6.25, "y":1}, | ||
22 | {"x":0, "y":2}, | ||
23 | {"x":1, "y":2}, | ||
24 | {"x":2, "y":2}, | ||
25 | {"x":3.25, "y":2}, | ||
26 | {"x":4.25, "y":2}, | ||
27 | {"x":5.25, "y":2}, | ||
28 | {"x":6.25, "y":2}, | ||
29 | {"x":0, "y":3}, | ||
30 | {"x":1, "y":3}, | ||
31 | {"x":2, "y":3}, | ||
32 | {"x":3.25, "y":3}, | ||
33 | {"x":4.25, "y":3}, | ||
34 | {"x":5.25, "y":3}, | ||
35 | {"x":6.25, "y":3}, | ||
36 | {"x":0, "y":4}, | ||
37 | {"x":1, "y":4}, | ||
38 | {"x":2, "y":4}, | ||
39 | {"x":3.25, "y":4}, | ||
40 | {"x":4.25, "y":4}, | ||
41 | {"x":5.25, "y":4}, | ||
42 | {"x":6.25, "y":4}] | ||
43 | } | ||
44 | } | ||
45 | } \ No newline at end of file | ||
diff --git a/keyboards/ocean/addon/keymaps/default/keymap.c b/keyboards/ocean/addon/keymaps/default/keymap.c new file mode 100644 index 000000000..b20eac7d1 --- /dev/null +++ b/keyboards/ocean/addon/keymaps/default/keymap.c | |||
@@ -0,0 +1,50 @@ | |||
1 | /* Copyright 2022 Ocean | ||
2 | * This program is free software: you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation, either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
14 | */ | ||
15 | #include QMK_KEYBOARD_H | ||
16 | |||
17 | // clang-format off | ||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT( | ||
20 | KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
21 | KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
22 | KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
23 | KC_TRNS, KC_UP, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
24 | KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_P0, KC_PDOT, KC_PENT | ||
25 | ), | ||
26 | |||
27 | [1] = LAYOUT( | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
33 | ), | ||
34 | |||
35 | [2] = LAYOUT( | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
41 | ), | ||
42 | |||
43 | [3] = LAYOUT( | ||
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
49 | ), | ||
50 | }; | ||
diff --git a/keyboards/ocean/addon/keymaps/via/keymap.c b/keyboards/ocean/addon/keymaps/via/keymap.c new file mode 100644 index 000000000..b20eac7d1 --- /dev/null +++ b/keyboards/ocean/addon/keymaps/via/keymap.c | |||
@@ -0,0 +1,50 @@ | |||
1 | /* Copyright 2022 Ocean | ||
2 | * This program is free software: you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation, either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
14 | */ | ||
15 | #include QMK_KEYBOARD_H | ||
16 | |||
17 | // clang-format off | ||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT( | ||
20 | KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
21 | KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
22 | KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
23 | KC_TRNS, KC_UP, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
24 | KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_P0, KC_PDOT, KC_PENT | ||
25 | ), | ||
26 | |||
27 | [1] = LAYOUT( | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
33 | ), | ||
34 | |||
35 | [2] = LAYOUT( | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
41 | ), | ||
42 | |||
43 | [3] = LAYOUT( | ||
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
49 | ), | ||
50 | }; | ||
diff --git a/keyboards/ocean/addon/keymaps/via/rules.mk b/keyboards/ocean/addon/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/ocean/addon/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/ocean/addon/readme.md b/keyboards/ocean/addon/readme.md new file mode 100644 index 000000000..eaaef4e3b --- /dev/null +++ b/keyboards/ocean/addon/readme.md | |||
@@ -0,0 +1,24 @@ | |||
1 | # AddOn | ||
2 | |||
3 |  | ||
4 | |||
5 | |||
6 | Navigation cluster and numpad for 60% keyboard | ||
7 | |||
8 | * Keyboard Maintainer: Ocean | ||
9 | * Hardware Supported: AddOn, Pro Micro | ||
10 | * Hardware Availability: [Keyboard Kasep Co.](https://tokopedia.com/kbdksp/) | ||
11 | |||
12 | Make example for this keyboard (after setting up your build environment): | ||
13 | |||
14 | make ocean/addon:default | ||
15 | |||
16 | Flashing example for this keyboard: | ||
17 | |||
18 | make ocean/addon:default:flash | ||
19 | |||
20 | ## Bootloader | ||
21 | |||
22 | To Enter the bootloader you can double click reset button on board when you flash the firmware | ||
23 | |||
24 | 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/ocean/addon/rules.mk b/keyboards/ocean/addon/rules.mk new file mode 100644 index 000000000..7c7061668 --- /dev/null +++ b/keyboards/ocean/addon/rules.mk | |||
@@ -0,0 +1,18 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = caterina | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # 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 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||