c97ec805cd1096bb60bf55ab19973dc01bd043b4
- Author
- jack <jack@pngu.org>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/keyboards/boardsource/lib/oled.c b/keyboards/boardsource/lib/oled.c
2new file mode 100644
3index 0000000000000000000000000000000000000000..c0fb6ab4a61bb3e64edee8a8b8644a6eb7836303
4--- /dev/null
5+++ b/keyboards/boardsource/lib/oled.c
6@@ -0,0 +1,20 @@
7+// Copyright 2024 jack (@waffle87)
8+// SPDX-License-Identifier: GPL-2.0-or-later
9+#include "oled.h"
10+
11+void render_layer_state(void) {
12+ switch (get_highest_layer(layer_state)) {
13+ case 0:
14+ oled_write_raw_P(layer0_img, sizeof(layer0_img));
15+ break;
16+ case 1:
17+ oled_write_raw_P(layer1_img, sizeof(layer1_img));
18+ break;
19+ case 2:
20+ oled_write_raw_P(layer2_img, sizeof(layer2_img));
21+ break;
22+ case 3:
23+ oled_write_raw_P(layer3_img, sizeof(layer3_img));
24+ break;
25+ }
26+}
27diff --git a/keyboards/boardsource/unicorne/unicorne.h b/keyboards/boardsource/lib/oled.h
28rename from keyboards/boardsource/unicorne/unicorne.h
29rename to keyboards/boardsource/lib/oled.h
30index 68bbeeb18ab1916c2c6553a0584cbd46d2569cbd..4778be20b0df30f65ce051fccbdc4b576da0fe9b 100644
31--- a/keyboards/boardsource/unicorne/unicorne.h
32+++ b/keyboards/boardsource/lib/oled.h
33@@ -1,54 +1,12 @@
34-// Copyright 2023 jack (@waffle87)
35+// Copyright 2024 jack (@waffle87)
36 // SPDX-License-Identifier: GPL-2.0-or-later
37 #pragma once
38 #include "quantum.h"
39
40-#ifdef OLED_ENABLE
41-// clang-format off
42-static const char PROGMEM logo[] = {
43- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
44- 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
45- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0,
46- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
47- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
48- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
49- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
50- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
51- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
52- 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0,
53- 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x01, 0xe3, 0xe7, 0xe7, 0xe3,
54- 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00,
55- 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
56- 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0,
57- 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0,
58- 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
59- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0,
60- 0xc0, 0xc0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
61- 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
62- 0x00, 0x00, 0x00, 0x7e, 0xff, 0xff, 0xff, 0xe7, 0xc1, 0x81, 0x81, 0x81, 0xc1, 0x00, 0x00, 0x7f,
63- 0xff, 0xff, 0xff, 0xe3, 0xc1, 0x81, 0x81, 0xc1, 0xe3, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x00, 0x00,
64- 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
65- 0x03, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff,
66- 0xcd, 0x8c, 0x8c, 0x8c, 0x8d, 0xcf, 0xcf, 0xcf, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
67- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07,
68- 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03,
69- 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03,
70- 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00,
71- 0x00, 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
72- 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03,
73- 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03,
74- 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
77- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
78- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
79- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
80- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
81- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
82- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
83-};
84+void render_layer_state(void);
85
86-static const char PROGMEM layer_zero[] = {
87+// clang-format off
88+static const char PROGMEM layer0_img[] = {
89 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
90 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
91 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
92@@ -83,8 +41,7 @@ static const char PROGMEM layer_zero[] = {
93 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
94 };
95
96-
97-static const char PROGMEM layer_one[] = {
98+static const char PROGMEM layer1_img[] = {
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
102@@ -119,8 +76,7 @@ static const char PROGMEM layer_one[] = {
103 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
104 };
105
106-
107-static const char PROGMEM layer_two[] = {
108+static const char PROGMEM layer2_img[] = {
109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
112@@ -155,8 +111,7 @@ static const char PROGMEM layer_two[] = {
113 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
114 };
115
116-
117-static const char PROGMEM layer_three[] = {
118+static const char PROGMEM layer3_img[] = {
119 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
120 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
121 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
122@@ -190,5 +145,39 @@ static const char PROGMEM layer_three[] = {
123 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00,
124 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
125 };
126+
127+static const char PROGMEM bs_logo_img[] = {
128+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
129+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00,
130+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
131+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
132+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
133diff --git a/keyboards/boardsource/lulu/avr/rules.mk b/keyboards/boardsource/lulu/avr/rules.mk
134new file mode 100644
135index 0000000000000000000000000000000000000000..de6a3d8afcad5f1bd0def6b5e6a17786d42957cc
136--- /dev/null
137+++ b/keyboards/boardsource/lulu/avr/rules.mk
138@@ -0,0 +1 @@
139+SRC += lib/oled.c
140diff --git a/keyboards/boardsource/lulu/lulu.c b/keyboards/boardsource/lulu/lulu.c
141index 8d011268c4b1c69de4c9ef0c62c5565c6f80a0ff..b20228a7d7fcabe16a66bb3bb76f788da00b393b 100644
142--- a/keyboards/boardsource/lulu/lulu.c
143+++ b/keyboards/boardsource/lulu/lulu.c
144@@ -1,6 +1,7 @@
145 // Copyright 2022 Cole Smith <cole@boadsource.xyz>
146 // SPDX-License-Identifier: GPL-2.0-or-later
147 #include "quantum.h"
148+#include "lib/oled.h"
149
150 #ifdef ENCODER_ENABLE
151 bool encoder_update_kb(uint8_t index, bool clockwise) {
152@@ -24,225 +25,20 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
153
154 #ifdef OLED_ENABLE
155 oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
156- if (!is_keyboard_master()) {
157- return OLED_ROTATION_180;
158- }
159- return rotation;
160-}
161-
162-void render_layer1_logo(void){
163- static const char PROGMEM layer_logo[] = {
164- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
165- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
166- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
167- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
168- 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
169- 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
170- 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0,
171- 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
172- 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03,
173- 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
174- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
175- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
176- 0xfc, 0x0e, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
177- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
178- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
179- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
180- 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00,
181- 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
182- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
183- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
184- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
185- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
186- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60,
187- 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
188- 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07,
189- 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
190- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
191- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
192- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
193- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
194- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00,
195- 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
196- };
197- oled_write_raw_P(layer_logo, sizeof(layer_logo));
198-}
199-
200-void render_layer2_logo(void){
201- static const char PROGMEM layer_logo[] = {
202- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
203- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
204- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
205- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
206- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
207- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
208- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0,
209- 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
210- 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03,
211- 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
212- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
213- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
214- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
215- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
216- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
217- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
218- 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00,
219- 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
220- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
221- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f,
222- 0x3f, 0x70, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
223- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
224- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60,
225- 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
226- 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07,
227- 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
228- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
229- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
230- 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
231- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
232- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00,
233- 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
234- };
235- oled_write_raw_P(layer_logo, sizeof(layer_logo));
236-}
237-
238-void render_layer3_logo(void){
239- static const char PROGMEM layer_logo[] = {
240- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80,
241- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
242- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
243- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
244diff --git a/keyboards/boardsource/lulu/rp2040/rules.mk b/keyboards/boardsource/lulu/rp2040/rules.mk
245index 161ec22b16e2fbc0c3de0f5951b64fdf291708d1..118c27fc6a2e22db22962a1a8db1238ee295c7a3 100644
246--- a/keyboards/boardsource/lulu/rp2040/rules.mk
247+++ b/keyboards/boardsource/lulu/rp2040/rules.mk
248@@ -1 +1,2 @@
249 SERIAL_DRIVER = vendor
250+SRC += lib/oled.c
251diff --git a/keyboards/boardsource/the_q/keyboard.json b/keyboards/boardsource/the_q/keyboard.json
252new file mode 100644
253index 0000000000000000000000000000000000000000..61ff49330edf5ea86ec2297b78e55f94ed6d4719
254--- /dev/null
255+++ b/keyboards/boardsource/the_q/keyboard.json
256@@ -0,0 +1,142 @@
257+{
258+ "manufacturer": "Boardsource",
259+ "keyboard_name": "The Q",
260+ "maintainer": "waffle87",
261+ "development_board": "promicro",
262+ "diode_direction": "COL2ROW",
263+ "features": {
264+ "bootmagic": true,
265+ "extrakey": true,
266+ "mousekey": true,
267+ "nkro": true,
268+ "rgb_matrix": true,
269+ "oled": true
270+ },
271+ "matrix_pins": {
272+ "rows": ["B2", "B3", "B1", "F7", "F6", "F5", "F4"],
273+ "cols": ["D4", "C6", "D7", "E6", "B4", "B5"]
274+ },
275+ "url": "https://boardsource.xyz",
276+ "usb": {
277+ "device_version": "1.0.0",
278+ "pid": "0x7552",
279+ "vid": "0x4273"
280+ },
281+ "ws2812": {
282+ "pin": "B6"
283+ },
284+ "rgb_matrix": {
285+ "animations": {
286+ "alphas_mods": true,
287+ "band_sat": true,
288+ "band_val": true,
289+ "breathing": true,
290+ "gradient_left_right": true,
291+ "gradient_up_down": true
292+ },
293+ "default": {
294+ "animation": "alphas_mods"
295+ },
296+ "max_brightness": 150,
297+ "driver": "ws2812",
298+ "layout": [
299+ {"x": 112.2, "y": 10.6, "flags": 2},
300+ {"x": 181, "y": 5.3, "flags": 2},
301+ {"x": 215.4, "y": 53.3, "flags": 2},
302+ {"x": 112.2, "y": 64, "flags": 2},
303+ {"x": 26.2, "y": 53.3, "flags": 2},
304+ {"x": 43.4, "y": 5.3, "flags": 2},
305+ {"matrix": [0, 1], "x": 17.6, "y": 0, "flags": 4},
306+ {"matrix": [1, 1], "x": 17.6, "y": 42.7, "flags": 4},
307+ {"matrix": [2, 1], "x": 17.6, "y": 21.4, "flags": 4},
308+ {"matrix": [2, 2], "x": 34.8, "y": 21.4, "flags": 4},
309+ {"matrix": [1, 2], "x": 34.8, "y": 42.7, "flags": 4},
310+ {"matrix": [0, 2], "x": 34.8, "y": 0, "flags": 4},
311+ {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4},
312+ {"matrix": [1, 3], "x": 52, "y": 42.7, "flags": 4},
313+ {"matrix": [2, 3], "x": 52, "y": 21.4, "flags": 4},
314+ {"matrix": [2, 4], "x": 69.2, "y": 21.4, "flags": 4},
315+ {"matrix": [1, 4], "x": 69.2, "y": 42.7, "flags": 4},
316+ {"matrix": [0, 4], "x": 69.2, "y": 0, "flags": 4},
317+ {"matrix": [0, 5], "x": 86.4, "y": 0, "flags": 4},
318+ {"matrix": [1, 5], "x": 86.4, "y": 42.7, "flags": 4},
319+ {"matrix": [2, 5], "x": 86.4, "y": 21.4, "flags": 4},
320+ {"matrix": [3, 0], "x": 69.2, "y": 20, "flags": 1},
321+ {"matrix": [3, 1], "x": 86.4, "y": 20, "flags": 1},
322+ {"matrix": [3, 2], "x": 103.6, "y": 64, "flags": 1},
323+ {"matrix": [3, 3], "x": 120.8, "y": 64, "flags": 1},
324+ {"matrix": [3, 4], "x": 138, "y": 20, "flags": 1},
325+ {"matrix": [3, 5], "x": 155.2, "y": 20, "flags": 1},
326+ {"matrix": [4, 5], "x": 138, "y": 21.4, "flags": 4},
327+ {"matrix": [5, 5], "x": 138, "y": 42.7, "flags": 4},
328+ {"matrix": [6, 5], "x": 138, "y": 0, "flags": 4},
329+ {"matrix": [6, 4], "x": 155.2, "y": 0, "flags": 4},
330+ {"matrix": [5, 4], "x": 155.2, "y": 42.7, "flags": 4},
331+ {"matrix": [4, 4], "x": 155.2, "y": 21.4, "flags": 4},
332+ {"matrix": [4, 3], "x": 172.4, "y": 21.4, "flags": 4},
333+ {"matrix": [5, 3], "x": 172.4, "y": 42.7, "flags": 4},
334+ {"matrix": [6, 3], "x": 172.4, "y": 0, "flags": 4},
335+ {"matrix": [6, 2], "x": 189.6, "y": 0, "flags": 4},
336+ {"matrix": [5, 2], "x": 189.6, "y": 42.7, "flags": 4},
337+ {"matrix": [4, 2], "x": 189.6, "y": 21.4, "flags": 4},
338+ {"matrix": [4, 1], "x": 206.8, "y": 21.4, "flags": 4},
339+ {"matrix": [5, 1], "x": 206.8, "y": 42.7, "flags": 4},
340+ {"matrix": [6, 1], "x": 206.8, "y": 0, "flags": 4},
341+ {"matrix": [6, 0], "x": 224, "y": 0, "flags": 1},
342+ {"matrix": [5, 0], "x": 224, "y": 42.7, "flags": 1},
343+ {"matrix": [4, 0], "x": 224, "y": 21.4, "flags": 1},
344+ {"matrix": [2, 0], "x": 0, "y": 21.4, "flags": 1},
345+ {"matrix": [1, 0], "x": 0, "y": 42.7, "flags": 1},
346+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}
347+ ]
348+ },
349+ "community_layouts": ["split_3x6_3"],
350+ "layouts": {
351+ "LAYOUT_split_3x6_3": {
352+ "layout": [
353+ {"matrix": [0, 0], "x": 0, "y": 0.25},
354+ {"matrix": [0, 1], "x": 1, "y": 0.25},
355+ {"matrix": [0, 2], "x": 2, "y": 0.125},
356diff --git a/keyboards/boardsource/the_q/keymaps/default/keymap.json b/keyboards/boardsource/the_q/keymaps/default/keymap.json
357new file mode 100644
358index 0000000000000000000000000000000000000000..69aa6f86296841591c244c3330a66d72775ebd45
359--- /dev/null
360+++ b/keyboards/boardsource/the_q/keymaps/default/keymap.json
361@@ -0,0 +1,25 @@
362+{
363+ "keyboard": "boardsource/the_q",
364+ "keymap": "default",
365+ "layout": "LAYOUT_split_3x6_3",
366+ "layers": [
367+ [
368+ "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC",
369+ "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT",
370+ "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC",
371+ "KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT"
372+ ],
373+ [
374+ "_______", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "_______",
375+ "_______", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "_______",
376+ "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
377+ "_______", "_______", "_______", "_______", "_______", "_______"
378+ ],
379+ [
380+ "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_MOD", "RGB_TOG", "_______",
381+ "EE_CLR", "_______", "_______", "_______", "_______", "_______", "RGB_VAD", "RGB_HUD", "RGB_SAD", "RGB_RMOD", "_______", "_______",
382+ "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
383+ "_______", "_______", "_______", "_______", "_______", "_______"
384+ ]
385+ ]
386+}
387diff --git a/keyboards/boardsource/the_q/keymaps/via/keymap.json b/keyboards/boardsource/the_q/keymaps/via/keymap.json
388new file mode 100644
389index 0000000000000000000000000000000000000000..40a68c3f51f2b9bcc5d7188b9adf8fce9425f9b0
390--- /dev/null
391+++ b/keyboards/boardsource/the_q/keymaps/via/keymap.json
392@@ -0,0 +1,30 @@
393+{
394+ "keyboard": "boardsource/the_q",
395+ "keymap": "via",
396+ "layout": "LAYOUT_split_3x6_3",
397+ "config": {
398+ "features": {
399+ "via": true
400+ }
401+ },
402+ "layers": [
403+ [
404+ "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC",
405+ "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT",
406+ "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC",
407+ "KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT"
408+ ],
409+ [
410+ "_______", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "_______",
411+ "_______", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "_______",
412+ "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
413+ "_______", "_______", "_______", "_______", "_______", "_______"
414+ ],
415+ [
416+ "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_MOD", "RGB_TOG", "_______",
417+ "EE_CLR", "_______", "_______", "_______", "_______", "_______", "RGB_VAD", "RGB_HUD", "RGB_SAD", "RGB_RMOD", "_______", "_______",
418+ "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
419+ "_______", "_______", "_______", "_______", "_______", "_______"
420+ ]
421+ ]
422+}
423diff --git a/keyboards/boardsource/the_q/readme.md b/keyboards/boardsource/the_q/readme.md
424new file mode 100644
425index 0000000000000000000000000000000000000000..9ec8fe8eda554f470fb7e8faa25128f028f6b5f6
426--- /dev/null
427+++ b/keyboards/boardsource/the_q/readme.md
428@@ -0,0 +1,23 @@
429+# The Q
430+
431+* Keyboard Maintainer: [waffle87](https://github.com/waffle87)
432+* Hardware Supported: The Q PCB w/ Pro Micro style microcontroller
433+* Hardware Availability: [boardsource.xyz](https://boardsource.xyz)
434+
435+Make example for this keyboard (after setting up your build environment):
436+
437+ make boardsource/the_q:default
438+
439+Flashing example for this keyboard:
440+
441+ mke boardsource/the_q:default:flash
442+
443diff --git a/keyboards/boardsource/the_q/rules.mk b/keyboards/boardsource/the_q/rules.mk
444new file mode 100644
445index 0000000000000000000000000000000000000000..de6a3d8afcad5f1bd0def6b5e6a17786d42957cc
446--- /dev/null
447+++ b/keyboards/boardsource/the_q/rules.mk
448@@ -0,0 +1 @@
449+SRC += lib/oled.c
450diff --git a/keyboards/boardsource/the_q/the_q.c b/keyboards/boardsource/the_q/the_q.c
451new file mode 100644
452index 0000000000000000000000000000000000000000..09294569114a537094fa6e5250b0154f9bcc066a
453--- /dev/null
454+++ b/keyboards/boardsource/the_q/the_q.c
455@@ -0,0 +1,14 @@
456+// Copyright 2024 jack (@waffle87)
457+// SPDX-License-Identifier: GPL-2.0-or-later
458+#include "quantum.h"
459+#include "lib/oled.h"
460+
461+#ifdef OLED_ENABLE
462+bool oled_task_kb(void) {
463+ if (!oled_task_user()) {
464+ return false;
465+ }
466+ render_layer_state();
467+ return false;
468+}
469+#endif
470diff --git a/keyboards/boardsource/unicorne/rules.mk b/keyboards/boardsource/unicorne/rules.mk
471index 48b30dcd51a79f416cc05c8afb4c52dd83de818b..448962cf002e9617e59a9a8cc316fe9ce64fed36 100644
472--- a/keyboards/boardsource/unicorne/rules.mk
473+++ b/keyboards/boardsource/unicorne/rules.mk
474@@ -1,2 +1,3 @@
475 SERIAL_DRIVER = vendor
476 POINTING_DEVICE_DRIVER = analog_joystick
477+SRC += lib/oled.c
478diff --git a/keyboards/boardsource/unicorne/unicorne.c b/keyboards/boardsource/unicorne/unicorne.c
479index 22cd1e4a37d8b588ed3a78984da25239a014a4fd..f9dac8d3efbc722a00ca909d3c5ef9b14ecc90b3 100644
480--- a/keyboards/boardsource/unicorne/unicorne.c
481+++ b/keyboards/boardsource/unicorne/unicorne.c
482@@ -1,6 +1,7 @@
483-// Copyright 2023 jack (@waffle87)
484+// Copyright 2024 jack (@waffle87)
485 // SPDX-License-Identifier: GPL-2.0-or-later
486-#include "unicorne.h"
487+#include "quantum.h"
488+#include "lib/oled.h"
489
490 #ifdef OLED_ENABLE
491 oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
492@@ -15,22 +16,9 @@ bool oled_task_kb(void) {
493 return false;
494 }
495 if (is_keyboard_master()) {
496- switch (get_highest_layer(layer_state)) {
497- case 0:
498- oled_write_raw(layer_zero, sizeof(layer_zero));
499- break;
500- case 1:
501- oled_write_raw(layer_one, sizeof(layer_one));
502- break;
503- case 2:
504- oled_write_raw(layer_two, sizeof(layer_two));
505- break;
506- case 3:
507- oled_write_raw(layer_three, sizeof(layer_three));
508- break;
509- }
510+ render_layer_state();
511 } else {
512- oled_write_raw(logo, sizeof(logo));
513+ oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img));
514 }
515 return false;
516 }