1
0
Fork 0

[Keyboard] Add Emi20 (#13603)

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
AquaCylinder 2021-07-29 17:49:51 +02:00 committed by GitHub
parent ad6acb3a03
commit ae268596ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 291 additions and 0 deletions

57
keyboards/emi20/config.h Normal file
View file

@ -0,0 +1,57 @@
/* Copyright 2021 Aquacylinder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Aquacylinder
#define PRODUCT emi20
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 4
/* key matrix pins */
#define MATRIX_ROW_PINS { F4, F5, F6, F7, B6 }
#define MATRIX_COL_PINS { C7, C6, B5, B4 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 0
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

17
keyboards/emi20/emi20.c Normal file
View file

@ -0,0 +1,17 @@
/* Copyright 2021 Aquacylinder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "emi20.h"

33
keyboards/emi20/emi20.h Normal file
View file

@ -0,0 +1,33 @@
/* Copyright 2021 Aquacylinder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define LAYOUT_ortho_5x4( \
K00, K01, K02, K03, \
K10, K11, K12, K13, \
K20, K21, K22, K23, \
K30, K31, K32, K33, \
K40, K41, K42, K43 \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 } \
}

33
keyboards/emi20/info.json Normal file
View file

@ -0,0 +1,33 @@
{
"keyboard_name": "Emi20",
"url": "",
"maintainer": "Aquacylinder",
"width": 4,
"height": 5,
"layouts": {
"LAYOUT_ortho_5x4": {
"layout": [
{"label":"K11 (F7,C7)", "x":1, "y":1},
{"label":"K21 (F1,C7)", "x":2, "y":1},
{"label":"K31 (B2,C7)", "x":3, "y":1},
{"label":"K41 (B2,F0)", "x":4, "y":1},
{"label":"K12 (F1,F0)", "x":1, "y":2},
{"label":"K22 (B2,B6)", "x":2, "y":2},
{"label":"K32 (F1,B6)", "x":3, "y":2},
{"label":"K42 (B2,B3)", "x":4, "y":2},
{"label":"K13 (F1,B3)", "x":1, "y":3},
{"label":"K23 (B2,C6)", "x":2, "y":3},
{"label":"K33 (F1,C6)", "x":3, "y":3},
{"label":"K43 (B2,E6)", "x":4, "y":3},
{"label":"K14 (F1,E6)", "x":1, "y":4},
{"label":"K24 (B2,D5)", "x":2, "y":4},
{"label":"K34 (F1,D5)", "x":3, "y":4},
{"label":"K44 (D0,B1)", "x":4, "y":4},
{"label":"K15 (D0,F4)", "x":1, "y":5},
{"label":"K25 (F7,D1)", "x":2, "y":5},
{"label":"K35 (F7,B3)", "x":3, "y":5},
{"label":"K45 (B5,C7)", "x":4, "y":5},
]
}
}
}

View file

@ -0,0 +1,19 @@
/* Copyright 2021 Aquacylinder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define COMBO_COUNT 1

View file

@ -0,0 +1,92 @@
/* Copyright 2021 Aquacylinder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
bool is_ERESET_active = false;
uint16_t ERESET_timer = 0;
enum custom_keycodes {
MACRO1 = SAFE_RANGE, //MACRO1 can be anything you want see the qmk documentation
MACRO2, //MACRO2 Same thing, you can add as many as you like
};
//Reset combo key naming
enum combo_events {
ENLCK_reset,
};
//Reset combo key setting the keys
const uint16_t PROGMEM reset_combo[] = {KC_NLCK, KC_MPLY, COMBO_END};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//Macro's are mentioned here allong with the keycodes
LAYOUT_ortho_5x4( //Base layer (0)
TG(1), KC_VOLD, KC_VOLU, KC_BSPC,
KC_P7, KC_P8, KC_P9, KC_PSLS,
KC_P4, KC_P5, KC_P6, KC_PAST,
KC_P1, KC_P2, KC_P3, KC_PMNS,
KC_P0, KC_PDOT, KC_PENT, KC_PPLS),
LAYOUT_ortho_5x4( //Layer 1
KC_TRNS, KC_VOLD, KC_VOLU, KC_CALC,
KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT,
KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_UP, KC_NO,
KC_NLCK, KC_LEFT, KC_DOWN, KC_RGHT),
//Copy any layer and edit it for more layers, be sure to add a key to go to that layer
};
//Reset combo key setting
combo_t key_combos[COMBO_COUNT] = {
[ENLCK_reset] = COMBO_ACTION(reset_combo),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case MACRO1: //This is where the macro's are located
if (record->event.pressed) {
// when keycode MACRO1 is pressed
SEND_STRING("Thank you");
} else {
// when keycode MACRO1 is released
SEND_STRING("for being you <3");
}
break;
case MACRO2:
if (record->event.pressed) {
// when keycode MACRO2 is pressed
SEND_STRING("Pizza is");
} else {
// when keycode MACRO2 is released
SEND_STRING("delicious ;)");
}
break;
}
return true;
}
//Reset key combo and a example to make our own, more complex, macro's
void process_combo_event(uint16_t combo_index, bool pressed) {
switch(combo_index) {
case ENLCK_reset:
if (pressed) {
reset_keyboard();
}
break;
}
}

View file

@ -0,0 +1 @@
COMBO_ENABLE = yes

17
keyboards/emi20/readme.md Normal file
View file

@ -0,0 +1,17 @@
# Emi20
![Emi20](https://i.imgur.com/Tt9ogmWl.jpg)
A compact 4x5 ortholinear keyboard made by Project Aqua and sold by Evil-cables.
* Keyboard Maintainer: [AquaCylinder](https://github.com/AquaCylinder)
* Hardware Supported: PCB, Atmega32u4
Make example for this keyboard (after setting up your build environment):
make emi20:default
To 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.
The default keymap.c file has comments to help you on your journey,
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).

22
keyboards/emi20/rules.mk Normal file
View file

@ -0,0 +1,22 @@
# MCU name
MCU = atmega32u4
# Bootloader Selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output