aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Marin Elena <alin@elena.space>2022-01-30 19:13:08 +0000
committerGitHub <noreply@github.com>2022-01-30 11:13:08 -0800
commitb0da2302137aa180af4e7464a70aa4b63ae919fe (patch)
treecfd7458beb2bc5904ff12e91fd100a3442484f92
parent03b1d9ef1f7f472f83c929c15044e71453823737 (diff)
downloadqmk_firmware-b0da2302137aa180af4e7464a70aa4b63ae919fe.tar.gz
qmk_firmware-b0da2302137aa180af4e7464a70aa4b63ae919fe.zip
[Keyboard] add mlego/m65 oled revision (#15833)
-rw-r--r--keyboards/mlego/m65/keymaps/default/keymap.c8
-rw-r--r--keyboards/mlego/m65/keymaps/dk/keymap.c8
-rw-r--r--keyboards/mlego/m65/keymaps/uk/config.h9
-rw-r--r--keyboards/mlego/m65/keymaps/uk/keymap.c371
-rw-r--r--keyboards/mlego/m65/keymaps/via/keymap.c71
-rw-r--r--keyboards/mlego/m65/lib/glcdfont.c231
-rw-r--r--keyboards/mlego/m65/m65.h13
-rw-r--r--keyboards/mlego/m65/readme.md45
-rw-r--r--keyboards/mlego/m65/rev4/config.h67
-rw-r--r--keyboards/mlego/m65/rev4/halconf.h32
-rw-r--r--keyboards/mlego/m65/rev4/mcuconf.h33
-rw-r--r--keyboards/mlego/m65/rev4/rules.mk22
12 files changed, 811 insertions, 99 deletions
diff --git a/keyboards/mlego/m65/keymaps/default/keymap.c b/keyboards/mlego/m65/keymaps/default/keymap.c
index 75ad22f39..96a1ced90 100644
--- a/keyboards/mlego/m65/keymaps/default/keymap.c
+++ b/keyboards/mlego/m65/keymaps/default/keymap.c
@@ -59,8 +59,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R), 59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R),
60 60
61 [_ADJ] = LAYOUT_ortho_5x13( 61 [_ADJ] = LAYOUT_ortho_5x13(
62 RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_SW, 62 RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T , RGB_M_SW,
63 RGB_HUI, RGB_HUD , RGB_M_P , _______, RESET , RGB_M_T, _______, _______, _______, _______, _______, _______ , RGB_M_SN, 63 RGB_HUI, RGB_HUD , RGB_M_P , _______, RESET , _______, _______, _______, _______, _______, _______, _______ , RGB_M_SN,
64 RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K , 64 RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K ,
65 RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X , 65 RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X ,
66 RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G), 66 RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
@@ -69,8 +69,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
69// clang-format on 69// clang-format on
70 70
71// let us assume we start with both layers off 71// let us assume we start with both layers off
72bool toggle_lwr = false; 72static bool toggle_lwr = false;
73bool toggle_rse = false; 73static bool toggle_rse = false;
74 74
75bool led_update_user(led_t led_state) { 75bool led_update_user(led_t led_state) {
76 // Disable the default LED update code, so that lock LEDs could be reused to show layer status. 76 // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
diff --git a/keyboards/mlego/m65/keymaps/dk/keymap.c b/keyboards/mlego/m65/keymaps/dk/keymap.c
index a4cb66bb9..5461a354b 100644
--- a/keyboards/mlego/m65/keymaps/dk/keymap.c
+++ b/keyboards/mlego/m65/keymaps/dk/keymap.c
@@ -60,8 +60,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R), 60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R),
61 61
62 [_ADJ] = LAYOUT_ortho_5x13( 62 [_ADJ] = LAYOUT_ortho_5x13(
63 RGB_MOD,RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW , 63 RGB_MOD,RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T, RGB_M_SW ,
64 RGB_HUI, RGB_HUD, RGB_M_P , _______, RESET , RGB_M_T, _______, _______, _______, _______, _______, _______, RGB_M_SN , 64 RGB_HUI, RGB_HUD, RGB_M_P , _______, RESET , _______, _______, _______, _______, _______, _______, _______, RGB_M_SN ,
65 RGB_SAI, RGB_SAD, RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_K , 65 RGB_SAI, RGB_SAD, RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_K ,
66 RGB_VAI, RGB_VAD, RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_X , 66 RGB_VAI, RGB_VAD, RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_X ,
67 RGB_TOG, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G), 67 RGB_TOG, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
@@ -70,8 +70,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
70// clang-format on 70// clang-format on
71 71
72// let us assume we start with both layers off 72// let us assume we start with both layers off
73bool toggle_lwr = false; 73static bool toggle_lwr = false;
74bool toggle_rse = false; 74static bool toggle_rse = false;
75 75
76bool led_update_user(led_t led_state) { 76bool led_update_user(led_t led_state) {
77 // Disable the default LED update code, so that lock LEDs could be reused to show layer status. 77 // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
diff --git a/keyboards/mlego/m65/keymaps/uk/config.h b/keyboards/mlego/m65/keymaps/uk/config.h
index 9d446777c..7b5ced9cc 100644
--- a/keyboards/mlego/m65/keymaps/uk/config.h
+++ b/keyboards/mlego/m65/keymaps/uk/config.h
@@ -18,5 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18#pragma once 18#pragma once
19 19
20#define TAPPING_TOGGLE 2 20#define TAPPING_TOGGLE 2
21//#define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WINC 21
22#define UNICODE_SELECTED_MODES UC_LNX 22#define UNICODE_SELECTED_MODES UC_LNX
23//#define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WINC
24
25#ifdef WPM_ENABLE
26#define WPM_SAMPLE_SECONDS 10
27#define WPM_SAMPLE_PERIODS 100
28#define WPM_ALLOW_COUNT_REGRESSION
29#endif
diff --git a/keyboards/mlego/m65/keymaps/uk/keymap.c b/keyboards/mlego/m65/keymaps/uk/keymap.c
index 528105fc7..b140ca08c 100644
--- a/keyboards/mlego/m65/keymaps/uk/keymap.c
+++ b/keyboards/mlego/m65/keymaps/uk/keymap.c
@@ -31,6 +31,17 @@ enum layer_names {
31 31
32#endif 32#endif
33 33
34#ifdef OLED_ENABLE
35static uint32_t oled_logo_timer = 0;
36static bool clear_logo = true;
37static const char PROGMEM m65_logo[] = {
38 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
39 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
40 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
41 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
42 0};
43#endif
44
34#ifdef RGBLIGHT_ENABLE 45#ifdef RGBLIGHT_ENABLE
35 46
36const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE}); 47const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
@@ -42,73 +53,134 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(m
42#endif 53#endif
43 54
44const uint32_t PROGMEM unicode_map[] = { 55const uint32_t PROGMEM unicode_map[] = {
45 [la] = 0x03B1, // å 56 [la] = 0x03B1 , // α
46 [lA] = 0x0391, // Å 57 [lA] = 0x0391 , // Α
47 [lb] = 0x03B2, // β 58 [lb] = 0x03B2 , // β
48 [lB] = 0x0392, // Β 59 [lB] = 0x0392 , // Β
49 [lc] = 0x03C7, // 60 [lc] = 0x03C7 , // χ
50 [lC] = 0x0307, // 61 [lC] = 0x0307 , //
51 [ld] = 0x03B4, [lD] = 0x2202, [le] = 0x03B5, [lE] = 0x2107, 62 [ld] = 0x03B4 , // δ
52 [lf] = 0x03C6, // 63 [lD] = 0x2202 , // ∂
53 [lF] = 0x03C8, // 64 [le] = 0x03B5 , // ε
54 [lg] = 0x03B3, // 65 [lE] = 0x2107 , // ℇ
55 [lG] = 0x0393, // 66 [lf] = 0x03C6 , // φ
56 [lh] = 0x210F, // 67 [lF] = 0x03C8 , // ψ
57 [lH] = 0x1D4D7, // 68 [lg] = 0x03B3 , // γ
58 [li] = 0x222B, // 69 [lG] = 0x0393 , // Γ
59 [lI] = 0x222E, // 70 [lh] = 0x210F , // ℏ
60 [lj] = 0x2208, // 71 [lH] = 0x1D4D7, // 𝓗
61 [lJ] = 0x2209, // 72 [li] = 0x222B , // ∫
62 [lk] = 0x03F0, // 73 [lI] = 0x222E , // ∮
63 [lK] = 0x2206, // 74 [lj] = 0x2208 , // ∈
64 [ll] = 0x03BB, // 75 [lJ] = 0x2209 , // ∉
65 [lL] = 0x039B, // 76 [lk] = 0x03F0 , // ϰ
66 [lm] = 0x03BC, // 77 [lK] = 0x2206 , // ∆
67 [lM] = 0x2218, // 78 [ll] = 0x03BB , // λ
68 [ln] = 0x03B7, // 79 [lL] = 0x039B , // Λ
69 [lN] = 0x222A, // 80 [lm] = 0x03BC , // μ
70 [lo] = 0x221E, // 81 [lM] = 0x2218 , // ∘
71 [lO] = 0x2297, // 82 [ln] = 0x03B7 , // η
72 [lp] = 0x03C0, // 83 [lN] = 0x222A , // ∪
73 [lP] = 0x220F, // 84 [lo] = 0x221E , // ∞
74 [lq] = 0x03C3, // 85 [lO] = 0x2297 , // ⊗
75 [lQ] = 0x03D5, // 86 [lp] = 0x03C0 , // π
76 [lr] = 0x03C1, // 87 [lP] = 0x220F , // ∏
77 [lR] = 0x2207, // 88 [lq] = 0x03C3 , // σ
78 [ls] = 0x2211, // 89 [lQ] = 0x03D5 , // ϕ
79 [lS] = 0x2A0B, // 90 [lr] = 0x03C1 , // ρ
80 [lt] = 0x03D1, // 91 [lR] = 0x2207 , // ∇
81 [lT] = 0x03B8, // 92 [ls] = 0x2211 , // ∑
82 [lu] = 0x03C4, // 93 [lS] = 0x2A0B , // ⨋
83 [lU] = 0x2102, // 94 [lt] = 0x03D1 , // ϑ
84 [lv] = 0x03BD, // 95 [lT] = 0x03B8 , // θ
85 [lV] = 0x039D, // 96 [lu] = 0x03C4 , // τ
86 [lw] = 0x03C9, // 97 [lU] = 0x2102 , // ℂ
87 [lW] = 0x03A9, // 98 [lv] = 0x03BD , // χ
88 [lx] = 0x03BE, // 99 [lV] = 0x039D , // Ν
89 [lX] = 0x039E, // 100 [lw] = 0x03C9 , // ω
90 [ly] = 0x211d, 101 [lW] = 0x03A9 , // Ω
91 [lY] = 0x2124, // 102 [lx] = 0x03BE , // ξ
92 [lz] = 0x03B6, // 103 [lX] = 0x039E , // Ξ
93 [lZ] = 0x2221, // 104 [ly] = 0x211d , // ℝ
94 [lZ] = 0x2221, // 105 [lY] = 0x2124 , // ℤ
95 [lc1] = 0x224A, // 106 [lz] = 0x03B6 , // ζ
96 [lC1] = 0x2248, // 107 [lZ] = 0x2221 , // ∡
97 [lp1] = 0x00B1, // 108 [lc1] = 0x224A , // ≊
98 [lP1] = 0x2213, // 109 [lC1] = 0x2248 , // ≈
99 [lq1] = 0x00D7, // 110 [lp1] = 0x00B1 , // ±
100 [lQ1] = 0x22C5, // 111 [lP1] = 0x2213 , // ∓
101 [ll1] = 0x1D53C, // 112 [lq1] = 0x00D7 , // ×
102 [lL1] = 0x212b, // 113 [lQ1] = 0x22C5 , // ⋅
103 [lk1] = 0x221D, // 114 [ll1] = 0x1D53C, // 𝔼
104 [lK1] = 0x2112, // 115 [lL1] = 0x212b , // Å
105 [rc] = 0x00E7, // ç 116 [lk1] = 0x221D , // ∝
106 [rC] = 0x00C7, // Ç 117 [lK1] = 0x2112 , // ℒ
118 [ra] = 0x0103 , // ă
119 [rA] = 0x0102 , // Ă
120 [ra1] = 0x00E2 , // â
121 [rA1] = 0x00C2 , // Â
122 [rc] = 0x00E7 , // ç
123 [rC] = 0x00C7 , // Ç
124 [ri] = 0x00EE , // î
125 [rI] = 0x00CE , // Î
126 [rs] = 0x0219 , // ș
127 [rS] = 0x0218 , // Ș
128 [rt] = 0x021B , // ț
129 [rT] = 0x021A , // Ț
107}; 130};
108 131
109// clang-format off 132// clang-format off
110const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 133const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
111 134/*
135 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
136 * │ ⎋ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ⌫ │
137 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
138 * │ ↹ │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │
139 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
140 * │ # │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ ⏎ │
141 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
142 * │ ⇧(│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ , │ ↑ │ / │
143 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
144 * │ ⎈ │mnu│lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│ ← │ ↓ │ → │
145 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
146shifted symbols
147 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
148 * │ ← │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ │
149 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
150 * │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │
151 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
152 * │ ~ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ @ │ ⏎ │
153 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
154 * │ ⇧(│ | │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ │ / │
155 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
156 * │ │ │ │ │ │ │ │ │ │ ⇧)│ │ │ │
157 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
158altgr symbols
159 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
160 * │ ← │ ¹ │ ² │ ³ │ € │ ½ │ ¾ │ { │ [ │ ] │ } │ \ │ │
161 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
162 * │ │ @ │ ſ │ e │ ¶ │ ŧ │ ← │ ↓ │ → │ ø │ þ │ ä │ ã │
163 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
164 * │ ~ │ æ │ ß │ ð │ đ │ ŋ │ ħ │ ả │ ĸ │ ł │ á │ â │ent│
165 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
166 * │ ± │ | │ « │ » │ ¢ │ „ │ “ │ ” │ µ │ ─ │ · │ │ ạ̣̣ │
167 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
168 * │ │ │ │ │ │ │ │ │ │ ° │ │ │ │
169 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
170altgr shift symbols
171 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
172 * │ │ ¡ │ ⅛ │ £ │ ¼ │ ⅜ │ ⅝ │ ⅞ │ ™ │ ± │ ° │ ¿ │ │
173 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
174 * │ │ Ω │ § │ E │ ® │ Ŧ │ ¥ │ ↑ │ ı │ Ø │ Þ │ å │ ā │
175 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
176 * │ │ Æ │ ẞ │ Ð │ ª │ Ŋ │ Ħ │ a │ & │ Ł │ ˝a│ ǎ │ent│
177 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
178 * │ ± │ ¦ │ ‹ │ › │ © │ ‚ │ ‘ │ ’ │ º │ × │ ÷ │ │ ȧ │
179 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
180 * │ │ │ │ │ │ │ │ │ │ ° │ │ │ │
181 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
182 *
183*/
112 [_QW] = LAYOUT_ortho_5x13( 184 [_QW] = LAYOUT_ortho_5x13(
113 KC_ESC, UK_1 , UK_2 , UK_3 , UK_4 , UK_5 , UK_6 , UK_7 , UK_8 , UK_9 , UK_0 , UK_MINS, KC_BSPC , 185 KC_ESC, UK_1 , UK_2 , UK_3 , UK_4 , UK_5 , UK_6 , UK_7 , UK_8 , UK_9 , UK_0 , UK_MINS, KC_BSPC ,
114 KC_TAB, UK_Q , UK_W , UK_E , UK_R , UK_T , UK_Y , UK_U , UK_I , UK_O , UK_P , UK_LBRC, UK_RBRC , 186 KC_TAB, UK_Q , UK_W , UK_E , UK_R , UK_T , UK_Y , UK_U , UK_I , UK_O , UK_P , UK_LBRC, UK_RBRC ,
@@ -116,24 +188,91 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
116 KC_LSPO, UK_BSLS, UK_Z , UK_X , UK_C , UK_V , UK_B , UK_N , UK_M , UK_COMM, UK_DOT , KC_UP , UK_SLSH , 188 KC_LSPO, UK_BSLS, UK_Z , UK_X , UK_C , UK_V , UK_B , UK_N , UK_M , UK_COMM, UK_DOT , KC_UP , UK_SLSH ,
117 KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT), 189 KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT),
118 190
119 [_LWR] = LAYOUT_ortho_5x13( 191/*
120 KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , UK_EQL , 192lower layer
121 KC_BTN3, XP(lq , lQ) , XP(lw , lW) , XP(le , lE) , XP(lr , lR) , XP(lt , lT) , XP(ly , lY) , XP(lu, lU) , XP(li, lI) , XP(lo, lO) , XP(lp , lP) , _______, _______, 193 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
122 KC_BTN2, XP(la , lA) , XP(ls , lS) , XP(ld , lD) , XP(lf , lF) , XP(lg , lG) , XP(lh , lH) , XP(lj, lJ) , XP(lk, lK) , XP(ll, lL) , XP(ll1, lL1) , XP(lk1 , lK1) , _______, 194 * │ ` │MUT│Vup│Vdn│prv│ply│nxt│EXT│SLP│WAK│PSC│ ⌫ │ = │
123 _______, KC_BTN1, XP(lz , lZ) , XP(lx , lX) , XP(lc , lC) , XP(lv , lV) , XP(lb , lB) , XP(ln , lN) , XP(lm, lM) , XP(lc1, lC1) , XP(lp1, lP1) , KC_MS_U, XP(lq1 , lQ1) , 195 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
124 _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R), 196 * │ │ σ │ ω │ ε │ ρ │ ϑ │ ℝ │ τ │ ∫ │ ∞ │ π │ [ │ ] │
125 197 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
198 * │ │ α │ ∑ │ δ │ φ │ γ │ ℏ │ ∈ │ ϰ │ λ │ 𝔼 │ ∝ │ ⏎ │
199 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
200 * │ ⇧(│ │ ζ │ ξ │ χ │ ν │ β │ η │ μ │ ≊ │ ± │ │ × │
201 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
202 * │ ⎈ │ │lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│ │ │ │
203 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
204lower layer shifted
205 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
206 * │ ¬ │ │ │ │ │ │ │ │ │ │ │ ⌫ │ = │
207 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
208 * │MB3│ ϕ │ Ω │ ℇ │ ∇ │ θ │ ℤ │ ℂ │ ∮ │ ⊗ │ ∏ │ { │ } │
209 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
210 * │MB2│ Α │ ⨋ │ ∂ │ ψ │ Γ │ 𝓗 │ ∉ │ ∆ │ Λ │ Å │ ℒ │ ⏎ │
211 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
212 * │ ⇧(│MB1│ ∡ │ Ξ │ ̇ │ Ν │ Β │ ∪ │ ∘ │ ≈ │ ∓ │MSU│ ⋅ │
213 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
214 * │ ⎈ │MB4│lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│MSL│MSD│MSR│
215 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
216MB - mouse buttons
217MS - mouse directions
218*/
219 [_LWR] = LAYOUT_ortho_5x13(
220 KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL, UK_EQL,
221 KC_BTN3,XP(lq,lQ),XP(lw,lW),XP(le,lE),XP(lr,lR),XP(lt,lT),XP(ly,lY),XP(lu,lU),XP(li,lI), XP(lo,lO), XP(lp,lP), _______, _______,
222 KC_BTN2,XP(la,lA),XP(ls,lS),XP(ld,lD),XP(lf,lF),XP(lg,lG),XP(lh,lH),XP(lj,lJ),XP(lk,lK), XP(ll,lL),XP(ll1,lL1), XP(lk1,lK1), _______,
223 _______, KC_BTN1,XP(lz,lZ),XP(lx,lX),XP(lc,lC),XP(lv,lV),XP(lb,lB),XP(ln,lN),XP(lm,lM),XP(lc1,lC1),XP(lp1,lP1), KC_MS_U, XP(lq1,lQ1),
224 _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R),
126 225
226/*
227raise layer
228 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
229 * │ ⎋ │ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│
230 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
231 * │ │ â │ │ │ │ ț │ │ │ î │ │ │ │ │
232 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
233 * │ ⇪ │ ă │ ș │ │ │ │ │ │ │ │ │ │ │
234 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
235 * │ │ │ │ │ ç │ │ │ │ │ │ │MWU│ │
236 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
237 * │ │ │ │ │ │ │ │ │ │ │MWL│MWD│MWR│
238 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
239MW - mouse wheel
240raise layer shifted
241 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
242 * │ │ │ │ │ │ │ │ │ │ │ │ │ │
243 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
244 * │ │ Â │ │ │ │ Ț │ │ │ Î │ │ │ │ │
245 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
246 * │ │ Ă │ Ș │ │ │ │ │ │ │ │ │ │ │
247 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
248 * │ │ │ │ │ Ç │ │ │ │ │ │ │ │ │
249 * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
250 * │ │ │ │ │ │ │ │ │ │ │ │ │ │
251 * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
252*/
127 [_RSE] = LAYOUT_ortho_5x13( 253 [_RSE] = LAYOUT_ortho_5x13(
128 KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , 254 KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
129 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , 255 _______,XP(ra1,rA1), _______, _______, _______,XP(rt,rT), _______, _______,XP(ri,rI), _______, _______, _______, _______ ,
130 KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , 256 KC_CAPS, XP(ra,rA), XP(rs,rS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
131 _______, _______, _______, _______,XP(rc,rC), _______, _______, _______, _______, _______, _______, KC_WH_U, _______ , 257 _______, _______, _______, _______,XP(rc,rC), _______, _______, _______, _______, _______, _______, KC_WH_U, _______ ,
132 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R), 258 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R),
133 259/*
260adj layer
261 * ┌───┬────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────┬────┐
262 * │MOD│RMOD│ │ │ │ │ │ │ │ │ │M_T │M_SW│
263 * ├───┼────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┤
264 * │HUI│HUD │M_P│ │rst│ │ │ │ │ │ │ │M_SN│
265 * ├───┼────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┤
266 * │SAI│SAD │M_B│ │ │ │ │ │ │ │ │ │M_K │
267 * ├───┼────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┤
268 * │VAI│VAD │M_R│ │ │ │ │ │ │ │ │ │M_X │
269 * ├───┼────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼────┼────┤
270 * │TOG│ │ │ │ │ │ │ │ │ │ │M_TW│M_G │
271 * └───┴────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────┴────┘
272*/
134 [_ADJ] = LAYOUT_ortho_5x13( 273 [_ADJ] = LAYOUT_ortho_5x13(
135 RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_SW, 274 RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T , RGB_M_SW,
136 RGB_HUI, RGB_HUD , RGB_M_P , _______, RESET , RGB_M_T, _______, _______, _______, _______, _______, _______ , RGB_M_SN, 275 RGB_HUI, RGB_HUD , RGB_M_P , _______, RESET , _______, _______, _______, _______, _______, _______, _______ , RGB_M_SN,
137 RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K , 276 RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K ,
138 RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X , 277 RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X ,
139 RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G), 278 RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
@@ -141,8 +280,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
141// clang-format on 280// clang-format on
142 281
143// let us assume we start with both layers off 282// let us assume we start with both layers off
144bool toggle_lwr = false; 283static bool toggle_lwr = false;
145bool toggle_rse = false; 284static bool toggle_rse = false;
146 285
147bool led_update_user(led_t led_state) { 286bool led_update_user(led_t led_state) {
148 // Disable the default LED update code, so that lock LEDs could be reused to show layer status. 287 // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
@@ -206,6 +345,10 @@ layer_state_t default_layer_state_set_user(layer_state_t state) {
206void keyboard_post_init_user(void) { 345void keyboard_post_init_user(void) {
207 // Enable the LED layers 346 // Enable the LED layers
208 rgblight_layers = my_rgb_layers; 347 rgblight_layers = my_rgb_layers;
348#ifdef OLED_ENABLE
349 oled_logo_timer = timer_read32();
350#endif
351
209#ifdef CONSOLE_ENABLE 352#ifdef CONSOLE_ENABLE
210 353
211 debug_enable = true; 354 debug_enable = true;
@@ -249,3 +392,71 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
249 return true; 392 return true;
250} 393}
251#endif 394#endif
395
396#ifdef OLED_ENABLE
397
398static void render_logo(void) {
399 oled_write_P(m65_logo, false);
400}
401
402void user_oled_magic(void) {
403 // Host Keyboard Layer Status
404 oled_write_P(PSTR("Layer: "), false);
405
406 switch (get_highest_layer(layer_state)) {
407 case _QW:
408 oled_write_P(PSTR("Default\n"), false);
409 break;
410 case _LWR:
411 oled_write_P(PSTR("Lower\n"), false);
412 break;
413 case _RSE:
414 oled_write_P(PSTR("Raise\n"), false);
415 break;
416 case _ADJ:
417 oled_write_P(PSTR("ADJ\n"), false);
418 break;
419 default:
420 // Or use the write_ln shortcut over adding '\n' to the end of your string
421 oled_write_ln_P(PSTR("Undefined"), false);
422 }
423
424 // Host Keyboard LED Status
425 led_t led_state = host_keyboard_led_state();
426 oled_write_P(led_state.num_lock ? PSTR("Lower ") : PSTR(" "), false);
427 oled_write_P(led_state.scroll_lock ? PSTR("Raise ") : PSTR(" "), false);
428 oled_write_P(led_state.caps_lock ? PSTR("CapsLock ") : PSTR(" "), false);
429#ifdef WPM_ENABLE
430 oled_write_P(PSTR("\nwpm: "), false);
431 uint8_t wpm = get_current_wpm();
432 oled_write_P(wpm != 0 ? get_u8_str(wpm,' ') : PSTR(" "), false);
433#endif
434}
435
436oled_rotation_t oled_init_user(oled_rotation_t rotation) {
437 return OLED_ROTATION_180;
438}
439
440void clear_screen(void) {
441 if (clear_logo){
442 for (uint8_t i = 0; i < OLED_DISPLAY_HEIGHT; ++i) {
443 for (uint8_t j = 0; j < OLED_DISPLAY_WIDTH; ++j) {
444 oled_write_raw_byte(0x0, i*OLED_DISPLAY_WIDTH + j);
445 }
446 }
447 clear_logo = false;
448 }
449}
450
451# define SHOW_LOGO 5000
452bool oled_task_user(void) {
453 if ((timer_elapsed32(oled_logo_timer) < SHOW_LOGO)){
454 render_logo();
455 }else{
456 clear_screen();
457 user_oled_magic();
458 }
459 return false;
460}
461
462#endif
diff --git a/keyboards/mlego/m65/keymaps/via/keymap.c b/keyboards/mlego/m65/keymaps/via/keymap.c
index f6bb77bcd..1422eed34 100644
--- a/keyboards/mlego/m65/keymaps/via/keymap.c
+++ b/keyboards/mlego/m65/keymaps/via/keymap.c
@@ -59,17 +59,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R), 59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R),
60 60
61 [_ADJ] = LAYOUT_ortho_5x13( 61 [_ADJ] = LAYOUT_ortho_5x13(
62 _______, _______, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , 62 RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T , RGB_M_SW,
63 _______, _______, _______ , _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______ , 63 RGB_HUI, RGB_HUD , RGB_M_P , _______, RESET , _______, _______, _______, _______, _______, _______, _______ , RGB_M_SN,
64 _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , 64 RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K ,
65 _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , 65 RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X ,
66 _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), 66 RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
67}; 67};
68// clang-format on 68// clang-format on
69 69
70// let us assume we start with both layers off 70// let us assume we start with both layers off
71bool toggle_lwr = false; 71static bool toggle_lwr = false;
72bool toggle_rse = false; 72static bool toggle_rse = false;
73 73
74bool led_update_user(led_t led_state) { 74bool led_update_user(led_t led_state) {
75 // Disable the default LED update code, so that lock LEDs could be reused to show layer status. 75 // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
@@ -166,3 +166,60 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
166 return true; 166 return true;
167} 167}
168#endif 168#endif
169
170#ifdef OLED_ENABLE
171
172static void render_logo(void) {
173 static const char PROGMEM m65_logo[] = {
174// 'slon', 128x32px
1750x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1760x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1770x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0xa0, 0xa0,
1780xa0, 0xd0, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1790x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1800x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1810x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1820x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1830x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1840x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1850x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0c, 0xc3, 0x3c, 0x0f, 0x05, 0x14, 0x14,
1860x04, 0xfc, 0x9f, 0x88, 0x80, 0x81, 0xe7, 0xfc, 0x03, 0x03, 0x07, 0x05, 0x06, 0x06, 0x08, 0x0c,
1870x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x04, 0x10, 0x18, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
1880x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1930x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xe0, 0xde, 0xc1, 0xf0, 0x89, 0x0b, 0x18, 0x08, 0x04, 0x04,
1940x01, 0x1a, 0x0f, 0x00, 0x00, 0x80, 0xc0, 0x20, 0x20, 0x20, 0x60, 0x40, 0x40, 0x42, 0x40, 0x40,
1950x40, 0x40, 0x40, 0xe0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x13, 0x7c, 0xe0, 0xc0, 0x00, 0x00,
1960x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1970x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1980x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2000x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x07, 0x07, 0x07, 0x05,
2010x05, 0x05, 0x07, 0x05, 0x07, 0x07, 0x07, 0x07, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01,
2020x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
2030x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x07,
2040x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
2050x04, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2060x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
207 0x00
208 };
209
210 oled_write_raw_P(m65_logo, sizeof(m65_logo));
211
212}
213
214
215oled_rotation_t oled_init_user(oled_rotation_t rotation) {
216 return rotation;
217}
218
219bool oled_task_user(void) {
220 //user_oled_magic();
221 render_logo();
222 return false;
223}
224
225#endif
diff --git a/keyboards/mlego/m65/lib/glcdfont.c b/keyboards/mlego/m65/lib/glcdfont.c
new file mode 100644
index 000000000..4b354756b
--- /dev/null
+++ b/keyboards/mlego/m65/lib/glcdfont.c
@@ -0,0 +1,231 @@
1// Copyright 2022 @filterpaper
2// SPDX-License-Identifier: GPL-2.0+
3
4#include "progmem.h"
5
6static const unsigned char PROGMEM font[] = {
7 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
9 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
10 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
11 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
12 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
13 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
14 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
15 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
16 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
17 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
18 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
19 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
20 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
21 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
22 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
23 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
24 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
25 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
26 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
27 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
28 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
29 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
30 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
31 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
32 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
33 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
34 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
35 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
36 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
37 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
38 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
39 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
40 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
41 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
42 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
43 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
44 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
45 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
46 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
47 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
48 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
49 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
50 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
51 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
52 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
53 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
54 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
55 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
56 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
57 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
58 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
59 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
60 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
61 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
62 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
63 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
64 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
65 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
66 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
67 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
68 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
69 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
70 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
71 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
72 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
73 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
74 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
75 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
76 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
77 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
78 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
79 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
80 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
81 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
82 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
83 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
84 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
85 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
86 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
87 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
88 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
89 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
90 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
91 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
92 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
93 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
94 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
95 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
96 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
97 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
98 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
99 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
100 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
101 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
102 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
103 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
104 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
105 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
106 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
107 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
108 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
109 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
110 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
111 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
112 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
113 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
114 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
115 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
116 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
117 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
118 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
119 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
120 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
121 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
122 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
123 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
124 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
125 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
126 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
127 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
128 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
129 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
130 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
131 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
132 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
133 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
134 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
137 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
140 0x00, 0x00, 0x00, 0xE0, 0x18, 0x02,
141 0x00, 0x3C, 0x1E, 0x06, 0x0E, 0x0A,
142 0x1A, 0x0E, 0x26, 0xFF, 0xBF, 0x0D,
143 0x00, 0x80, 0x80, 0x81, 0xFF, 0xFE,
144 0xF8, 0x01, 0x01, 0x03, 0x03, 0x03,
145 0x03, 0x05, 0x05, 0x02, 0x02, 0x0A,
146 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
147 0x0C, 0x04, 0x10, 0x18, 0x20, 0xC0,
148 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
150 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
155 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
158 0x00, 0x00, 0x00, 0xD0, 0x58, 0x78,
159 0x68, 0x2C, 0x24, 0x34, 0xF4, 0xF4,
160 0x3C, 0x3C, 0xFC, 0xF8, 0xF8, 0x70,
161 0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80,
162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
163 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
164 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
166 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
171 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
172 0x00, 0xC0, 0x7C, 0x07, 0x80, 0xE0,
173 0x60, 0x64, 0xE2, 0x60, 0x10, 0x10,
174 0x20, 0x22, 0x12, 0x17, 0x3F, 0x0B,
175 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
179 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
180 0x6F, 0xFC, 0xE0, 0x00, 0x00, 0x00,
181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
186 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
191 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
194 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
195 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
196 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
197 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
200 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
201 0x60, 0x60, 0x70, 0x70, 0xF0, 0xF0,
202 0xD0, 0xD0, 0xD0, 0xD0, 0x50, 0x50,
203 0x50, 0x70, 0x78, 0x78, 0x78, 0x7C,
204 0x7F, 0x7D, 0x7C, 0x5E, 0x4F, 0x44,
205 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
206 0x00, 0x38, 0x30, 0x30, 0x30, 0x30,
207 0x30, 0x30, 0x58, 0x46, 0x47, 0x41,
208 0x41, 0x01, 0x01, 0x03, 0x03, 0x42,
209 0x42, 0x42, 0x46, 0x46, 0x46, 0x46,
210 0x42, 0x43, 0x43, 0x73, 0x77, 0x72,
211 0x70, 0x60, 0x60, 0x60, 0x60, 0x60,
212 0x60, 0x61, 0x67, 0x6F, 0x7E, 0x78,
213 0x78, 0x70, 0x70, 0x70, 0x70, 0x70,
214 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
215 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
216 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
217 0x40, 0x40, 0x40, 0x48, 0x58, 0x58,
218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
219 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
221 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
230 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
231};
diff --git a/keyboards/mlego/m65/m65.h b/keyboards/mlego/m65/m65.h
index a93a80be7..f5ffd519f 100644
--- a/keyboards/mlego/m65/m65.h
+++ b/keyboards/mlego/m65/m65.h
@@ -96,8 +96,18 @@ enum unicode_names {
96 lL1, 96 lL1,
97 lk1, 97 lk1,
98 lK1, 98 lK1,
99 ra,
100 rA,
101 ra1,
102 rA1,
99 rc, 103 rc,
100 rC, 104 rC,
105 ri,
106 rI,
107 rs,
108 rS,
109 rt,
110 rT,
101}; 111};
102 112
103static inline void led_lwr(const bool on) { 113static inline void led_lwr(const bool on) {
@@ -113,7 +123,7 @@ static inline void led_rse(const bool on) {
113} 123}
114static inline void led_caps(const bool on) { 124static inline void led_caps(const bool on) {
115#ifdef LED_CAPS_LOCK_PIN 125#ifdef LED_CAPS_LOCK_PIN
116 if ((DEVICE_VER == 0x0001) || (DEVICE_VER == 0x0003)) { 126 if ((DEVICE_VER == 0x0001) || (DEVICE_VER == 0x0003) || (DEVICE_VER == 0x0004)) {
117 writePin(LED_CAPS_LOCK_PIN, !on); 127 writePin(LED_CAPS_LOCK_PIN, !on);
118 } 128 }
119 if (DEVICE_VER == 0x0002) { 129 if (DEVICE_VER == 0x0002) {
@@ -121,4 +131,3 @@ static inline void led_caps(const bool on) {
121 } 131 }
122#endif 132#endif
123} 133}
124
diff --git a/keyboards/mlego/m65/readme.md b/keyboards/mlego/m65/readme.md
index 2526aed31..8076697a2 100644
--- a/keyboards/mlego/m65/readme.md
+++ b/keyboards/mlego/m65/readme.md
@@ -6,7 +6,7 @@ A (13x5) ortholinear keyboard that can be hand wired or using a pcb.
6 6
7* Keyboard Maintainer: [Alin Elena](https://github.com/alinelena) ([@drFaustroll on GitLab](https://gitlab.com/drFaustroll)) 7* Keyboard Maintainer: [Alin Elena](https://github.com/alinelena) ([@drFaustroll on GitLab](https://gitlab.com/drFaustroll))
8* Hardware Supported: custom pcb [see](https://gitlab.com/m-lego/m65) STM/APM32F103C8T6, aka Black Pill (rev1), 8* Hardware Supported: custom pcb [see](https://gitlab.com/m-lego/m65) STM/APM32F103C8T6, aka Black Pill (rev1),
9 GD32F303CCT6 from we act aka Blue Pill Plus (rev2), STM32F401 from we act (rev3) 9 GD32F303CCT6 from we act aka Blue Pill Plus (rev2), STM32F401 from we act (rev3,rev4) STM32F411 can also be used just ask
10* Hardware Availability: [custom how to](https://alin.elena.space/blog/keeblego/) 10* Hardware Availability: [custom how to](https://alin.elena.space/blog/keeblego/)
11 11
12 12
@@ -42,6 +42,17 @@ Flashing example for this keyboard:
42 42
43To enter flashing mode, on microcontroller keep pressed BOOT0 and then NRST, release NRST and then after 0.5s or so release BOOT0. 43To enter flashing mode, on microcontroller keep pressed BOOT0 and then NRST, release NRST and then after 0.5s or so release BOOT0.
44 44
45For rev4
46
47 make mlego/m65/rev4:default
48
49Flashing example for this keyboard:
50
51 make mlego/m65/rev4:default:flash
52
53To enter flashing mode, press in the same time, LWR+RSE+r, alternatively on microcontroller keep pressed BOOT0 and then NRST, release NRST and then after 0.5s or so release BOOT0.
54
55
45 56
46See 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). 57See 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).
47 58
@@ -127,3 +138,35 @@ the pinout is the same for stm32f411
127| SCROLL_LOCK | B13 | 138| SCROLL_LOCK | B13 |
128| RBG_DI | B15 | 139| RBG_DI | B15 |
129 140
141## Pins and leds rev4 stm32f401
142
143the pinout is the same for stm32f411
144
145| Rows | C0 | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | Pins |
146| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
147| R0 | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | Bksp | B10 |
148| R1 | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] | A5 |
149| R2 | # | a | s | d | f | g | h | j | k | l | ; | ' | Enter | A6 |
150| R3 | Shift | \ | z | x | c | v | b | n | m | , | . | Up | / | A7 |
151| R4 | Ctrl | Menu | Lower | Alt | Raise | Space | Space | Space | AltGr | Shift | Left | Down | Right | B0 |
152| | B14 | A8 | A10 | A15 | B3 | B4 | B5 | B7 | A1 | A2 | A3 | A4 | B1 | |
153
154### Encoders
155
156 - Pad_A: A0
157 - Pad_B: B6
158
159### Oled
160
161 - SDA: B9
162 - SCL: B8
163
164### LEDS
165
166| Leds | Pin |
167| ----------- | --- |
168| NUM_LOCK | B12 |
169| CAPS_LOCK | C13 |
170| SCROLL_LOCK | B13 |
171| RBG_DI | B15 |
172
diff --git a/keyboards/mlego/m65/rev4/config.h b/keyboards/mlego/m65/rev4/config.h
new file mode 100644
index 000000000..ee47061a9
--- /dev/null
+++ b/keyboards/mlego/m65/rev4/config.h
@@ -0,0 +1,67 @@
1/*
2Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#define DEVICE_VER 0x0004
21#define PRODUCT_ID 0x6060
22
23#define LED_NUM_LOCK_PIN B12
24#define LED_SCROLL_LOCK_PIN B13
25#define LED_CAPS_LOCK_PIN C13
26
27// 0 1 2 3 4
28#define MATRIX_ROW_PINS \
29 { B10, A5, A6, A7, B0 }
30// 0 1 2 3 4 5 6 7 8 9 10 11 12
31#define MATRIX_COL_PINS \
32 { B14, A8, A10, A15, B3, B4, B5, B7, A1, A2, A3, A4, B1 }
33
34#define ENCODERS_PAD_A \
35 { A0 }
36#define ENCODERS_PAD_B \
37 { B6 }
38
39#define RGB_DI_PIN B15
40
41#define UNUSED_PINS
42#define RGBLIGHT_LAYERS
43
44#define ENCODER_RESOLUTION 4
45
46#undef RGBLED_NUM
47#define RGBLED_NUM 20
48#define RGBLIGHT_EFFECT_BREATHING
49#define RGBLIGHT_EFFECT_RAINBOW_MOOD
50#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
51#define RGBLIGHT_EFFECT_SNAKE
52#define RGBLIGHT_EFFECT_KNIGHT
53#define RGBLIGHT_EFFECT_CHRISTMAS
54#define RGBLIGHT_EFFECT_STATIC_GRADIENT
55#define RGBLIGHT_EFFECT_RGB_TEST
56#define RGBLIGHT_EFFECT_ALTERNATING
57#define RGBLIGHT_EFFECT_TWINKLE
58#define RGBLIGHT_HUE_STEP 8
59#define RGBLIGHT_SAT_STEP 8
60
61#ifdef OLED_ENABLE
62# define OLED_DISPLAY_128X32
63#define I2C1_SCL_PIN B9
64#define I2C1_SDA_PIN B8
65#define OLED_BRIGHTNESS 128
66#define OLED_FONT_H "keyboards/mlego/m65/lib/glcdfont.c"
67#endif
diff --git a/keyboards/mlego/m65/rev4/halconf.h b/keyboards/mlego/m65/rev4/halconf.h
new file mode 100644
index 000000000..c1a060ad7
--- /dev/null
+++ b/keyboards/mlego/m65/rev4/halconf.h
@@ -0,0 +1,32 @@
1/* Copyright 2020 QMK
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
17/*
18 * This file was auto-generated by:
19 * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/halconf.h -r platforms/chibios/common/configs/halconf.h`
20 */
21
22#pragma once
23
24#define HAL_USE_PWM TRUE
25
26#define HAL_USE_SERIAL TRUE
27
28#define SERIAL_USB_BUFFERS_SIZE 256
29
30#define HAL_USE_I2C TRUE
31
32#include_next <halconf.h>
diff --git a/keyboards/mlego/m65/rev4/mcuconf.h b/keyboards/mlego/m65/rev4/mcuconf.h
new file mode 100644
index 000000000..ba1cd32fd
--- /dev/null
+++ b/keyboards/mlego/m65/rev4/mcuconf.h
@@ -0,0 +1,33 @@
1/* Copyright 2020 QMK
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
17/*
18 * This file was auto-generated by:
19 * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/mcuconf.h -r platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h`
20 */
21
22#pragma once
23
24#include_next <mcuconf.h>
25
26#undef STM32_PWM_USE_TIM3
27#define STM32_PWM_USE_TIM3 TRUE
28
29#undef STM32_SERIAL_USE_USART1
30#define STM32_SERIAL_USE_USART1 TRUE
31
32#undef STM32_I2C_USE_I2C1
33#define STM32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/mlego/m65/rev4/rules.mk b/keyboards/mlego/m65/rev4/rules.mk
new file mode 100644
index 000000000..9e1e0ab23
--- /dev/null
+++ b/keyboards/mlego/m65/rev4/rules.mk
@@ -0,0 +1,22 @@
1# MCU name
2MCU = STM32F401
3
4# Bootloader selection
5BOOTLOADER = stm32-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = yes # Enable N-Key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output
19ENCODER_ENABLE = yes # Enable encoder
20OLED_ENABLE = yes # Enable OLED
21OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C
22WPM_ENABLE = yes # Enable WPM Counter