aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAquaCylinder <56627792+AquaCylinder@users.noreply.github.com>2021-07-29 17:49:51 +0200
committerGitHub <noreply@github.com>2021-07-29 08:49:51 -0700
commitae268596ce9c591b28e80b04516b3ed8936f5aa5 (patch)
tree1165d9ff0d8e9f0dad0da56f519767fece63adb5
parentad6acb3a03b826ce64bc1171d84fe9c364e2031d (diff)
downloadqmk_firmware-ae268596ce9c591b28e80b04516b3ed8936f5aa5.tar.gz
qmk_firmware-ae268596ce9c591b28e80b04516b3ed8936f5aa5.zip
[Keyboard] Add Emi20 (#13603)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/emi20/config.h57
-rw-r--r--keyboards/emi20/emi20.c17
-rw-r--r--keyboards/emi20/emi20.h33
-rw-r--r--keyboards/emi20/info.json33
-rw-r--r--keyboards/emi20/keymaps/default/config.h19
-rw-r--r--keyboards/emi20/keymaps/default/keymap.c92
-rw-r--r--keyboards/emi20/keymaps/default/rules.mk1
-rw-r--r--keyboards/emi20/readme.md17
-rw-r--r--keyboards/emi20/rules.mk22
9 files changed, 291 insertions, 0 deletions
diff --git a/keyboards/emi20/config.h b/keyboards/emi20/config.h
new file mode 100644
index 000000000..98eefdc6a
--- /dev/null
+++ b/keyboards/emi20/config.h
@@ -0,0 +1,57 @@
1/* Copyright 2021 Aquacylinder
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/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0x6060
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Aquacylinder
26#define PRODUCT emi20
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 4
31
32/* key matrix pins */
33#define MATRIX_ROW_PINS { F4, F5, F6, F7, B6 }
34#define MATRIX_COL_PINS { C7, C6, B5, B4 }
35#define UNUSED_PINS
36
37/* COL2ROW or ROW2COL */
38#define DIODE_DIRECTION COL2ROW
39
40/* number of backlight levels */
41
42#ifdef BACKLIGHT_PIN
43#define BACKLIGHT_LEVELS 3
44#endif
45
46/* Set 0 if debouncing isn't needed */
47#define DEBOUNCE 5
48
49
50
51#ifdef RGB_DI_PIN
52#define RGBLIGHT_ANIMATIONS
53#define RGBLED_NUM 0
54#define RGBLIGHT_HUE_STEP 8
55#define RGBLIGHT_SAT_STEP 8
56#define RGBLIGHT_VAL_STEP 8
57#endif
diff --git a/keyboards/emi20/emi20.c b/keyboards/emi20/emi20.c
new file mode 100644
index 000000000..a5bcc89d4
--- /dev/null
+++ b/keyboards/emi20/emi20.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 Aquacylinder
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 "emi20.h"
diff --git a/keyboards/emi20/emi20.h b/keyboards/emi20/emi20.h
new file mode 100644
index 000000000..30d5750e4
--- /dev/null
+++ b/keyboards/emi20/emi20.h
@@ -0,0 +1,33 @@
1/* Copyright 2021 Aquacylinder
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_ortho_5x4( \
22 K00, K01, K02, K03, \
23 K10, K11, K12, K13, \
24 K20, K21, K22, K23, \
25 K30, K31, K32, K33, \
26 K40, K41, K42, K43 \
27) { \
28 { K00, K01, K02, K03 }, \
29 { K10, K11, K12, K13 }, \
30 { K20, K21, K22, K23 }, \
31 { K30, K31, K32, K33 }, \
32 { K40, K41, K42, K43 } \
33}
diff --git a/keyboards/emi20/info.json b/keyboards/emi20/info.json
new file mode 100644
index 000000000..397a2781a
--- /dev/null
+++ b/keyboards/emi20/info.json
@@ -0,0 +1,33 @@
1{
2 "keyboard_name": "Emi20",
3 "url": "",
4 "maintainer": "Aquacylinder",
5 "width": 4,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_ortho_5x4": {
9 "layout": [
10 {"label":"K11 (F7,C7)", "x":1, "y":1},
11 {"label":"K21 (F1,C7)", "x":2, "y":1},
12 {"label":"K31 (B2,C7)", "x":3, "y":1},
13 {"label":"K41 (B2,F0)", "x":4, "y":1},
14 {"label":"K12 (F1,F0)", "x":1, "y":2},
15 {"label":"K22 (B2,B6)", "x":2, "y":2},
16 {"label":"K32 (F1,B6)", "x":3, "y":2},
17 {"label":"K42 (B2,B3)", "x":4, "y":2},
18 {"label":"K13 (F1,B3)", "x":1, "y":3},
19 {"label":"K23 (B2,C6)", "x":2, "y":3},
20 {"label":"K33 (F1,C6)", "x":3, "y":3},
21 {"label":"K43 (B2,E6)", "x":4, "y":3},
22 {"label":"K14 (F1,E6)", "x":1, "y":4},
23 {"label":"K24 (B2,D5)", "x":2, "y":4},
24 {"label":"K34 (F1,D5)", "x":3, "y":4},
25 {"label":"K44 (D0,B1)", "x":4, "y":4},
26 {"label":"K15 (D0,F4)", "x":1, "y":5},
27 {"label":"K25 (F7,D1)", "x":2, "y":5},
28 {"label":"K35 (F7,B3)", "x":3, "y":5},
29 {"label":"K45 (B5,C7)", "x":4, "y":5},
30 ]
31 }
32 }
33}
diff --git a/keyboards/emi20/keymaps/default/config.h b/keyboards/emi20/keymaps/default/config.h
new file mode 100644
index 000000000..02638312a
--- /dev/null
+++ b/keyboards/emi20/keymaps/default/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2021 Aquacylinder
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#define COMBO_COUNT 1
diff --git a/keyboards/emi20/keymaps/default/keymap.c b/keyboards/emi20/keymaps/default/keymap.c
new file mode 100644
index 000000000..4c33ee85e
--- /dev/null
+++ b/keyboards/emi20/keymaps/default/keymap.c
@@ -0,0 +1,92 @@
1/* Copyright 2021 Aquacylinder
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
18bool is_ERESET_active = false;
19uint16_t ERESET_timer = 0;
20
21enum custom_keycodes {
22 MACRO1 = SAFE_RANGE, //MACRO1 can be anything you want see the qmk documentation
23 MACRO2, //MACRO2 Same thing, you can add as many as you like
24};
25
26//Reset combo key naming
27enum combo_events {
28 ENLCK_reset,
29};
30
31//Reset combo key setting the keys
32const uint16_t PROGMEM reset_combo[] = {KC_NLCK, KC_MPLY, COMBO_END};
33
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36 //Macro's are mentioned here allong with the keycodes
37 LAYOUT_ortho_5x4( //Base layer (0)
38 TG(1), KC_VOLD, KC_VOLU, KC_BSPC,
39 KC_P7, KC_P8, KC_P9, KC_PSLS,
40 KC_P4, KC_P5, KC_P6, KC_PAST,
41 KC_P1, KC_P2, KC_P3, KC_PMNS,
42 KC_P0, KC_PDOT, KC_PENT, KC_PPLS),
43
44 LAYOUT_ortho_5x4( //Layer 1
45 KC_TRNS, KC_VOLD, KC_VOLU, KC_CALC,
46 KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT,
47 KC_NO, KC_NO, KC_NO, KC_NO,
48 KC_NO, KC_NO, KC_UP, KC_NO,
49 KC_NLCK, KC_LEFT, KC_DOWN, KC_RGHT),
50 //Copy any layer and edit it for more layers, be sure to add a key to go to that layer
51};
52
53//Reset combo key setting
54combo_t key_combos[COMBO_COUNT] = {
55 [ENLCK_reset] = COMBO_ACTION(reset_combo),
56};
57
58bool process_record_user(uint16_t keycode, keyrecord_t *record) {
59 switch (keycode) {
60 case MACRO1: //This is where the macro's are located
61 if (record->event.pressed) {
62 // when keycode MACRO1 is pressed
63 SEND_STRING("Thank you");
64 } else {
65 // when keycode MACRO1 is released
66 SEND_STRING("for being you <3");
67 }
68 break;
69
70 case MACRO2:
71 if (record->event.pressed) {
72 // when keycode MACRO2 is pressed
73 SEND_STRING("Pizza is");
74 } else {
75 // when keycode MACRO2 is released
76 SEND_STRING("delicious ;)");
77 }
78 break;
79 }
80 return true;
81}
82
83//Reset key combo and a example to make our own, more complex, macro's
84void process_combo_event(uint16_t combo_index, bool pressed) {
85 switch(combo_index) {
86 case ENLCK_reset:
87 if (pressed) {
88 reset_keyboard();
89 }
90 break;
91 }
92}
diff --git a/keyboards/emi20/keymaps/default/rules.mk b/keyboards/emi20/keymaps/default/rules.mk
new file mode 100644
index 000000000..ff681299e
--- /dev/null
+++ b/keyboards/emi20/keymaps/default/rules.mk
@@ -0,0 +1 @@
COMBO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/emi20/readme.md b/keyboards/emi20/readme.md
new file mode 100644
index 000000000..839503635
--- /dev/null
+++ b/keyboards/emi20/readme.md
@@ -0,0 +1,17 @@
1# Emi20
2
3![Emi20](https://i.imgur.com/Tt9ogmWl.jpg)
4
5A compact 4x5 ortholinear keyboard made by Project Aqua and sold by Evil-cables.
6
7* Keyboard Maintainer: [AquaCylinder](https://github.com/AquaCylinder)
8* Hardware Supported: PCB, Atmega32u4
9
10Make example for this keyboard (after setting up your build environment):
11
12 make emi20:default
13
14To reset the board into bootloader mode, press the physical reset button on the back of the PCB or use the keycombo (on layer 1) with the bottom left key and the second key from the top right diagonally.
15
16The default keymap.c file has comments to help you on your journey,
17See 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/emi20/rules.mk b/keyboards/emi20/rules.mk
new file mode 100644
index 000000000..81598c2f7
--- /dev/null
+++ b/keyboards/emi20/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 = 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 = yes # 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