diff options
-rw-r--r-- | keyboards/handwired/riblee_f411/config.h | 6 | ||||
-rw-r--r-- | keyboards/handwired/riblee_f411/halconf.h | 20 | ||||
-rw-r--r-- | keyboards/handwired/riblee_f411/mcuconf.h | 25 | ||||
-rw-r--r-- | keyboards/handwired/riblee_f411/rules.mk | 3 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/riblee/keymap.c | 31 | ||||
-rw-r--r-- | users/riblee/riblee.c | 64 | ||||
-rw-r--r-- | users/riblee/riblee.h | 6 |
7 files changed, 146 insertions, 9 deletions
diff --git a/keyboards/handwired/riblee_f411/config.h b/keyboards/handwired/riblee_f411/config.h index a1aa122e7..67399aafb 100644 --- a/keyboards/handwired/riblee_f411/config.h +++ b/keyboards/handwired/riblee_f411/config.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define MATRIX_COLS 12 | 28 | #define MATRIX_COLS 12 |
29 | 29 | ||
30 | #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } | 30 | #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } |
31 | #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } | 31 | #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B14, A0, B8, B9 } |
32 | #define UNUSED_PINS | 32 | #define UNUSED_PINS |
33 | 33 | ||
34 | #define DIODE_DIRECTION COL2ROW | 34 | #define DIODE_DIRECTION COL2ROW |
@@ -38,4 +38,6 @@ | |||
38 | 38 | ||
39 | #define MOUSEKEY_INTERVAL 32 | 39 | #define MOUSEKEY_INTERVAL 32 |
40 | 40 | ||
41 | #define TAPPING_TERM 175 \ No newline at end of file | 41 | #define TAPPING_TERM 175 |
42 | |||
43 | #define OLED_DISPLAY_128X64 | ||
diff --git a/keyboards/handwired/riblee_f411/halconf.h b/keyboards/handwired/riblee_f411/halconf.h new file mode 100644 index 000000000..d65408a1b --- /dev/null +++ b/keyboards/handwired/riblee_f411/halconf.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee | ||
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 3 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 <https://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #define HAL_USE_I2C TRUE | ||
19 | |||
20 | #include_next "halconf.h" | ||
diff --git a/keyboards/handwired/riblee_f411/mcuconf.h b/keyboards/handwired/riblee_f411/mcuconf.h new file mode 100644 index 000000000..51561d37e --- /dev/null +++ b/keyboards/handwired/riblee_f411/mcuconf.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* Copyright 2020 Nick Brassel (tzarc) | ||
2 | * Copyright 2020 Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee | ||
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 <https://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #pragma once | ||
18 | |||
19 | #include_next "mcuconf.h" | ||
20 | |||
21 | #undef STM32_I2C_USE_I2C1 | ||
22 | #define STM32_I2C_USE_I2C1 TRUE | ||
23 | |||
24 | #undef I2C_DRIVER | ||
25 | #define I2C_DRIVER I2CD1 | ||
diff --git a/keyboards/handwired/riblee_f411/rules.mk b/keyboards/handwired/riblee_f411/rules.mk index 40a72bdcd..a44b2b058 100644 --- a/keyboards/handwired/riblee_f411/rules.mk +++ b/keyboards/handwired/riblee_f411/rules.mk | |||
@@ -24,3 +24,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth | |||
24 | AUDIO_ENABLE = no # Audio output | 24 | AUDIO_ENABLE = no # Audio output |
25 | 25 | ||
26 | LAYOUTS = ortho_5x12 | 26 | LAYOUTS = ortho_5x12 |
27 | |||
28 | OLED_DRIVER_ENABLE = yes | ||
29 | RAW_ENABLE = yes | ||
diff --git a/layouts/community/ortho_5x12/riblee/keymap.c b/layouts/community/ortho_5x12/riblee/keymap.c index ba5eb07b8..a0a196ad9 100644 --- a/layouts/community/ortho_5x12/riblee/keymap.c +++ b/layouts/community/ortho_5x12/riblee/keymap.c | |||
@@ -48,6 +48,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
48 | * `-----------------------------------------------------------------------------------' | 48 | * `-----------------------------------------------------------------------------------' |
49 | */ | 49 | */ |
50 | [_QWERTY] = LAYOUT_ortho_5x12( | 50 | [_QWERTY] = LAYOUT_ortho_5x12( |
51 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
52 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, | ||
53 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
54 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
55 | BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
56 | ), | ||
57 | |||
58 | /* Hungarian | ||
59 | * ,-----------------------------------------------------------------------------------. | ||
60 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
61 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
62 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | | ||
63 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
64 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | | ||
65 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
66 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
67 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
68 | * | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | | ||
69 | * `-----------------------------------------------------------------------------------' | ||
70 | */ | ||
71 | [_HUNGARIAN] = LAYOUT_ortho_5x12( | ||
51 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | 72 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, |
52 | KC_TAB, KC_Q, KC_W, C_KC_E, KC_R, KC_T, KC_Y, C_KC_U, C_KC_I, C_KC_O, KC_P, KC_DEL, | 73 | KC_TAB, KC_Q, KC_W, C_KC_E, KC_R, KC_T, KC_Y, C_KC_U, C_KC_I, C_KC_O, KC_P, KC_DEL, |
53 | KC_ESC, C_KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | 74 | KC_ESC, C_KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
@@ -153,11 +174,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
153 | * `-----------------------------------------------------------------------------------' | 174 | * `-----------------------------------------------------------------------------------' |
154 | */ | 175 | */ |
155 | [_ADJUST] = LAYOUT_ortho_5x12( | 176 | [_ADJUST] = LAYOUT_ortho_5x12( |
156 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | 177 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, |
157 | _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, | 178 | _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, |
158 | _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, | 179 | _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, HUNGARIAN, _______, |
159 | _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______, | 180 | _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______, |
160 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 181 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
161 | ) | 182 | ) |
162 | 183 | ||
163 | }; \ No newline at end of file | 184 | }; \ No newline at end of file |
diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index e1fe607ef..6e548f1d8 100644 --- a/users/riblee/riblee.c +++ b/users/riblee/riblee.c | |||
@@ -15,6 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "riblee.h" | 17 | #include "riblee.h" |
18 | #include "raw_hid.h" | ||
19 | #include <string.h> | ||
18 | 20 | ||
19 | const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); | 21 | const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); |
20 | 22 | ||
@@ -150,6 +152,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
150 | } | 152 | } |
151 | return false; | 153 | return false; |
152 | break; | 154 | break; |
155 | case HUNGARIAN: | ||
156 | if (record->event.pressed) { | ||
157 | set_single_persistent_default_layer(_HUNGARIAN); | ||
158 | } | ||
159 | return false; | ||
160 | break; | ||
153 | case BACKLIT: | 161 | case BACKLIT: |
154 | if (record->event.pressed) { | 162 | if (record->event.pressed) { |
155 | register_code(keycode_config(KC_LGUI)); | 163 | register_code(keycode_config(KC_LGUI)); |
@@ -164,3 +172,59 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
164 | } | 172 | } |
165 | return true; | 173 | return true; |
166 | }; | 174 | }; |
175 | |||
176 | #ifdef OLED_DRIVER_ENABLE | ||
177 | |||
178 | static char receive_buffer[128] = {}; | ||
179 | static uint8_t receive_buffer_length = 0; | ||
180 | |||
181 | void oled_task_user(void) { | ||
182 | // Keyboard Layer Status | ||
183 | oled_write_P(PSTR("Layer: "), false); | ||
184 | |||
185 | switch (get_highest_layer(layer_state)) { | ||
186 | case _QWERTY: | ||
187 | oled_write_P(PSTR("Default\n"), false); | ||
188 | break; | ||
189 | case _LOWER: | ||
190 | oled_write_P(PSTR("Lower\n"), false); | ||
191 | break; | ||
192 | case _RAISE: | ||
193 | oled_write_P(PSTR("Raise\n"), false); | ||
194 | break; | ||
195 | case _ADJUST: | ||
196 | oled_write_P(PSTR("Adjust\n"), false); | ||
197 | break; | ||
198 | default: | ||
199 | oled_write_P(PSTR("Undefined\n"), false); | ||
200 | } | ||
201 | |||
202 | // Print string received via HID RAW | ||
203 | oled_write_ln(receive_buffer, false); | ||
204 | } | ||
205 | |||
206 | #ifdef RAW_ENABLE | ||
207 | |||
208 | void raw_hid_receive(uint8_t *data, uint8_t length) { | ||
209 | |||
210 | // Append data to receive_buffer, without the first byte | ||
211 | memcpy(receive_buffer + receive_buffer_length, data + 1, length - 1); | ||
212 | receive_buffer_length += (length - 1); | ||
213 | |||
214 | // First byte indicate if we will recive more package for the current string | ||
215 | // If it's 1 then this was the last package and we can reset the offset | ||
216 | if (data[0] == 1) { | ||
217 | // Reset the offset for memcpy to the begining of our buffer | ||
218 | receive_buffer_length = 0; | ||
219 | } | ||
220 | |||
221 | // Reset the offset to prevent overwriting memory outside of the buffer | ||
222 | if (receive_buffer_length + 32 >= 128) { | ||
223 | receive_buffer_length = 0; | ||
224 | } | ||
225 | |||
226 | } | ||
227 | |||
228 | #endif | ||
229 | |||
230 | #endif \ No newline at end of file | ||
diff --git a/users/riblee/riblee.h b/users/riblee/riblee.h index bdaa9f321..a4038765a 100644 --- a/users/riblee/riblee.h +++ b/users/riblee/riblee.h | |||
@@ -18,8 +18,9 @@ | |||
18 | 18 | ||
19 | #include QMK_KEYBOARD_H | 19 | #include QMK_KEYBOARD_H |
20 | 20 | ||
21 | enum preonic_layers { | 21 | enum layer_names { |
22 | _QWERTY, | 22 | _QWERTY, |
23 | _HUNGARIAN, | ||
23 | _COLEMAK, | 24 | _COLEMAK, |
24 | _DVORAK, | 25 | _DVORAK, |
25 | _LOWER, | 26 | _LOWER, |
@@ -27,8 +28,9 @@ enum preonic_layers { | |||
27 | _ADJUST | 28 | _ADJUST |
28 | }; | 29 | }; |
29 | 30 | ||
30 | enum preonic_keycodes { | 31 | enum custom_keycodes { |
31 | QWERTY = SAFE_RANGE, | 32 | QWERTY = SAFE_RANGE, |
33 | HUNGARIAN, | ||
32 | COLEMAK, | 34 | COLEMAK, |
33 | DVORAK, | 35 | DVORAK, |
34 | BACKLIT | 36 | BACKLIT |