aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-08-24 15:44:36 +0000
committerQMK Bot <hello@qmk.fm>2021-08-24 15:44:36 +0000
commit2827a3cf754c2eaca37a0d44a5901741f1855414 (patch)
treec4715bb060b6b49f6d34ee3432f408ff3f257333
parenta8d65473461c337fb1e168d907bfb8c3ac8fdbd0 (diff)
parentb4867e1600baa615ec9b28421fc23d4b85bad8ec (diff)
downloadqmk_firmware-2827a3cf754c2eaca37a0d44a5901741f1855414.tar.gz
qmk_firmware-2827a3cf754c2eaca37a0d44a5901741f1855414.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/yoichiro/lunakey_macro/config.h158
-rw-r--r--keyboards/yoichiro/lunakey_macro/info.json68
-rw-r--r--keyboards/yoichiro/lunakey_macro/keymaps/default/keymap.c41
-rw-r--r--keyboards/yoichiro/lunakey_macro/keymaps/default/readme.md1
-rw-r--r--keyboards/yoichiro/lunakey_macro/keymaps/via/keymap.c56
-rw-r--r--keyboards/yoichiro/lunakey_macro/keymaps/via/readme.md1
-rw-r--r--keyboards/yoichiro/lunakey_macro/keymaps/via/rules.mk4
-rw-r--r--keyboards/yoichiro/lunakey_macro/lunakey_macro.c17
-rw-r--r--keyboards/yoichiro/lunakey_macro/lunakey_macro.h37
-rw-r--r--keyboards/yoichiro/lunakey_macro/readme.md21
-rw-r--r--keyboards/yoichiro/lunakey_macro/rules.mk22
11 files changed, 426 insertions, 0 deletions
diff --git a/keyboards/yoichiro/lunakey_macro/config.h b/keyboards/yoichiro/lunakey_macro/config.h
new file mode 100644
index 000000000..d68f69f51
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/config.h
@@ -0,0 +1,158 @@
1/*
2Copyright 2020 Yoichiro Tanaka
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x5954 // "YT" - Yoichiro Tanaka
24#define PRODUCT_ID 0x0002
25#define DEVICE_VER 0x0001
26#define MANUFACTURER yoichiro
27#define PRODUCT Lunakey Macro
28
29/* key matrix size */
30#define MATRIX_ROWS 3
31#define MATRIX_COLS 4
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 { E6, B4, B5 }
44#define MATRIX_COL_PINS { B6, B2, B3, B1 }
45#define UNUSED_PINS
46
47/* COL2ROW, ROW2COL */
48#define DIODE_DIRECTION COL2ROW
49
50/* Audio support */
51#define AUDIO_PIN C6
52
53#ifdef AUDIO_ENABLE
54 #define STARTUP_SONG SONG(E__NOTE(_C7), E__NOTE(_C6))
55#endif
56
57/* Mouse Keys Combined mode */
58//#define MK_COMBINED
59
60/* Layer Count */
61#define DYNAMIC_KEYMAP_LAYER_COUNT 3
62
63/*
64 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
65 */
66//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
67
68//#define BACKLIGHT_PIN B7
69//#define BACKLIGHT_LEVELS 3
70//#define BACKLIGHT_BREATHING
71
72#define RGB_DI_PIN D3
73#ifdef RGB_DI_PIN
74 #define RGBLED_NUM 5
75 #define RGBLIGHT_HUE_STEP 8
76 #define RGBLIGHT_SAT_STEP 8
77 #define RGBLIGHT_VAL_STEP 8
78 #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
79 #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
80// #define RGBLIGHT_LAYERS
81#define RGBLIGHT_EFFECT_BREATHING
82#define RGBLIGHT_EFFECT_RAINBOW_MOOD
83#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
84#define RGBLIGHT_EFFECT_SNAKE
85#define RGBLIGHT_EFFECT_KNIGHT
86#define RGBLIGHT_EFFECT_CHRISTMAS
87#define RGBLIGHT_EFFECT_STATIC_GRADIENT
88#define RGBLIGHT_EFFECT_RGB_TEST
89#define RGBLIGHT_EFFECT_ALTERNATING
90#define RGBLIGHT_EFFECT_TWINKLE
91/*== customize breathing effect ==*/
92/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
93//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
94/*==== use exp() and sin() ====*/
95//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
96//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
97#endif
98
99/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
100#define DEBOUNCE 5
101
102/* define if matrix has ghost (lacks anti-ghosting diodes) */
103//#define MATRIX_HAS_GHOST
104
105/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
106//#define LOCKING_SUPPORT_ENABLE
107/* Locking resynchronize hack */
108//#define LOCKING_RESYNC_ENABLE
109
110/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
111 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
112 */
113//#define GRAVE_ESC_CTRL_OVERRIDE
114
115/*
116 * Force NKRO
117 *
118 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
119 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
120 * makefile for this to work.)
121 *
122 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
123 * until the next keyboard reset.
124 *
125 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
126 * fully operational during normal computer usage.
127 *
128 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
129 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
130 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
131 * power-up.
132 *
133 */
134//#define FORCE_NKRO
135
136/*
137 * Feature disable options
138 * These options are also useful to firmware size reduction.
139 */
140
141/* disable debug print */
142//#define NO_DEBUG
143
144/* disable print */
145//#define NO_PRINT
146
147/* disable action features */
148//#define NO_ACTION_LAYER
149//#define NO_ACTION_TAPPING
150//#define NO_ACTION_ONESHOT
151
152/* disable these deprecated features by default */
153#define NO_ACTION_MACRO
154#define NO_ACTION_FUNCTION
155
156/* Bootmagic Lite key configuration */
157//#define BOOTMAGIC_LITE_ROW 0
158//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/yoichiro/lunakey_macro/info.json b/keyboards/yoichiro/lunakey_macro/info.json
new file mode 100644
index 000000000..25e3bd8d3
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/info.json
@@ -0,0 +1,68 @@
1{
2 "keyboard_name": "Lunakey Macro",
3 "url": "",
4 "maintainer": "Yoichiro Tanaka",
5 "width": 4.5,
6 "height": 4,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {
11 "label": "0,2",
12 "x": 2.5,
13 "y": 0
14 },
15 {
16 "label": "0,1",
17 "x": 1.5,
18 "y": 0.175
19 },
20 {
21 "label": "0,0",
22 "x": 0.5,
23 "y": 0.5
24 },
25 {
26 "label": "0,3",
27 "x": 3.5,
28 "y": 0.5
29 },
30 {
31 "label": "1,2",
32 "x": 2.5,
33 "y": 1
34 },
35 {
36 "label": "1,1",
37 "x": 1.5,
38 "y": 1.175
39 },
40 {
41 "label": "1,0",
42 "x": 0.5,
43 "y": 1.5
44 },
45 {
46 "label": "1,3",
47 "x": 3.5,
48 "y": 1.5
49 },
50 {
51 "label": "2,1",
52 "x": 1,
53 "y": 2.75
54 },
55 {
56 "label": "2,0",
57 "x": 0,
58 "y": 3
59 },
60 {
61 "label": "2,2",
62 "x": 2,
63 "y": 3
64 }
65 ]
66 }
67 }
68}
diff --git a/keyboards/yoichiro/lunakey_macro/keymaps/default/keymap.c b/keyboards/yoichiro/lunakey_macro/keymaps/default/keymap.c
new file mode 100644
index 000000000..1b2055b74
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/keymaps/default/keymap.c
@@ -0,0 +1,41 @@
1/* Copyright 2020 Yoichiro Tanaka
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
19enum layer_names {
20 _NUMBERS,
21 _CURSOR,
22 _ADJUST
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 [_NUMBERS] = LAYOUT(
27 KC_1, KC_2, KC_3, KC_4,
28 KC_5, KC_6, KC_7, KC_8,
29 KC_9, KC_0, DF(_CURSOR)
30 ),
31 [_CURSOR] = LAYOUT(
32 KC_PGUP, KC_HOME, KC_UP, KC_END,
33 KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT,
34 KC_ENT, KC_BSPC, DF(_ADJUST)
35 ),
36 [_ADJUST] = LAYOUT(
37 KC_NO, KC_NO, KC_NO, KC_NO,
38 KC_NO, KC_NO, KC_NO, KC_NO,
39 RESET, KC_NO, DF(_NUMBERS)
40 )
41};
diff --git a/keyboards/yoichiro/lunakey_macro/keymaps/default/readme.md b/keyboards/yoichiro/lunakey_macro/keymaps/default/readme.md
new file mode 100644
index 000000000..b079aa9fa
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for Lunakey Macro
diff --git a/keyboards/yoichiro/lunakey_macro/keymaps/via/keymap.c b/keyboards/yoichiro/lunakey_macro/keymaps/via/keymap.c
new file mode 100644
index 000000000..a3a203df6
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/keymaps/via/keymap.c
@@ -0,0 +1,56 @@
1/* Copyright 2020 Yoichiro Tanaka
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
19enum layer_names {
20 _NUMBERS,
21 _CURSOR,
22 _ADJUST
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 [_NUMBERS] = LAYOUT(
27 KC_1, KC_2, KC_3, KC_4,
28 KC_5, KC_6, KC_7, KC_8,
29 KC_9, KC_0, DF(_CURSOR)
30 ),
31 [_CURSOR] = LAYOUT(
32 KC_PGUP, KC_HOME, KC_UP, KC_END,
33 KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT,
34 KC_ENT, KC_BSPC, DF(_ADJUST)
35 ),
36 [_ADJUST] = LAYOUT(
37 RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD,
38 AU_TOG, CK_TOGG, MU_TOG, MU_MOD,
39 RESET, KC_NO, DF(_NUMBERS)
40 )
41};
42
43bool process_record_user(uint16_t keycode, keyrecord_t *record) {
44 float next_song[][2] = SONG(E__NOTE(_A6));
45 float back_song[][2] = SONG(H__NOTE(_D2));
46 switch (keycode) {
47 case DF(_NUMBERS):
48 case DF(_CURSOR):
49 PLAY_SONG(next_song);
50 break;
51 case DF(_ADJUST):
52 PLAY_SONG(back_song);
53 break;
54 }
55 return true;
56}
diff --git a/keyboards/yoichiro/lunakey_macro/keymaps/via/readme.md b/keyboards/yoichiro/lunakey_macro/keymaps/via/readme.md
new file mode 100644
index 000000000..4e74b05bc
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/keymaps/via/readme.md
@@ -0,0 +1 @@
# The keymap supporing VIA for Lunakey Macro
diff --git a/keyboards/yoichiro/lunakey_macro/keymaps/via/rules.mk b/keyboards/yoichiro/lunakey_macro/keymaps/via/rules.mk
new file mode 100644
index 000000000..19658b7e4
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/keymaps/via/rules.mk
@@ -0,0 +1,4 @@
1AUDIO_ENABLE = yes
2RGBLIGHT_ENABLE = yes
3LTO_ENABLE = yes
4VIA_ENABLE = yes
diff --git a/keyboards/yoichiro/lunakey_macro/lunakey_macro.c b/keyboards/yoichiro/lunakey_macro/lunakey_macro.c
new file mode 100644
index 000000000..5ef38f70c
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/lunakey_macro.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 Yoichiro Tanaka
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 "lunakey_macro.h"
diff --git a/keyboards/yoichiro/lunakey_macro/lunakey_macro.h b/keyboards/yoichiro/lunakey_macro/lunakey_macro.h
new file mode 100644
index 000000000..487b7fe20
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/lunakey_macro.h
@@ -0,0 +1,37 @@
1/* Copyright 2020 Yoichiro Tanaka
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, \
31 k10, k11, k12, k13, \
32 k20, k21, k22 \
33) { \
34 { k00, k01, k02, k03 }, \
35 { k10, k11, k12, k13 }, \
36 { k20, k21, k22, KC_NO } \
37}
diff --git a/keyboards/yoichiro/lunakey_macro/readme.md b/keyboards/yoichiro/lunakey_macro/readme.md
new file mode 100644
index 000000000..440845d07
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/readme.md
@@ -0,0 +1,21 @@
1# Lunakey Macro
2
3![Lunakey Macro](https://i.imgur.com/BirFxgYh.jpeg)
4
5This is a macro keyboard which has 11 keys.
6
7* Keyboard Maintainer: [Yoichiro Tanaka](https://github.com/yoichiro)
8* Hardware Supported: Lunakey Macro PCB, Pro Micro MCU.
9* Hardware Availability: Published yet.
10
11Make example for this keyboard (after setting up your build environment):
12
13 make lunakey_macro:default
14
15Flashing example for this keyboard:
16
17 make lunakey_macro:default:flash
18
19To enter the bootloader mode, you push the black tact switch next to the ProMicro.
20
21See 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/yoichiro/lunakey_macro/rules.mk b/keyboards/yoichiro/lunakey_macro/rules.mk
new file mode 100644
index 000000000..60a579e02
--- /dev/null
+++ b/keyboards/yoichiro/lunakey_macro/rules.mk
@@ -0,0 +1,22 @@
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 = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = no # 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 = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output