aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorduoshock <33636898+duoshock@users.noreply.github.com>2021-01-14 06:57:55 +0000
committerGitHub <noreply@github.com>2021-01-13 22:57:55 -0800
commit1f38221ec5ea95429fe3dbc739065b5598fedfc9 (patch)
tree8c02ecceb50132255e0acf7ea7979f5b62aa4aeb /keyboards
parent68c3773c8ee9d409b4234f7c55d83567982474d4 (diff)
downloadqmk_firmware-1f38221ec5ea95429fe3dbc739065b5598fedfc9.tar.gz
qmk_firmware-1f38221ec5ea95429fe3dbc739065b5598fedfc9.zip
[Keyboard] Add ISO Macro keyboard (#11517)
* - * - * - * - * - Co-authored-by: online <33636898+online@users.noreply.github.com>
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/merge/iso_macro/config.h42
-rw-r--r--keyboards/merge/iso_macro/iso_macro.c17
-rw-r--r--keyboards/merge/iso_macro/iso_macro.h29
-rw-r--r--keyboards/merge/iso_macro/keymaps/default/keymap.c49
-rw-r--r--keyboards/merge/iso_macro/keymaps/default/readme.md5
-rw-r--r--keyboards/merge/iso_macro/keymaps/via/keymap.c64
-rw-r--r--keyboards/merge/iso_macro/keymaps/via/rules.mk2
-rw-r--r--keyboards/merge/iso_macro/readme.md14
-rw-r--r--keyboards/merge/iso_macro/rules.mk23
9 files changed, 245 insertions, 0 deletions
diff --git a/keyboards/merge/iso_macro/config.h b/keyboards/merge/iso_macro/config.h
new file mode 100644
index 000000000..5ad63c134
--- /dev/null
+++ b/keyboards/merge/iso_macro/config.h
@@ -0,0 +1,42 @@
1 /* Copyright 2021 duoshock
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 0xFEED
22#define PRODUCT_ID 0x1200
23#define DEVICE_VER 0x0001
24#define MANUFACTURER Merge
25#define PRODUCT ISO Macro
26
27/* key matrix size */
28#define MATRIX_ROWS 3
29#define MATRIX_COLS 3
30
31#define MATRIX_ROW_PINS { F4, F5, F6}
32#define MATRIX_COL_PINS { B4, B5, B6}
33#define UNUSED_PINS
34#define BACKLIGHT_PIN B7
35
36/* COL2ROW or ROW2COL */
37#define DIODE_DIRECTION COL2ROW
38
39
40#define ENCODERS_PAD_A { F0, D0 }
41#define ENCODERS_PAD_B { F1, D1 }
42#define ENCODER_RESOLUTION 4
diff --git a/keyboards/merge/iso_macro/iso_macro.c b/keyboards/merge/iso_macro/iso_macro.c
new file mode 100644
index 000000000..6052f9cce
--- /dev/null
+++ b/keyboards/merge/iso_macro/iso_macro.c
@@ -0,0 +1,17 @@
1 /* Copyright 2021 duoshock
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 "iso_macro.h"
diff --git a/keyboards/merge/iso_macro/iso_macro.h b/keyboards/merge/iso_macro/iso_macro.h
new file mode 100644
index 000000000..dfa938644
--- /dev/null
+++ b/keyboards/merge/iso_macro/iso_macro.h
@@ -0,0 +1,29 @@
1 /* Copyright 2021 duoshock
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#define LAYOUT( \
22 k21, k00, k01, k02, k20, \
23 k22, k10, k11, k12 \
24) \
25{ \
26 { k00, k01, k02 }, \
27 { k10, k11, k12 }, \
28 { k20, k21, k22 } \
29}
diff --git a/keyboards/merge/iso_macro/keymaps/default/keymap.c b/keyboards/merge/iso_macro/keymaps/default/keymap.c
new file mode 100644
index 000000000..a86d35502
--- /dev/null
+++ b/keyboards/merge/iso_macro/keymaps/default/keymap.c
@@ -0,0 +1,49 @@
1/* Copyright 2021 duoshock
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 QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20
21/* LAYER 0
22 * ,---------------------------------------------.
23 * | Encoder A | 4 | 5 | 6 | Enter |
24 * |------------|-------+-------+-------| |
25 * | Encoder B | 1 | 2 | 3 | |
26 * `---------------------------------------------'
27 */
28[0] = LAYOUT(
29 KC_HOME, KC_4, KC_5, KC_6, KC_ENT,
30 KC_MUTE, KC_1, KC_2, KC_3
31),
32};
33
34
35void encoder_update_user(uint8_t index, bool clockwise) {
36 if (index == 0) { // Encdoer A
37 if (clockwise) {
38 tap_code(KC_UP);
39 } else {
40 tap_code(KC_DOWN);
41 }
42 } else if (index == 1) { // Encoder B
43 if (clockwise) {
44 tap_code(KC_VOLU);
45 } else {
46 tap_code(KC_VOLD);
47 }
48 }
49} \ No newline at end of file
diff --git a/keyboards/merge/iso_macro/keymaps/default/readme.md b/keyboards/merge/iso_macro/keymaps/default/readme.md
new file mode 100644
index 000000000..008d125d4
--- /dev/null
+++ b/keyboards/merge/iso_macro/keymaps/default/readme.md
@@ -0,0 +1,5 @@
1# Default ISO Macro Layout
2
3![ISO Macro Layout Image](https://i.imgur.com/5NEfKVz.jpg)
4
5This is the default layout that comes flashed on every ISO Macro.
diff --git a/keyboards/merge/iso_macro/keymaps/via/keymap.c b/keyboards/merge/iso_macro/keymaps/via/keymap.c
new file mode 100644
index 000000000..b97e79acf
--- /dev/null
+++ b/keyboards/merge/iso_macro/keymaps/via/keymap.c
@@ -0,0 +1,64 @@
1 /* Copyright 2021 duoshock
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 QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20
21/* LAYER 0
22 * ,---------------------------------------------.
23 * | Encoder A | 4 | 5 | 6 | Enter |
24 * |------------|-------+-------+-------| |
25 * | Encoder B | 1 | 2 | 3 | |
26 * `---------------------------------------------'
27 */
28[0] = LAYOUT(
29 BL_TOGG, KC_4, KC_5, KC_6, KC_ENT,
30 KC_MUTE, KC_1, KC_2, KC_3
31),
32
33[1] = LAYOUT(
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
36),
37
38[2] = LAYOUT(
39 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
40 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
41),
42
43[3] = LAYOUT(
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
46),
47};
48
49
50void encoder_update_user(uint8_t index, bool clockwise) {
51 if (index == 0) { // Encoder A
52 if (clockwise) {
53 backlight_increase();
54 } else {
55 backlight_decrease();
56 }
57 } else if (index == 1) { // Encoder B
58 if (clockwise) {
59 tap_code(KC_VOLU);
60 } else {
61 tap_code(KC_VOLD);
62 }
63 }
64} \ No newline at end of file
diff --git a/keyboards/merge/iso_macro/keymaps/via/rules.mk b/keyboards/merge/iso_macro/keymaps/via/rules.mk
new file mode 100644
index 000000000..43061db1d
--- /dev/null
+++ b/keyboards/merge/iso_macro/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/merge/iso_macro/readme.md b/keyboards/merge/iso_macro/readme.md
new file mode 100644
index 000000000..654ede4fd
--- /dev/null
+++ b/keyboards/merge/iso_macro/readme.md
@@ -0,0 +1,14 @@
1# ISO Macro
2
3![ISO Macro](https://i.imgur.com/wJoaZ8xl.jpg)
4
5A 7 keys macro pad with 2 encoders made and sold by Merge. [Product page](https://mergedesign.store/products/iso-macro)
6
7* Keyboard Maintainer: [duoshock](https://github.com/duoshock)
8* Hardware Availability: [Merge Store](https://mergedesign.store/products/iso-macro)
9
10Make example for this keyboard (after setting up your build environment):
11
12 make merge/isomacro:default
13
14See 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). \ No newline at end of file
diff --git a/keyboards/merge/iso_macro/rules.mk b/keyboards/merge/iso_macro/rules.mk
new file mode 100644
index 000000000..43659757f
--- /dev/null
+++ b/keyboards/merge/iso_macro/rules.mk
@@ -0,0 +1,23 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # 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 = yes # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23ENCODER_ENABLE = yes \ No newline at end of file