aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorFilip Paryż <paryz.1i12@op.pl>2020-10-25 01:54:38 +0200
committerGitHub <noreply@github.com>2020-10-24 16:54:38 -0700
commitaf455a8368dc564df51f9657b04932956ccf580b (patch)
treed2440dc240e7c5da18d1c3139abd836ae7136a02 /keyboards
parentac37a94e49a39a014b3df829442cca84bf3f2071 (diff)
downloadqmk_firmware-af455a8368dc564df51f9657b04932956ccf580b.tar.gz
qmk_firmware-af455a8368dc564df51f9657b04932956ccf580b.zip
[Keyboard] Freoduo - handwired split ortho keyboard. (#10724)
* Freoduo v1 - with fixes from @fauxpark and rebased to master branch of QMK. * One more suggested fix from @fauxpark * Fixes after @drashna review.
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/handwired/freoduo/config.h52
-rw-r--r--keyboards/handwired/freoduo/freoduo.c1
-rw-r--r--keyboards/handwired/freoduo/freoduo.h23
-rw-r--r--keyboards/handwired/freoduo/info.json72
-rw-r--r--keyboards/handwired/freoduo/keymaps/default/config.h9
-rw-r--r--keyboards/handwired/freoduo/keymaps/default/keymap.c189
-rw-r--r--keyboards/handwired/freoduo/keymaps/default/rules.mk2
-rw-r--r--keyboards/handwired/freoduo/readme.md12
-rw-r--r--keyboards/handwired/freoduo/rules.mk24
9 files changed, 384 insertions, 0 deletions
diff --git a/keyboards/handwired/freoduo/config.h b/keyboards/handwired/freoduo/config.h
new file mode 100644
index 000000000..c65da93ac
--- /dev/null
+++ b/keyboards/handwired/freoduo/config.h
@@ -0,0 +1,52 @@
1/*
2This program is free software: you can redistribute it and/or modify
3it under the terms of the GNU General Public License as published by
4the Free Software Foundation, either version 2 of the License, or
5(at your option) any later version.
6
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11
12You should have received a copy of the GNU General Public License
13along with this program. If not, see <http://www.gnu.org/licenses/>.
14*/
15
16#pragma once
17
18#include "config_common.h"
19
20/* USB Device descriptor parameter */
21#define VENDOR_ID 0xB141
22#define PRODUCT_ID 0x0602 //F is 6th in alphabet, 02 as in DUO
23#define DEVICE_VER 0x0001
24#define MANUFACTURER ParyzFilip
25#define PRODUCT Freoduo
26
27/* key matrix size */
28/* rows are doubled-up */
29#define MATRIX_ROWS 10
30#define MATRIX_COLS 6
31
32/* wiring of each half */
33#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
34#define MATRIX_COL_PINS { B2, B6, F6, B3, B1, F7 }
35#define EE_HANDS
36
37/* COL2ROW or ROW2COL */
38#define DIODE_DIRECTION COL2ROW
39
40/* Set 0 if debouncing isn't needed */
41#define DEBOUNCE 3
42
43/* serial.c configuration for split keyboard */
44#define SOFT_SERIAL_PIN D0
45
46/* ws2812 RGB LED */
47#define RGB_DI_PIN D4
48#define RGBLIGHT_ANIMATIONS
49#define RGBLIGHT_SLEEP
50#define RGBLIGHT_HUE_STEP 16
51#define RGBLIGHT_SAT_STEP 8
52#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/handwired/freoduo/freoduo.c b/keyboards/handwired/freoduo/freoduo.c
new file mode 100644
index 000000000..7415e6260
--- /dev/null
+++ b/keyboards/handwired/freoduo/freoduo.c
@@ -0,0 +1 @@
#include "freoduo.h"
diff --git a/keyboards/handwired/freoduo/freoduo.h b/keyboards/handwired/freoduo/freoduo.h
new file mode 100644
index 000000000..453d1d1cf
--- /dev/null
+++ b/keyboards/handwired/freoduo/freoduo.h
@@ -0,0 +1,23 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT( \
6 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
7 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
8 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
9 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
10 L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \
11 ) \
12 { \
13 { L00, L01, L02, L03, L04, L05 }, \
14 { L10, L11, L12, L13, L14, L15 }, \
15 { L20, L21, L22, L23, L24, L25 }, \
16 { L30, L31, L32, L33, L34, L35 }, \
17 { L40, L41, L42, L43, L44, KC_NO}, \
18 { R00, R01, R02, R03, R04, R05 }, \
19 { R10, R11, R12, R13, R14, R15 }, \
20 { R20, R21, R22, R23, R24, R25 }, \
21 { R30, R31, R32, R33, R34, R35 }, \
22 { KC_NO, R41, R42, R43, R44, R45 } \
23 }
diff --git a/keyboards/handwired/freoduo/info.json b/keyboards/handwired/freoduo/info.json
new file mode 100644
index 000000000..5c2d7e173
--- /dev/null
+++ b/keyboards/handwired/freoduo/info.json
@@ -0,0 +1,72 @@
1{
2"keyboard_name": "Freoduo",
3"manufacturer": "Filip Paryz",
4"url": "https://github.com/FilipParyz",
5"maintainer": "https://github.com/FilipParyz",
6"width": 12,
7"height": 5,
8"layouts": {
9 "LAYOUT": {
10 "layout": [
11 {"x": 0, "y": 0},
12 {"x": 1, "y": 0},
13 {"x": 2, "y": 0},
14 {"x": 3, "y": 0},
15 {"x": 4, "y": 0},
16 {"x": 5, "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 {"x": 12, "y": 0},
23 {"x": 0, "y": 1},
24 {"x": 1, "y": 1},
25 {"x": 2, "y": 1},
26 {"x": 3, "y": 1},
27 {"x": 4, "y": 1},
28 {"x": 5, "y": 1},
29 {"x": 7, "y": 1},
30 {"x": 8, "y": 1},
31 {"x": 9, "y": 1},
32 {"x": 10, "y": 1},
33 {"x": 11, "y": 1},
34 {"x": 12, "y": 1},
35 {"x": 0, "y": 2},
36 {"x": 1, "y": 2},
37 {"x": 2, "y": 2},
38 {"x": 3, "y": 2},
39 {"x": 4, "y": 2},
40 {"x": 5, "y": 2},
41 {"x": 7, "y": 2},
42 {"x": 8, "y": 2},
43 {"x": 9, "y": 2},
44 {"x": 10, "y": 2},
45 {"x": 11, "y": 2},
46 {"x": 12, "y": 2},
47 {"x": 0, "y": 3},
48 {"x": 1, "y": 3},
49 {"x": 2, "y": 3},
50 {"x": 3, "y": 3},
51 {"x": 4, "y": 3},
52 {"x": 5, "y": 3},
53 {"x": 7, "y": 3},
54 {"x": 8, "y": 3},
55 {"x": 9, "y": 3},
56 {"x": 10, "y": 3},
57 {"x": 11, "y": 3},
58 {"x": 12, "y": 3},
59 {"x": 0, "y": 4},
60 {"x": 1, "y": 4},
61 {"x": 2, "y": 4},
62 {"x": 3, "y": 4},
63 {"x": 4, "y": 4, "w": 2},
64 {"x": 7, "y": 4, "w": 2},
65 {"x": 9, "y": 4},
66 {"x": 10, "y": 4},
67 {"x": 11, "y": 4},
68 {"x": 12, "y": 4}
69 ]
70 }
71 }
72} \ No newline at end of file
diff --git a/keyboards/handwired/freoduo/keymaps/default/config.h b/keyboards/handwired/freoduo/keymaps/default/config.h
new file mode 100644
index 000000000..f28e4073e
--- /dev/null
+++ b/keyboards/handwired/freoduo/keymaps/default/config.h
@@ -0,0 +1,9 @@
1#pragma once
2
3#define GRAVE_ESC_CTRL_OVERRIDE
4#define RGBLED_NUM 18
5#define RGBLIGHT_SPLIT
6#define RGBLED_SPLIT { 9, 9 }
7// Switch RGB sides with LED MAP.
8#define RGBLIGHT_LED_MAP { 8, 7, 6, 5, 4, 3, 2, 1, 0, 17, 16, 15, 14, 13, 12, 11, 10, 9}
9#define RGBLIGHT_LAYERS
diff --git a/keyboards/handwired/freoduo/keymaps/default/keymap.c b/keyboards/handwired/freoduo/keymaps/default/keymap.c
new file mode 100644
index 000000000..16eeed13f
--- /dev/null
+++ b/keyboards/handwired/freoduo/keymaps/default/keymap.c
@@ -0,0 +1,189 @@
1#include QMK_KEYBOARD_H
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7enum layers {
8 _QWERTY,
9 _LOWER,
10 _RAISE,
11 _ADJUST,
12};
13
14enum custom_keycodes {
15 LOWER = SAFE_RANGE,
16 RAISE,
17 ADJUST,
18};
19
20// Light all LEDs red when caps lock is active. Hard to ignore!
21const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
22 {0, RGBLED_NUM, HSV_RED} // Light all LEDs, starting with LED 0
23);
24// Light all LEDs in green when keyboard layer 1 is active
25const rgblight_segment_t PROGMEM layer_lower[] = RGBLIGHT_LAYER_SEGMENTS(
26 {6, 6, HSV_GREEN}
27);
28// Light all LEDs in blue when keyboard layer 2 is active
29const rgblight_segment_t PROGMEM layer_raise[] = RGBLIGHT_LAYER_SEGMENTS(
30 {6, 6, HSV_MAGENTA}
31);
32// Light all LEDs in yellow when keyboard layer 3 is active
33const rgblight_segment_t PROGMEM layer_adjust[] = RGBLIGHT_LAYER_SEGMENTS(
34 {6, 6, HSV_ORANGE}
35);
36
37
38// Now define the array of layers. Later layers take precedence
39const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
40 my_capslock_layer,
41 layer_lower,
42 layer_raise,
43 layer_adjust
44);
45
46void keyboard_post_init_user(void) {
47 // Enable the LED layers
48 rgblight_layers = my_rgb_layers;
49}
50
51layer_state_t layer_state_set_user(layer_state_t state) {
52 // Both layers will light up if both kb layers are active
53 rgblight_set_layer_state(1, layer_state_cmp(state, 1));
54 rgblight_set_layer_state(2, layer_state_cmp(state, 2));
55 rgblight_set_layer_state(3, layer_state_cmp(state, 3));
56 return state;
57}
58
59bool led_update_user(led_t led_state) {
60 rgblight_set_layer_state(0, led_state.caps_lock);
61 return true;
62}
63
64const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
65
66/* QWERTY
67 * ,-----------------------------------------------------------------------------------.
68 * |` ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
69 * | | | | | | | | | | | | |
70 * |------+------+------+------+------+------+------+------+------+------+------+------|
71 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Enter|
72 * | | | | | | | | | | | | |
73 * |------+------+------+------+------+-------------+------+------+------+------+------|
74 * | Caps | A | S | D | F | G | H | J | K | L | ; | " |
75 * | LOWER| | | | | | | | | | | RAISE|
76 * |------+------+------+------+------+------|------+------+------+------+------+------|
77 * | Shift| Z | X | C | V | B | N | M | , | . | Up | ? |
78 * | | | | | | | | | | | | Shift|
79 * |------+------+------+------+------+------+------+------+------+------+------+------|
80 * | Ctrl |ADJUST| Alt | GUI | Space | Backspace | Alt | Left |Down |Right |
81 * | | | | | | | | | | |
82 * `-----------------------------------------------------------------------------------'
83 */
84[_QWERTY] = LAYOUT(
85 KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
86 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
87 LT(_LOWER,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_RAISE, KC_QUOT),
88 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, RSFT_T(KC_SLSH),
89 KC_LCTL, ADJUST, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
90),
91
92/* LOWER
93 * ,-----------------------------------------------------------------------------------.
94 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
95 * |------+------+------+------+------+-------------+------+------+------+------+------|
96 * | | | Up | | | | | - | = | [ | ] | \ |
97 * |------+------+------+------+------+------|------+------+------+------+------+------|
98 * | | Left | Down | Right| | | |ISO # |ISO / | | | |
99 * |------+------+------+------+------+------+------+------+------+------+------+------|
100 * | | | | | | | | | | | | |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | | | | | | | | | | |
103 * `-----------------------------------------------------------------------------------'
104 */
105[_LOWER] = LAYOUT(
106 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
107 _______, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
108 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_NUHS, KC_NUBS, _______, _______, _______,
109 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
110 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
111),
112
113/* RAISE
114 * ,-----------------------------------------------------------------------------------.
115 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
116 * |------+------+------+------+------+-------------+------+------+------+------+------|
117 * | Del | | | | | | | _ | + | | \ | | |
118 * |------+------+------+------+------+------|------+------+------+------+------+------|
119 * | | | | | | | |ISO ~ |ISO | | | |Enter |
120 * |------+------+------+------+------+------+------+------+------+------+------+------|
121 * | | | | | | | | | | | | |
122 * |------+------+------+------+------+-------------+------+------+------+------+------|
123 * | | | | | | | | | | |
124 * `-----------------------------------------------------------------------------------'
125 */
126[_RAISE] = LAYOUT(
127 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
128 KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
129 _______, _______, _______, _______, _______, _______, _______, S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
130 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
131 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
132),
133
134/* ADJUST (LOWER + RAISE)
135 * ,-----------------------------------------------------------------------------------.
136 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
137 * |------+------+------+------+------+------+------+------+------+------+------+------|
138 * | Reset|RGB Tg|RGB Md| | | | | | | | | |
139 * |------+------+------+------+------+-------------+------+------+------+------+------|
140 * | |Hue Dn|Hue Up| | | | | | | | | |
141 * |------+------+------+------+------+------+------+------+------+------+------+------|
142 * | |Sat Dn|Sat Up| | | | | | | | | |
143 * |------+------+------+------+------+------+------+------+------+------+------+------|
144 * | |Val Dn|Val Up| | | | | | | |
145 * `-----------------------------------------------------------------------------------'
146 */
147[_ADJUST] = LAYOUT(
148 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
149 RESET , RGB_TOG, RGB_MOD, VLK_TOG, _______, _______, _______, _______, _______, _______, _______, _______,
150 _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
151 _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
152 _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______
153)
154
155};
156
157bool process_record_user(uint16_t keycode, keyrecord_t *record) {
158 switch (keycode) {
159 case LOWER:
160 if (record->event.pressed) {
161 layer_on(_LOWER);
162 update_tri_layer(_LOWER, _RAISE, _ADJUST);
163 } else {
164 layer_off(_LOWER);
165 update_tri_layer(_LOWER, _RAISE, _ADJUST);
166 }
167 return false;
168 break;
169 case RAISE:
170 if (record->event.pressed) {
171 layer_on(_RAISE);
172 update_tri_layer(_LOWER, _RAISE, _ADJUST);
173 } else {
174 layer_off(_RAISE);
175 update_tri_layer(_LOWER, _RAISE, _ADJUST);
176 }
177 return false;
178 break;
179 case ADJUST:
180 if (record->event.pressed) {
181 layer_on(_ADJUST);
182 } else {
183 layer_off(_ADJUST);
184 }
185 return false;
186 break;
187 }
188 return true;
189}
diff --git a/keyboards/handwired/freoduo/keymaps/default/rules.mk b/keyboards/handwired/freoduo/keymaps/default/rules.mk
new file mode 100644
index 000000000..f4abb12cd
--- /dev/null
+++ b/keyboards/handwired/freoduo/keymaps/default/rules.mk
@@ -0,0 +1,2 @@
1RGBLIGHT_ENABLE = yes
2BACKLIGHT_ENABLE = no \ No newline at end of file
diff --git a/keyboards/handwired/freoduo/readme.md b/keyboards/handwired/freoduo/readme.md
new file mode 100644
index 000000000..7fa8af68c
--- /dev/null
+++ b/keyboards/handwired/freoduo/readme.md
@@ -0,0 +1,12 @@
1# Freoduo
2
3A split 60%, 5x12 ortholinear keyboard handwired by Filip Paryż.
4
5* Keyboard Maintainer: [Filip Paryz](https://github.com/FilipParyz)
6* Hardware Supported: Pro Micro, ATmega32u4
7
8Make example for this keyboard (after setting up your build environment):
9
10 make handwired/freoduo:default
11
12See 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). \ No newline at end of file
diff --git a/keyboards/handwired/freoduo/rules.mk b/keyboards/handwired/freoduo/rules.mk
new file mode 100644
index 000000000..e3da3753e
--- /dev/null
+++ b/keyboards/handwired/freoduo/rules.mk
@@ -0,0 +1,24 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # 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 = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23VELOCIKEY_ENABLE = yes
24SPLIT_KEYBOARD = yes \ No newline at end of file