diff options
author | FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> | 2022-01-07 15:21:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-07 12:21:04 -0800 |
commit | 145e91d41f97f210783f053c6caf8eeb37be4fc2 (patch) | |
tree | 193dbb4a5ec139199489109c0bd4554582ed9cfe /keyboards/edi | |
parent | a8927ac60140a2b12bb47661e22c9218f16897f5 (diff) | |
download | qmk_firmware-145e91d41f97f210783f053c6caf8eeb37be4fc2.tar.gz qmk_firmware-145e91d41f97f210783f053c6caf8eeb37be4fc2.zip |
[Keyboard] Hard Light Mark 2 and keymaps (#13719)
* Hard Light Mark 2 and keymaps
This time with minor competence!
* Update keyboards/edi/hardlight/mk2/rules.mk
* Delete config.h
* Apply suggestions from code review
Diffstat (limited to 'keyboards/edi')
-rw-r--r-- | keyboards/edi/hardlight/mk2/config.h | 81 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/halconf.h | 32 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/keymaps/.gitignore | 1 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/keymaps/default/config.h | 24 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/keymaps/default/keymap.c | 115 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/keymaps/kate/keymap.c | 115 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/mcuconf.h | 32 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/mk2.c | 18 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/mk2.h | 37 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/readme.md | 22 | ||||
-rw-r--r-- | keyboards/edi/hardlight/mk2/rules.mk | 33 |
11 files changed, 510 insertions, 0 deletions
diff --git a/keyboards/edi/hardlight/mk2/config.h b/keyboards/edi/hardlight/mk2/config.h new file mode 100644 index 000000000..ab4b00682 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/config.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #define VENDOR_ID 0xF7E0 | ||
22 | #define PRODUCT_ID 0x2408 | ||
23 | #define DEVICE_VER 0x0007 | ||
24 | #define MANUFACTURER Everywhere Defense Industries | ||
25 | #define PRODUCT Hard Light Mk 2 | ||
26 | |||
27 | /* key matrix size */ | ||
28 | #define MATRIX_ROWS 8 | ||
29 | #define MATRIX_COLS 8 | ||
30 | |||
31 | #define MATRIX_COL_PINS { B2, B6, B5, F1, F0, C15, C14, C13 } | ||
32 | #define MATRIX_ROW_PINS { B10, B11, A14, A15, A3, A0, A2, A1 } | ||
33 | #define DIODE_DIRECTION COL2ROW | ||
34 | |||
35 | /* define if matrix has ghost */ | ||
36 | //#define MATRIX_HAS_GHOST | ||
37 | |||
38 | /* Set 0 if debouncing isn't needed */ | ||
39 | #define DEBOUNCE 5 | ||
40 | |||
41 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
42 | #define LOCKING_SUPPORT_ENABLE | ||
43 | /* Locking resynchronize hack */ | ||
44 | #define LOCKING_RESYNC_ENABLE | ||
45 | |||
46 | /* RGB Underglow */ | ||
47 | #define RGB_DI_PIN A10 | ||
48 | #define RGBLED_NUM 32 | ||
49 | #define RGBLIGHT_ANIMATIONS | ||
50 | #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 5 | ||
51 | //#define RGBLIGHT_LIMIT_VAL 200 | ||
52 | |||
53 | /* PWM RGB Underglow Defines */ | ||
54 | #define WS2812_PWM_DRIVER PWMD1 | ||
55 | #define WS2812_PWM_CHANNEL 3 | ||
56 | #define WS2812_PWM_PAL_MODE 2 | ||
57 | #define WS2812_DMA_STREAM STM32_DMA1_STREAM5 | ||
58 | #define WS2812_DMA_CHANNEL 3 | ||
59 | #define WS2812_EXTERNAL_PULLUP | ||
60 | |||
61 | /* I2C driver overrides */ | ||
62 | #define I2C1_SCL 7 | ||
63 | #define I2C1_SDA 8 | ||
64 | |||
65 | /* | ||
66 | * Feature disable options | ||
67 | * These options are also useful to firmware size reduction. | ||
68 | */ | ||
69 | |||
70 | /* disable debug print */ | ||
71 | //#define NO_DEBUG | ||
72 | |||
73 | /* disable print */ | ||
74 | //#define NO_PRINT | ||
75 | |||
76 | /* disable action features */ | ||
77 | //#define NO_ACTION_LAYER | ||
78 | //#define NO_ACTION_TAPPING | ||
79 | //#define NO_ACTION_ONESHOT | ||
80 | //#define NO_ACTION_MACRO | ||
81 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/edi/hardlight/mk2/halconf.h b/keyboards/edi/hardlight/mk2/halconf.h new file mode 100644 index 000000000..498f31a91 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/halconf.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | // Activate PWM mode | ||
21 | #define HAL_USE_PWM TRUE | ||
22 | |||
23 | // Activate Inter-Integrated-Circuit Networking (I2C/2Wire) | ||
24 | #define HAL_USE_I2C TRUE | ||
25 | |||
26 | // Activate Serial Peripheral Interface | ||
27 | #define HAL_USE_SPI TRUE | ||
28 | #define SPI_USE_WAIT TRUE | ||
29 | #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
30 | |||
31 | |||
32 | #include_next <halconf.h> \ No newline at end of file | ||
diff --git a/keyboards/edi/hardlight/mk2/keymaps/.gitignore b/keyboards/edi/hardlight/mk2/keymaps/.gitignore new file mode 100644 index 000000000..08a0f321a --- /dev/null +++ b/keyboards/edi/hardlight/mk2/keymaps/.gitignore | |||
@@ -0,0 +1 @@ | |||
fate \ No newline at end of file | |||
diff --git a/keyboards/edi/hardlight/mk2/keymaps/default/config.h b/keyboards/edi/hardlight/mk2/keymaps/default/config.h new file mode 100644 index 000000000..688751093 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/keymaps/default/config.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #undef LEADER_TIMEOUT | ||
21 | #define LEADER_TIMEOUT 250 | ||
22 | #define LEADER_PER_KEY_TIMING | ||
23 | |||
24 | // place overrides here | ||
diff --git a/keyboards/edi/hardlight/mk2/keymaps/default/keymap.c b/keyboards/edi/hardlight/mk2/keymaps/default/keymap.c new file mode 100644 index 000000000..6683e647d --- /dev/null +++ b/keyboards/edi/hardlight/mk2/keymaps/default/keymap.c | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | enum layers { | ||
21 | _MAIN, | ||
22 | _RAISE, | ||
23 | _LOWER, | ||
24 | _SET, | ||
25 | }; | ||
26 | |||
27 | // Readability keycodes | ||
28 | #define LOWER MO(_LOWER) | ||
29 | #define RAISE MO(_RAISE) | ||
30 | #define SET MO(_SET) | ||
31 | |||
32 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
33 | |||
34 | |||
35 | /* MAIN | ||
36 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
37 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Backsp | Delete | 7 | 8 | 9 | | ||
38 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
39 | * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | Pause | 4 | 5 | 6 | | ||
40 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
41 | * | LShift | Z | X | C | V | B | N | M | , | . | / | Up | Enter | 1 | 2 | 3 | | ||
42 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
43 | * | LCtrl | Lock | GUI | Alt | Lower | Space | Space | Raise | PrtScr | RShift | Left | Down | Right | 0 | . | Enter | | ||
44 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
45 | */ | ||
46 | |||
47 | [_MAIN] = LAYOUT_ortho_4x16( | ||
48 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_DEL, KC_KP_7, KC_KP_8, KC_KP_9, | ||
49 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_PAUS, KC_KP_4, KC_KP_5, KC_KP_6, | ||
50 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, KC_KP_1, KC_KP_2, KC_KP_3, | ||
51 | KC_LCTL, KC_LOCK, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_PSCR, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_KP_DOT, KC_PENT | ||
52 | ), | ||
53 | |||
54 | /* RAISE | ||
55 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
56 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Insert | | | | | ||
57 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
58 | * | | | | | | | | - | = | [ | ] | \ | | | | | | ||
59 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
60 | * | | | | | | | | | | | | PgUp | | | | | | ||
61 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
62 | * | | | | | | | | | | | Vol- | PgDn | Vol+ | | | | | ||
63 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
64 | */ | ||
65 | |||
66 | [_RAISE] = LAYOUT_ortho_4x16( | ||
67 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_INS, _______, _______, _______, | ||
68 | _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, | ||
69 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, | ||
70 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_PGDN, KC_VOLU, _______, _______, _______ | ||
71 | ), | ||
72 | |||
73 | /* LOWER | ||
74 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
75 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | | | | ||
76 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
77 | * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | | | | | ||
78 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
79 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | Home | | | | | | ||
80 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
81 | * | | | | | | | | | | | Mute | End | Play | | | | | ||
82 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
83 | */ | ||
84 | |||
85 | [_LOWER] = LAYOUT_ortho_4x16( | ||
86 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, | ||
87 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, | ||
88 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, | ||
89 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_END, KC_MPLY, _______, _______, _______ | ||
90 | ), | ||
91 | |||
92 | /* SETTINGS | ||
93 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
94 | * | | CapLok | ScrLok | NumLok | VK I/O | | | RGB IO | Mode+ | Mode- | Plain | | | | | | | ||
95 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
96 | * | | | | | | | | Hue+ | Sat+ | Val+ | Larsen | | | | | | | ||
97 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
98 | * | | | | | | | | Hue- | Sat- | Val- | Rswirl | | Reset | | | | | ||
99 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
100 | * | | | | | | | | | | | | | | | | | | ||
101 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
102 | */ | ||
103 | |||
104 | [_SET] = LAYOUT_ortho_4x16( | ||
105 | _______, KC_CAPS, KC_SLCK, KC_NLCK, VLK_TOG, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_P, _______, _______, _______, _______, _______, | ||
106 | _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_SW,_______, _______, _______, _______, _______, | ||
107 | _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_K, _______, RESET, _______, _______, _______, | ||
108 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
109 | ), | ||
110 | |||
111 | }; | ||
112 | |||
113 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
114 | return update_tri_layer_state(state, _LOWER, _RAISE, _SET); | ||
115 | } \ No newline at end of file | ||
diff --git a/keyboards/edi/hardlight/mk2/keymaps/kate/keymap.c b/keyboards/edi/hardlight/mk2/keymaps/kate/keymap.c new file mode 100644 index 000000000..a493c2288 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/keymaps/kate/keymap.c | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | enum layers { | ||
21 | _MAIN, | ||
22 | _RAISE, | ||
23 | _LOWER, | ||
24 | _SET, | ||
25 | }; | ||
26 | |||
27 | // Readability keycodes | ||
28 | #define LOWER MO(_LOWER) | ||
29 | #define RAISE MO(_RAISE) | ||
30 | #define SET MO(_SET) | ||
31 | |||
32 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
33 | |||
34 | |||
35 | /* MAIN | ||
36 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
37 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Backsp | Delete | 7 | 8 | 9 | | ||
38 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
39 | * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | Enter | 4 | 5 | 6 | | ||
40 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
41 | * | LShift | Z | X | C | V | B | N | M | , | . | / | Up | Pause | 1 | 2 | 3 | | ||
42 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
43 | * | LCtrl | Lock | GUI | Alt | Lower | Space | Space | Raise | PrtScr | RShift | Left | Down | Right | 0 | . | Enter | | ||
44 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
45 | */ | ||
46 | |||
47 | [_MAIN] = LAYOUT_ortho_4x16( | ||
48 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_DEL, KC_KP_7, KC_KP_8, KC_KP_9, | ||
49 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_KP_4, KC_KP_5, KC_KP_6, | ||
50 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_PAUS, KC_KP_1, KC_KP_2, KC_KP_3, | ||
51 | KC_LCTL, KC_LOCK, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_PSCR, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_KP_DOT, KC_PENT | ||
52 | ), | ||
53 | |||
54 | /* RAISE | ||
55 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
56 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Insert | | | | | ||
57 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
58 | * | | | | | | | | - | = | [ | ] | \ | | | | | | ||
59 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
60 | * | | | | | | | | | | | | PgUp | | | | | | ||
61 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
62 | * | | | | | | | | | | | Vol- | PgDn | Vol+ | | | | | ||
63 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
64 | */ | ||
65 | |||
66 | [_RAISE] = LAYOUT_ortho_4x16( | ||
67 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_INS, _______, _______, _______, | ||
68 | _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, | ||
69 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, | ||
70 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_PGDN, KC_VOLU, _______, _______, _______ | ||
71 | ), | ||
72 | |||
73 | /* LOWER | ||
74 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
75 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | | | | ||
76 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
77 | * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | | | | | ||
78 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
79 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | Home | | | | | | ||
80 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
81 | * | | | | | | | | | | | Mute | End | Play | | | | | ||
82 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
83 | */ | ||
84 | |||
85 | [_LOWER] = LAYOUT_ortho_4x16( | ||
86 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, | ||
87 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, | ||
88 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, | ||
89 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_END, KC_MPLY, _______, _______, _______ | ||
90 | ), | ||
91 | |||
92 | /* SETTINGS | ||
93 | * .-----------------------------------------------------------------------------------------------------------------------------------------------. | ||
94 | * | | CapLok | ScrLok | NumLok | VK I/O | | | RGB IO | Mode+ | Mode- | Plain | | | | | | | ||
95 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
96 | * | | | | | | | | Hue+ | Sat+ | Val+ | Larsen | | Reset | | | | | ||
97 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
98 | * | | | | | | | | Hue- | Sat- | Val- | Rswirl | | | | | | | ||
99 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
100 | * | | | | | | | | | | | | | | | | | | ||
101 | * '-----------------------------------------------------------------------------------------------------------------------------------------------' | ||
102 | */ | ||
103 | |||
104 | [_SET] = LAYOUT_ortho_4x16( | ||
105 | _______, KC_CAPS, KC_SLCK, KC_NLCK, VLK_TOG, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_P, _______, _______, _______, _______, _______, | ||
106 | _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_SW,_______, RESET, _______, _______, _______, | ||
107 | _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_K, _______, _______, _______, _______, _______, | ||
108 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
109 | ), | ||
110 | |||
111 | }; | ||
112 | |||
113 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
114 | return update_tri_layer_state(state, _LOWER, _RAISE, _SET); | ||
115 | } \ No newline at end of file | ||
diff --git a/keyboards/edi/hardlight/mk2/mcuconf.h b/keyboards/edi/hardlight/mk2/mcuconf.h new file mode 100644 index 000000000..95e698d9e --- /dev/null +++ b/keyboards/edi/hardlight/mk2/mcuconf.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include_next <mcuconf.h> | ||
21 | |||
22 | // Enable PWM | ||
23 | #undef STM32_PWM_USE_TIM1 | ||
24 | #define STM32_PWM_USE_TIM1 TRUE | ||
25 | |||
26 | // Enable I2C | ||
27 | #undef STM32_I2C_USE_I2C1 | ||
28 | #define STM32_I2C_USE_I2C1 TRUE | ||
29 | |||
30 | //Enable SPI | ||
31 | #undef STM32_SPI_USE_SPI2 | ||
32 | #define STM32_SPI_USE_SPI2 TRUE \ No newline at end of file | ||
diff --git a/keyboards/edi/hardlight/mk2/mk2.c b/keyboards/edi/hardlight/mk2/mk2.c new file mode 100644 index 000000000..ab4414e4d --- /dev/null +++ b/keyboards/edi/hardlight/mk2/mk2.c | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include "mk2.h" | ||
diff --git a/keyboards/edi/hardlight/mk2/mk2.h b/keyboards/edi/hardlight/mk2/mk2.h new file mode 100644 index 000000000..5065582d6 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/mk2.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | ©2021 Everywhere Defense Industries / Fate Everywhere <fate@7storm.org> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 3 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "quantum.h" | ||
21 | |||
22 | #define LAYOUT_ortho_4x16( \ | ||
23 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ | ||
24 | K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \ | ||
25 | K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \ | ||
26 | K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ | ||
27 | ) \ | ||
28 | { \ | ||
29 | { K00, K02, K04, K06, K08, K10, K12, K14 }, \ | ||
30 | { K01, K03, K05, K07, K09, K11, K13, K15 }, \ | ||
31 | { K16, K18, K20, K22, K24, K26, K28, K30 }, \ | ||
32 | { K17, K19, K21, K23, K25, K27, K29, K31 }, \ | ||
33 | { K32, K34, K36, K38, K40, K42, K44, K46 }, \ | ||
34 | { K33, K35, K37, K39, K41, K43, K45, K47 }, \ | ||
35 | { K48, K50, K52, K54, K56, K58, K60, K62 }, \ | ||
36 | { K49, K51, K53, K55, K57, K59, K61, K63 } \ | ||
37 | } | ||
diff --git a/keyboards/edi/hardlight/mk2/readme.md b/keyboards/edi/hardlight/mk2/readme.md new file mode 100644 index 000000000..54b14a220 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/readme.md | |||
@@ -0,0 +1,22 @@ | |||
1 | # Hard Light Mark 2 | ||
2 | |||
3 |  | ||
4 | |||
5 | A compact 60% keyboard designed by Fate Everywhere. Born out of the desire for a Planck with a numpad for technical work and a lack of reliance on the Elite-C. | ||
6 | |||
7 | * Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere) | ||
8 | * Hardware Supported: Mark 2 Hard Light. | ||
9 | * Hardware Availability: [Seven Store](https://store.7storm.org). | ||
10 | * To Enter Bootloader: | ||
11 | If keyboard is operational, hold RAISE and LOWER then press ENTER. | ||
12 | If keyboard is unresponsive, unplug board then hold the BTLDR button on the bottom of the PCB and plug in the keyboard. | ||
13 | |||
14 | Build example for this keyboard (after setting up your build environment): | ||
15 | |||
16 | make edi/hardlight/mk2:default | ||
17 | |||
18 | Flash example for this keyboard (after setting up your build environment): | ||
19 | |||
20 | make edi/hardlight/mk2:default:flash | ||
21 | |||
22 | 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). | ||
diff --git a/keyboards/edi/hardlight/mk2/rules.mk b/keyboards/edi/hardlight/mk2/rules.mk new file mode 100644 index 000000000..5ffab4a55 --- /dev/null +++ b/keyboards/edi/hardlight/mk2/rules.mk | |||
@@ -0,0 +1,33 @@ | |||
1 | # MCU name | ||
2 | MCU = STM32F072 | ||
3 | |||
4 | # Bootloader selection | ||
5 | Bootloader = stm32-dfu | ||
6 | |||
7 | # Wildcard to allow APM32 MCU | ||
8 | DFU_SUFFIX_ARGS = -v FFFF -p FFFF | ||
9 | |||
10 | # Build Options | ||
11 | # change yes to no to disable | ||
12 | # | ||
13 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
14 | MOUSEKEY_ENABLE = no # Mouse keys | ||
15 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
16 | CONSOLE_ENABLE = yes # Console for debug | ||
17 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
18 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
19 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
20 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
21 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
22 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
23 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
24 | AUDIO_ENABLE = no # Audio output | ||
25 | VELOCIKEY_ENABLE = yes | ||
26 | KEY_LOCK_ENABLE = yes | ||
27 | WS2812_DRIVER = pwm | ||
28 | |||
29 | # Layout definitions | ||
30 | LAYOUTS = ortho_4x16 | ||
31 | |||
32 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
33 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||