aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/crkbd/crkbd.h4
-rw-r--r--keyboards/crkbd/keymaps/mb_via/config.h26
-rw-r--r--keyboards/crkbd/keymaps/mb_via/keymap.c71
-rw-r--r--keyboards/crkbd/keymaps/mb_via/readme.md12
-rw-r--r--keyboards/crkbd/keymaps/mb_via/rules.mk3
-rw-r--r--keyboards/crkbd/post_config.h6
-rw-r--r--keyboards/crkbd/r2g/config.h78
-rw-r--r--keyboards/crkbd/r2g/r2g.c240
-rw-r--r--keyboards/crkbd/r2g/r2g.h60
-rw-r--r--keyboards/crkbd/r2g/readme.md28
-rw-r--r--keyboards/crkbd/r2g/rules.mk9
11 files changed, 537 insertions, 0 deletions
diff --git a/keyboards/crkbd/crkbd.h b/keyboards/crkbd/crkbd.h
index 4ba939704..3fae1a400 100644
--- a/keyboards/crkbd/crkbd.h
+++ b/keyboards/crkbd/crkbd.h
@@ -20,5 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#ifdef KEYBOARD_crkbd_rev1 20#ifdef KEYBOARD_crkbd_rev1
21# include "rev1.h" 21# include "rev1.h"
22#endif 22#endif
23#ifdef KEYBOARD_crkbd_r2g
24# include "r2g.h"
25#endif
26
23 27
24#include "quantum.h" 28#include "quantum.h"
diff --git a/keyboards/crkbd/keymaps/mb_via/config.h b/keyboards/crkbd/keymaps/mb_via/config.h
new file mode 100644
index 000000000..cdc04f690
--- /dev/null
+++ b/keyboards/crkbd/keymaps/mb_via/config.h
@@ -0,0 +1,26 @@
1/*
2Copyright 2019 @foostan
3Copyright 2020 Drashna Jaelre <@drashna>
4Copyright 2021 Elliot Powell <@e11i0t23>
5
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22/* Select hand configuration */
23
24#define MASTER_LEFT
25// #define MASTER_RIGHT
26// #define EE_HANDS
diff --git a/keyboards/crkbd/keymaps/mb_via/keymap.c b/keyboards/crkbd/keymaps/mb_via/keymap.c
new file mode 100644
index 000000000..b7fbc1c29
--- /dev/null
+++ b/keyboards/crkbd/keymaps/mb_via/keymap.c
@@ -0,0 +1,71 @@
1/*
2Copyright 2019 @foostan
3Copyright 2020 Drashna Jaelre <@drashna>
4Copyright 2021 Elliot Powell <@e11i0t23>
5
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#include QMK_KEYBOARD_H
21
22const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
23 [0] = LAYOUT_split_3x6_3(
24 //,-----------------------------------------------------. ,-----------------------------------------------------.
25 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
26 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
27 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
28 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
29 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
30 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
31 KC_LGUI, FN_MO13, KC_SPC, KC_ENT, FN_MO23, KC_RALT
32 //`--------------------------' `--------------------------'
33
34 ),
35
36 [1] = LAYOUT_split_3x6_3(
37 //,-----------------------------------------------------. ,-----------------------------------------------------.
38 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
39 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
40 KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
41 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
42 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
43 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
44 KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
45 //`--------------------------' `--------------------------'
46 ),
47
48 [2] = LAYOUT_split_3x6_3(
49 //,-----------------------------------------------------. ,-----------------------------------------------------.
50 KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
51 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
52 KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
53 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
54 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
55 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
56 KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
57 //`--------------------------' `--------------------------'
58 ),
59
60 [3] = LAYOUT_split_3x6_3(
61 //,-----------------------------------------------------. ,-----------------------------------------------------.
62 RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
63 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
64 RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
65 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
66 RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
67 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
68 KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT
69 //`--------------------------' `--------------------------'
70 )
71};
diff --git a/keyboards/crkbd/keymaps/mb_via/readme.md b/keyboards/crkbd/keymaps/mb_via/readme.md
new file mode 100644
index 000000000..048927073
--- /dev/null
+++ b/keyboards/crkbd/keymaps/mb_via/readme.md
@@ -0,0 +1,12 @@
1# Default Via keyboard for the Corne R2G by Mechboards UK
2
3![r2g](https://cdn.shopify.com/s/files/1/0582/0242/3501/products/HelidoxCorneR2GPCB_1800x1800.png)
4
5Corne R2G is an eddition of the classic CRKBD by footsan remade to feature a full smd assembly
6
7In this fold can be found the default via enabled keymap that can be in conjunction
8
9Flash example for this Keymap:
10```sh
11qmk flash -kb crkbd/r2g -km mb_via
12```
diff --git a/keyboards/crkbd/keymaps/mb_via/rules.mk b/keyboards/crkbd/keymaps/mb_via/rules.mk
new file mode 100644
index 000000000..cda04c7ce
--- /dev/null
+++ b/keyboards/crkbd/keymaps/mb_via/rules.mk
@@ -0,0 +1,3 @@
1MOUSEKEY_ENABLE = no # Mouse keys
2VIA_ENABLE = yes # Enable VIA
3
diff --git a/keyboards/crkbd/post_config.h b/keyboards/crkbd/post_config.h
index 00034a163..133014b02 100644
--- a/keyboards/crkbd/post_config.h
+++ b/keyboards/crkbd/post_config.h
@@ -41,3 +41,9 @@
41# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 41# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120
42# endif 42# endif
43#endif 43#endif
44
45#ifdef OLED_ENABLE
46 #ifndef OLED_FONT_H
47 #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
48 #endif
49#endif
diff --git a/keyboards/crkbd/r2g/config.h b/keyboards/crkbd/r2g/config.h
new file mode 100644
index 000000000..e45161248
--- /dev/null
+++ b/keyboards/crkbd/r2g/config.h
@@ -0,0 +1,78 @@
1/*
2Copyright 2019 @foostan
3Copyright 2020 Drashna Jaelre <@drashna>
4Copyright 2021 Elliot Powell @e11i0t23
5
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#define USE_SERIAL
23#define SOFT_SERIAL_PIN D2
24
25/* ws2812 RGB LED */
26#define RGB_DI_PIN D3
27
28#ifdef RGBLIGHT_ENABLE
29
30# define RGBLIGHT_EFFECT_BREATHING
31# define RGBLIGHT_EFFECT_RAINBOW_MOOD
32# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
33# define RGBLIGHT_EFFECT_SNAKE
34# define RGBLIGHT_EFFECT_KNIGHT
35# define RGBLIGHT_EFFECT_CHRISTMAS
36# define RGBLIGHT_EFFECT_STATIC_GRADIENT
37# define RGBLIGHT_EFFECT_RGB_TEST
38# define RGBLIGHT_EFFECT_ALTERNATING
39# define RGBLIGHT_EFFECT_TWINKLE
40
41# define RGBLED_NUM 54
42# define RGBLED_SPLIT \
43 { 27, 27 }
44#endif
45
46#ifdef RGB_MATRIX_ENABLE
47# define RGBLED_NUM 54 // Number of LEDs
48# define DRIVER_LED_TOTAL RGBLED_NUM
49# define RGB_MATRIX_SPLIT \
50 { 27, 27 }
51# define SPLIT_TRANSPORT_MIRROR
52
53# define ENABLE_RGB_MATRIX_ALPHAS_MODS
54# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
55# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
56# define ENABLE_RGB_MATRIX_BREATHING
57# define ENABLE_RGB_MATRIX_BAND_SAT
58# define ENABLE_RGB_MATRIX_BAND_VAL
59# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
60# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
61# define ENABLE_RGB_MATRIX_CYCLE_ALL
62# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
63# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
64# define ENABLE_RGB_MATRIX_RAINDROPS
65# define ENABLE_RGB_MATRIX_HUE_BREATHING
66# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
67# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
68# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
69# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
70# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
71# define ENABLE_RGB_MATRIX_SPLASH
72# define ENABLE_RGB_MATRIX_SOLID_SPLASH
73#endif
74
75#define DIODE_DIRECTION COL2ROW
76
77#define SPLIT_USB_DETECT
78
diff --git a/keyboards/crkbd/r2g/r2g.c b/keyboards/crkbd/r2g/r2g.c
new file mode 100644
index 000000000..7fb95c043
--- /dev/null
+++ b/keyboards/crkbd/r2g/r2g.c
@@ -0,0 +1,240 @@
1/*
2Copyright 2019 @foostan
3Copyright 2020 Drashna Jaelre <@drashna>
4Copyright 2021 Elliot Powell @e11i0t23
5
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include "r2g.h"
20
21#ifdef RGB_MATRIX_ENABLE
22
23 // Logical Layout
24 // Columns
25 // Left
26 // 0 1 2 3 4 5
27 // ROWS
28 // 25 24 19 18 11 10 0
29 // 03 02 01
30 // 26 23 20 17 12 09 1
31 // 04 05 06
32 // 27 22 21 16 13 08 2
33 //
34 // 15 14 07 3
35 //
36 // Right
37 // 0 1 2 3 4 5
38 // ROWS
39 // 25 24 19 18 11 10 4
40 // 03 02 01
41 // 26 23 20 17 12 09 5
42 // 04 05 06
43 // 27 22 21 16 13 08 6
44 //
45 // 15 14 07 7
46 //
47 // Physical Layout
48 // Columns
49 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
50 // ROWS
51 // 25 24 19 18 11 10 10 11 18 19 24 25 0
52 // 03 02 01 01 02 03
53 // 26 23 20 17 12 09 09 12 17 20 23 26 1
54 // 04 04
55 // 27 22 21 16 13 08 08 13 16 21 22 27 2
56 // 05 06 06 05
57 // 15 14 07 07 14 15 3
58
59led_config_t g_led_config = { {
60 { 24, 23, 18, 17, 10, 9 },
61 { 25, 22, 19, 16, 11, 8 },
62 { 26, 21, 20, 15, 12, 7 },
63 { NO_LED, NO_LED, NO_LED, 14, 13, 6 },
64 { 51, 50, 45, 44, 37, 36 },
65 { 52, 49, 46, 43, 38, 35 },
66 { 53, 48, 47, 42, 39, 34 },
67 { NO_LED, NO_LED, NO_LED, 41, 40, 33 }
68}, {
69 { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
70 { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
71 { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
72 { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
73 { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
74 { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
75 { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
76 { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
77}, {
78 2, 2, 2, 2, 2, 2, 1,
79 4, 4, 4, 4, 4, 4, 1,
80 1, 4, 4, 4, 4, 4, 4,
81 4, 4, 4, 1, 1, 1, 2,
82 2, 2, 2, 2, 2, 1, 4,
83 4, 4, 4, 4, 4, 1, 1,
84 4, 4, 4, 4, 4, 4, 4,
85 4, 4, 1, 1, 1
86} };
87
88#endif
89
90#ifdef OLED_ENABLE
91
92oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
93 if (!is_keyboard_master()) {
94 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
95 }
96 return rotation;
97}
98
99enum Layers{
100 L_BASE, L_LOWER, L_RAISE, L_ADJUST
101};
102
103void oled_render_layer_state_r2g(void) {
104 oled_write_P(PSTR("Layer: "), false);
105 switch (get_highest_layer(layer_state)) {
106 case L_BASE:
107 oled_write_ln_P(PSTR("Default"), false);
108 break;
109 case L_LOWER:
110 oled_write_ln_P(PSTR("Lower"), false);
111 break;
112 case L_RAISE:
113 oled_write_ln_P(PSTR("Raise"), false);
114 break;
115 case L_ADJUST:
116 oled_write_ln_P(PSTR("Adjust"), false);
117 break;
118 }
119}
120
121//char keylog_str_r2g[24] = {};
122
123const char code_to_name_r2g[60] = {
124 ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
125 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
126 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
127 '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
128 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
129 '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
130
131char key_name_r2g = ' ';
132uint16_t last_keycode_r2g;
133uint8_t last_row_r2g;
134uint8_t last_col_r2g;
135
136void set_keylog_r2g(uint16_t keycode, keyrecord_t *record) {
137 key_name_r2g = ' ';
138 last_keycode_r2g = keycode;
139 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
140 (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { last_keycode_r2g = keycode & 0xFF; }
141 if (keycode < 60) {
142 key_name_r2g = code_to_name_r2g[keycode];
143 }
144 last_row_r2g = record->event.key.row;
145 last_col_r2g = record->event.key.col;
146}
147
148const char *depad_str(const char *depad_str, char depad_char) {
149 while (*depad_str == depad_char) ++depad_str;
150 return depad_str;
151}
152
153void oled_render_keylog_r2g(void) {
154 //oled_write(keylog_str_r2g, false);
155 const char *last_row_r2g_str = get_u8_str(last_row_r2g, ' ');
156 oled_write(depad_str(last_row_r2g_str, ' '), false);
157 oled_write_P(PSTR("x"), false);
158 const char *last_col_r2g_str = get_u8_str(last_col_r2g, ' ');
159 oled_write(depad_str(last_col_r2g_str, ' '), false);
160 oled_write_P(PSTR(", k"), false);
161 const char *last_keycode_r2g_str = get_u16_str(last_keycode_r2g, ' ');
162 oled_write(depad_str(last_keycode_r2g_str, ' '), false);
163 oled_write_P(PSTR(":"), false);
164 oled_write_char(key_name_r2g, false);
165}
166
167void render_bootmagic_status_r2g(bool status) {
168 /* Show Ctrl-Gui Swap options */
169 static const char PROGMEM logo[][2][3] = {
170 {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
171 {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
172 };
173 if (status) {
174 oled_write_ln_P(logo[0][0], false);
175 oled_write_ln_P(logo[0][1], false);
176 } else {
177 oled_write_ln_P(logo[1][0], false);
178 oled_write_ln_P(logo[1][1], false);
179 }
180}
181
182void oled_render_logo_r2g(void) {
183 static const char PROGMEM mb_logo[] = {
1840x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1850xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1860xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f,
1870x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1880xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1890x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1900x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1910x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1920x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff,
1930x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83,
1940x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0xff, 0xff, 0x82, 0x82, 0x82, 0x82,
1950x82, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff,
1960xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xfc, 0xfc,
1970x9c, 0x9c, 0xfc, 0xfc, 0xf8, 0xf8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x7c, 0x3c,
1980x9c, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0x3c, 0x3c,
1990x9c, 0xbc, 0xfc, 0xb8, 0xb8, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2000x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff,
2010xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0xff,
2020xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41,
2030x41, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff,
2040xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f,
2050x03, 0x07, 0x0f, 0x3f, 0x3f, 0x3e, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x3e, 0x3f,
2060x3f, 0x3f, 0x3b, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1f, 0x3f, 0x3c, 0x38,
2070x3b, 0x3b, 0x3f, 0x1f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2080x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff,
2090xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
2100xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0,
2110xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff,
2120xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2130x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2140x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2150x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
216};
217 oled_write_raw_P(mb_logo, sizeof(mb_logo));
218 //oled_set_cursor(oled_max_chars()/2,oled_max_lines()/2);
219 //oled_write_P(PSTR("R2G"), false);
220}
221
222bool oled_task_kb(void) {
223 if (!oled_task_user()) { return false; }
224 if (is_keyboard_master()) {
225 oled_render_layer_state_r2g();
226 oled_render_keylog_r2g();
227 } else {
228 oled_render_logo_r2g();
229 }
230 return false;
231}
232
233bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
234 if (record->event.pressed) {
235 set_keylog_r2g(keycode, record);
236 }
237 return process_record_user(keycode, record);
238}
239#endif // OLED_ENABLE
240
diff --git a/keyboards/crkbd/r2g/r2g.h b/keyboards/crkbd/r2g/r2g.h
new file mode 100644
index 000000000..126c4b899
--- /dev/null
+++ b/keyboards/crkbd/r2g/r2g.h
@@ -0,0 +1,60 @@
1/*
2Copyright 2019 @foostan
3Copyright 2020 Drashna Jaelre <@drashna>
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "crkbd.h"
22#include "quantum.h"
23
24// clang-format off
25#define LAYOUT_split_3x6_3( \
26 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
27 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
28 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
29 L30, L31, L32, R30, R31, R32 \
30 ) \
31 { \
32 { L00, L01, L02, L03, L04, L05 }, \
33 { L10, L11, L12, L13, L14, L15 }, \
34 { L20, L21, L22, L23, L24, L25 }, \
35 { KC_NO, KC_NO, KC_NO, L30, L31, L32 }, \
36 { R05, R04, R03, R02, R01, R00 }, \
37 { R15, R14, R13, R12, R11, R10 }, \
38 { R25, R24, R23, R22, R21, R20 }, \
39 { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \
40 }
41
42#define LAYOUT_split_3x5_3( \
43 L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \
44 L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
45 L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \
46 L30, L31, L32, R30, R31, R32 \
47 ) \
48 { \
49 { KC_NO, L00, L01, L02, L03, L04 }, \
50 { KC_NO, L10, L11, L12, L13, L14 }, \
51 { KC_NO, L20, L21, L22, L23, L24 }, \
52 { KC_NO, KC_NO, KC_NO, L30, L31, L32 }, \
53 { KC_NO, R04, R03, R02, R01, R00 }, \
54 { KC_NO, R14, R13, R12, R11, R10 }, \
55 { KC_NO, R24, R23, R22, R21, R20 }, \
56 { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \
57 }
58
59
60#define LAYOUT LAYOUT_split_3x6_3
diff --git a/keyboards/crkbd/r2g/readme.md b/keyboards/crkbd/r2g/readme.md
new file mode 100644
index 000000000..7a9db3845
--- /dev/null
+++ b/keyboards/crkbd/r2g/readme.md
@@ -0,0 +1,28 @@
1# Corne R2G
2
3![r2g](https://cdn.shopify.com/s/files/1/0582/0242/3501/products/HelidoxCorneR2GPCB_1800x1800.png)
4
5An Eddition of the popular CRKBD featuring a full smd assembly
6
7Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23/), [Mechboards UK](https://mechboards.co.uk)
8Hardware Supported: CRKBD R2G PCB
9Hardware Availability: [Mechboards UK](https://mechboards.co.uk/products/helidox-corne-kit?variant=40391708213453)
10
11Make example for this keyboard (after setting up your build environment):
12
13```sh
14make crkbd/r2g:mb_via
15```
16
17Flash example for this keyboard:
18```sh
19qmk flash -kb crkbd/r2g -km mb_via
20```
21
22See 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).
23
24## Bootloader
25
26These PCBs have a reset on the underside of the PCB next to the TRRS jack to enter in to the bootloader.
27
28Additionally, if you hold down the "Q" or "P" buttons when plugging in that half of the keyboard (per the default QWERTY layout), this will jump to the bootloader and reset the EEPROM (persistent storage).
diff --git a/keyboards/crkbd/r2g/rules.mk b/keyboards/crkbd/r2g/rules.mk
new file mode 100644
index 000000000..a3ee1b46b
--- /dev/null
+++ b/keyboards/crkbd/r2g/rules.mk
@@ -0,0 +1,9 @@
1BOOTLOADER = atmel-dfu
2OLED_ENABLE = yes
3OLED_DRIVER = SSD1306
4LTO_ENABLE = yes
5RGBLIGHT_ENABLE = yes
6
7
8SPLIT_KEYBOARD = yes
9