aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorojthetiny <65928618+ojthetiny@users.noreply.github.com>2020-11-30 12:00:55 +0200
committerGitHub <noreply@github.com>2020-11-30 02:00:55 -0800
commitce91dd4bf320ca159401fd8db24781c44ab7d405 (patch)
treee8e10bf72d6ab9944025dd4461bae892c314990e
parent5909c243d4ba019af6fbaf4397fda81c703db511 (diff)
downloadqmk_firmware-ce91dd4bf320ca159401fd8db24781c44ab7d405.tar.gz
qmk_firmware-ce91dd4bf320ca159401fd8db24781c44ab7d405.zip
[Keyboard] Add edc40 keyboard (#11021)
* Re-adding edc40 keyboard branch/files * Update keymap.c * add default keymap for edc40 * removed redundant keymap * added custom keymap for edc40 * fixed false update to settings.json * fixed false update to settings.json * added newline to info.json * Update keyboards/edc40/config.h * Update keyboards/edc40/readme.md * Update keyboards/edc40/rules.mk * Update rules.mk * Update keyboards/edc40/info.json * Update info.json * Update info.json * Update keyboards/edc40/config.h * Update keyboards/edc40/info.json * Update keyboards/edc40/readme.md * Update keyboards/edc40/keymaps/default/keymap.c
-rw-r--r--keyboards/edc40/config.h50
-rw-r--r--keyboards/edc40/edc40.c16
-rw-r--r--keyboards/edc40/edc40.h31
-rw-r--r--keyboards/edc40/info.json54
-rw-r--r--keyboards/edc40/keymaps/default/keymap.c43
-rw-r--r--keyboards/edc40/keymaps/default/readme.md1
-rw-r--r--keyboards/edc40/keymaps/oj/keymap.c94
-rw-r--r--keyboards/edc40/keymaps/oj/readme.md1
-rw-r--r--keyboards/edc40/readme.md13
-rw-r--r--keyboards/edc40/rules.mk23
10 files changed, 326 insertions, 0 deletions
diff --git a/keyboards/edc40/config.h b/keyboards/edc40/config.h
new file mode 100644
index 000000000..bcb8918b1
--- /dev/null
+++ b/keyboards/edc40/config.h
@@ -0,0 +1,50 @@
1/* Copyright 2020 OJtheTiny
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 "config_common.h"
19
20/* USB Device descriptor parameter */
21#define VENDOR_ID 0x4F4A // "OJ"
22#define PRODUCT_ID 0x0002
23#define DEVICE_VER 0x0001
24#define MANUFACTURER OJ
25#define PRODUCT edc40
26
27#define MATRIX_ROWS 4
28#define MATRIX_COLS 12
29
30/*
31 * Keyboard Matrix Assignments
32 *
33 * Change this to how you wired your keyboard
34 * COLS: AVR pins used for columns, left to right
35 * ROWS: AVR pins used for rows, top to bottom
36 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
37 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
38 *
39 */
40 #define MATRIX_ROW_PINS { D4, D6, D7, F7 }
41 #define MATRIX_COL_PINS { B0, B1, B2, B3, D0, D1, D2, D3, D5, B4, B5 }
42 #define UNUSED_PINS
43
44 #define DIODE_DIRECTION COL2ROW
45
46#define DEBOUNCE 5
47
48#define LOCKING_SUPPORT_ENABLE
49#define LOCKING_RESYNC_ENABLE
50#define RGB_DI_PIN C6
diff --git a/keyboards/edc40/edc40.c b/keyboards/edc40/edc40.c
new file mode 100644
index 000000000..96746d4f3
--- /dev/null
+++ b/keyboards/edc40/edc40.c
@@ -0,0 +1,16 @@
1/* Copyright 2020 OJtheTiny
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 "edc40.h"
diff --git a/keyboards/edc40/edc40.h b/keyboards/edc40/edc40.h
new file mode 100644
index 000000000..d946eadd4
--- /dev/null
+++ b/keyboards/edc40/edc40.h
@@ -0,0 +1,31 @@
1/* Copyright 2020 OJtheTiny
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 LAYOUT( \
21 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
22 K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \
23 K200, K201, K202, K203, K204, K205, K206, K207, K208, K210, \
24 K300, K301, K305, K308, K310 \
25) \
26{ \
27 {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011}, \
28 {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K110}, \
29 {K200, K201, K202, K203, K204, K205, K206, K207, K208, KC_NO, KC_NO, K210}, \
30 {K300, K301, KC_NO, KC_NO, KC_NO, K305, KC_NO, KC_NO, K308, KC_NO, K310} \
31}
diff --git a/keyboards/edc40/info.json b/keyboards/edc40/info.json
new file mode 100644
index 000000000..1585294bc
--- /dev/null
+++ b/keyboards/edc40/info.json
@@ -0,0 +1,54 @@
1{
2 "keyboard_name": "edc40",
3 "url": "",
4 "maintainer": "ojthetiny",
5 "width": 12,
6 "height": 4,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"x": 0, "y": 0},
11 {"x": 1, "y": 0},
12 {"x": 2, "y": 0},
13 {"x": 3, "y": 0},
14 {"x": 4, "y": 0},
15 {"x": 5, "y": 0},
16 {"x": 6, "y": 0},
17 {"x": 7, "y": 0},
18 {"x": 8, "y": 0},
19 {"x": 9, "y": 0},
20 {"x": 10, "y": 0},
21 {"x": 11, "y": 0},
22
23 {"x": 0, "y": 1, "w":1.25},
24 {"x": 1.25, "y": 1},
25 {"x": 2.25, "y": 1},
26 {"x": 3.25, "y": 1},
27 {"x": 4.25, "y": 1},
28 {"x": 5.25, "y": 1},
29 {"x": 6.25, "y": 1},
30 {"x": 7.25, "y": 1},
31 {"x": 8.25, "y": 1},
32 {"x": 9.25, "y": 1},
33 {"x": 10.25, "y": 1, "w":1.75},
34
35 {"x": 0, "y": 2, "w":1.75},
36 {"x": 1.75, "y": 2},
37 {"x": 2.75, "y": 2},
38 {"x": 3.75, "y": 2},
39 {"x": 4.75, "y": 2},
40 {"x": 5.75, "y": 2},
41 {"x": 6.75, "y": 2},
42 {"x": 7.75, "y": 2},
43 {"x": 8.75, "y": 2},
44 {"x": 9.75, "y": 2, "w":2.25},
45
46 {"x": 0, "y": 3, "w":1.25},
47 {"x": 1.25, "y": 3, "w":1.25},
48 {"x": 2.5, "y": 3, "w":7},
49 {"x": 9.5, "y": 3, "w":1.25},
50 {"x": 10.75, "y": 3, "w":1.25}
51 ]
52 }
53 }
54}
diff --git a/keyboards/edc40/keymaps/default/keymap.c b/keyboards/edc40/keymaps/default/keymap.c
new file mode 100644
index 000000000..88d4eed23
--- /dev/null
+++ b/keyboards/edc40/keymaps/default/keymap.c
@@ -0,0 +1,43 @@
1/* Copyright 2020 OJtheTiny
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
18enum layers{
19 L0,
20 L1,
21 L2
22};
23
24const uint16_t PROGMEM keymaps [][MATRIX_ROWS][MATRIX_COLS] = {
25 [L0] = LAYOUT( /* Base Layer */
26 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
27 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
28 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,
29 KC_LCTL, KC_LGUI, LT(L1, KC_SPC), KC_RALT, MO(L2)
30 ),
31 [L1] = LAYOUT( /* Num Layer */
32 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
33 KC_TAB, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_BSLS,
34 _______, _______, _______, KC_PSCR, _______, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_SLSH,
35 _______, _______, _______, _______, KC_EQL
36 ),
37 [L2] = LAYOUT( /* F-Keys */
38 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
39 _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_SCLN, KC_QUOT, KC_ENT,
40 _______, KC_VOLD, _______, KC_VOLU, _______, _______, _______, _______, _______, _______,
41 _______, _______, _______, _______, _______
42 )
43};
diff --git a/keyboards/edc40/keymaps/default/readme.md b/keyboards/edc40/keymaps/default/readme.md
new file mode 100644
index 000000000..127f7c563
--- /dev/null
+++ b/keyboards/edc40/keymaps/default/readme.md
@@ -0,0 +1 @@
# default keymap for edc40
diff --git a/keyboards/edc40/keymaps/oj/keymap.c b/keyboards/edc40/keymaps/oj/keymap.c
new file mode 100644
index 000000000..1946750c1
--- /dev/null
+++ b/keyboards/edc40/keymaps/oj/keymap.c
@@ -0,0 +1,94 @@
1/* Copyright 2020 OJtheTiny
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
18enum layers{
19 _QW,
20 _DV,
21 _CM,
22 _L1,
23 _L2,
24 _L3
25};
26enum custom_keycodes {
27 DVORAK = SAFE_RANGE,
28 QWERTY,
29 COLEMAK
30};
31
32
33const uint16_t PROGMEM keymaps [][MATRIX_ROWS][MATRIX_COLS] = {
34 [_QW] = LAYOUT( /* Qwerty */
35 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
36 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
37 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,
38 KC_TAB, KC_LGUI, KC_SPC, MO(_L1), MO(_L2)
39 ),
40 [_DV] = LAYOUT( /* Dvorak */
41 KC_ESC, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_QUOT,
42 KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S,
43 KC_LSFT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z,
44 KC_TAB, KC_LGUI, KC_SPC, MO(_L1), MO(_L2)
45 ),
46 [_CM] = LAYOUT( /* Colemak */
47 KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT,
48 KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
49 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT,
50 KC_TAB, KC_LGUI, KC_SPC, MO(_L1), MO(_L2)
51 ),
52 [_L1] = LAYOUT( /* NUM */
53 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
54 _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS,
55 _______, _______, _______, KC_PSCR, _______, _______, KC_LBRC, KC_RBRC, KC_MINUS, KC_EQL,
56 _______, _______, _______, _______, _______
57 ),
58 [_L2] = LAYOUT( /* F Keys */
59 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
60 _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, UC(0xc3b6), UC(0xc3a4), KC_ENT,
61 _______, QWERTY, DVORAK, COLEMAK, TG(_L3), _______, _______, _______, _______, _______,
62 _______, _______, _______, _______, _______
63 ),
64 [_L3] = LAYOUT( /*Gaming */
65 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______,
66 KC_TAB, KC_Q, KC_W, KC_E, KC_R, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______,
67 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______,
68 KC_LSFT, KC_B, KC_SPC, MO(_L2), _______
69 )
70};
71
72
73bool process_record_user(uint16_t keycode, keyrecord_t *record) {
74 switch(keycode) {
75 case DVORAK:
76 if (record->event.pressed) {
77 set_single_persistent_default_layer(_DV);
78 }
79 return false;
80 case QWERTY:
81 if (record->event.pressed) {
82 set_single_persistent_default_layer(_QW);
83 }
84 return false;
85 case COLEMAK:
86 if (record->event.pressed) {
87 set_single_persistent_default_layer(_CM);
88 }
89 return false;
90 default:
91 return true;
92 }
93 return true;
94};
diff --git a/keyboards/edc40/keymaps/oj/readme.md b/keyboards/edc40/keymaps/oj/readme.md
new file mode 100644
index 000000000..8e21176ad
--- /dev/null
+++ b/keyboards/edc40/keymaps/oj/readme.md
@@ -0,0 +1 @@
# Objectively the best keymap for EDC40 \ No newline at end of file
diff --git a/keyboards/edc40/readme.md b/keyboards/edc40/readme.md
new file mode 100644
index 000000000..8901ce713
--- /dev/null
+++ b/keyboards/edc40/readme.md
@@ -0,0 +1,13 @@
1# EDC40
2
3An everyday carry 40% keyboard
4
5* Keyboard Maintainer: [OJ](https://github.com/ojthetiny)
6* Hardware Supported: EDC40 PCB
7* Hardware Availabilty: TeslaSkeys
8
9Make example for this keyboard (after setting up your build environment):
10
11 make edc40:default
12
13See 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/edc40/rules.mk b/keyboards/edc40/rules.mk
new file mode 100644
index 000000000..c5128a8f2
--- /dev/null
+++ b/keyboards/edc40/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 = full # 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 = yes # 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
23UNICODE_ENABLE = yes