aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nullbitsco
diff options
context:
space:
mode:
authorJose Luis Adelantado Torres <JLuisAdelantadoTorres@gmail.com>2021-06-24 11:24:11 +0900
committerGitHub <noreply@github.com>2021-06-24 12:24:11 +1000
commit5e86a11a8d49928f06609e9ee1b9ef86c45f3f2e (patch)
tree25a2dcf2aa290fe9a4fbc7a0b6a70a2d437abfe1 /keyboards/nullbitsco
parent3099630a11ff64797deb4864193c37b3e4074e05 (diff)
downloadqmk_firmware-5e86a11a8d49928f06609e9ee1b9ef86c45f3f2e.tar.gz
qmk_firmware-5e86a11a8d49928f06609e9ee1b9ef86c45f3f2e.zip
[keymap] Added new `oled_status` keymap to `nullbitsco/nibble` keyboard (#12824)
* Added new oled_status keymap to nullbitsco/nibble keyboard * rm: Removed font from src imports
Diffstat (limited to 'keyboards/nullbitsco')
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/config.h21
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/glcdfont.c245
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c106
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c117
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.h41
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/readme.md29
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk7
7 files changed, 566 insertions, 0 deletions
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h b/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h
new file mode 100644
index 000000000..bdb970ff5
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h
@@ -0,0 +1,21 @@
1/* Copyright 2021 Jose Luis Adelantado Torres
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#pragma once
17
18// Referenced custom font
19#ifdef OLED_DRIVER_ENABLE
20# define OLED_FONT_H "keyboards/nullbitsco/nibble/keymaps/oled_status/glcdfont.c"
21#endif
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/glcdfont.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/glcdfont.c
new file mode 100644
index 000000000..1435bf730
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/glcdfont.c
@@ -0,0 +1,245 @@
1/* Copyright 2021 Jose Luis Adelantado Torres
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#include "progmem.h"
17
18// Standard ASCII 5x7 font
19
20static const unsigned char font[] PROGMEM = {
21 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
22 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
23 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
24 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
25 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
26 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
27 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
28 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
29 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
30 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
31 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
32 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
33 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
34 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
35 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
36 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
37 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
38 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
39 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
40 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
41 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
42 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
43 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
44 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
45 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
46 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
47 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
48 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
49 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
50 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
51 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
52 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
53 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
54 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
55 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
56 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
57 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
58 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
59 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
60 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
61 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
62 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
63 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
64 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
65 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
66 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
67 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
68 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
69 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
70 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
71 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
72 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
73 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
74 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
75 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
76 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
77 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
78 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
79 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
80 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
81 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
82 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
83 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
84 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
85 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
86 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
87 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
88 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
89 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
90 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
91 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
92 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
93 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
94 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
95 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
96 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
97 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
98 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
99 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
100 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
101 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
102 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
103 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
104 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
105 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
106 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
107 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
108 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
109 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
110 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
111 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
112 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
113 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
114 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
115 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
116 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
117 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
118 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
119 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
120 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
121 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
122 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
123 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
124 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
125 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
126 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
127 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
128 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
129 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
130 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
131 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
132 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
133 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
134 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
135 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
136 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
137 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
138 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
139 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
140 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
141 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
142 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
143 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
144 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
145 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
146 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
147 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
148 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC,
150 0xFC, 0xFC, 0x00, 0x7C, 0x7C, 0x7C,
151 0x7C, 0x7C, 0x7C, 0xFC, 0xF8, 0xF0,
152 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00,
153 0x00, 0x00, 0x80, 0xC0, 0x40, 0xC0,
154 0x40, 0x40, 0x40, 0x60, 0x30, 0x18,
155 0x0C, 0x04, 0x04, 0xCC, 0xC0, 0x00,
156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
157 0x00, 0x00, 0x80, 0xC0, 0x40, 0xC0,
158 0x40, 0x40, 0x40, 0x60, 0x30, 0x18,
159 0x0C, 0x04, 0x04, 0xFC, 0x00, 0x00,
160 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
161 0x00, 0xF0, 0x10, 0x10, 0x50, 0x10,
162 0x50, 0x10, 0x50, 0x10, 0x50, 0x10,
163 0x50, 0x10, 0x50, 0x10, 0x50, 0x10,
164 0x50, 0x10, 0x10, 0x10, 0xF0, 0x00,
165 0x00, 0xF0, 0x10, 0x10, 0x50, 0x10,
166 0x50, 0x10, 0x50, 0x10, 0x50, 0x10,
167 0x50, 0x10, 0x50, 0x10, 0x50, 0x10,
168 0x50, 0x10, 0x10, 0x10, 0xF0, 0x00,
169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
170 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
171 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
172 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
173 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
174 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
175 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
176 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
177 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
181 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
182 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
183 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
184 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
185 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
186 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
187 0x18, 0x18, 0x18, 0xFF, 0xFF, 0x18,
188 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
189 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF,
190 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
191 0x18, 0x18, 0x18, 0x99, 0x18, 0x18,
192 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
193 0x00, 0x1F, 0x10, 0x90, 0xD0, 0xD1,
194 0x50, 0x11, 0x14, 0x15, 0x14, 0x15,
195 0x14, 0x15, 0x14, 0x15, 0x50, 0xD1,
196 0xD0, 0x91, 0x10, 0x10, 0x1F, 0x00,
197 0x00, 0x1F, 0x10, 0x10, 0x10, 0x11,
198 0x10, 0x11, 0x54, 0xD5, 0x94, 0x15,
199 0x94, 0xD5, 0x54, 0x15, 0x10, 0x11,
200 0x10, 0x11, 0x10, 0x10, 0x1F, 0x00,
201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
202 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
203 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
204 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
205 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
206 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
207 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
208 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
209 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
213 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F,
214 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00,
215 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x3F,
216 0x3F, 0x1F, 0x00, 0x00, 0x00, 0x00,
217 0x00, 0x00, 0x01, 0x03, 0x02, 0x03,
218 0x02, 0x02, 0x02, 0x06, 0x0C, 0x18,
219 0x30, 0x20, 0x20, 0x33, 0x03, 0x00,
220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
221 0x00, 0x00, 0x01, 0x03, 0x02, 0x03,
222 0x02, 0x02, 0x02, 0x06, 0x0C, 0x18,
223 0x30, 0x20, 0x20, 0x3F, 0x00, 0x00,
224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
225 0x00, 0x00, 0x01, 0x03, 0x01, 0x08,
226 0x1C, 0x0E, 0x07, 0x00, 0x1C, 0x7E,
227 0x1C, 0x00, 0x07, 0x0E, 0x1C, 0x0C,
228 0x01, 0x03, 0x01, 0x00, 0x00, 0x00,
229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
230 0x00, 0x00, 0x18, 0x0C, 0x07, 0x03,
231 0x07, 0x0C, 0x18, 0x00, 0x00, 0x00,
232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
237 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
242 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
243 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
245};
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
new file mode 100644
index 000000000..c39f42b36
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
@@ -0,0 +1,106 @@
1/* Copyright 2021 Jose Luis Adelantado Torres
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#include QMK_KEYBOARD_H
17
18#ifdef OLED_DRIVER_ENABLE
19# include "oled_display.h"
20#endif
21
22enum layer_names {
23 _MA,
24 _FN
25};
26
27enum custom_keycodes {
28 KC_CUST = SAFE_RANGE,
29};
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 [_MA] = LAYOUT_ansi(
33 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
34 KC_F13, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
35 KC_F14, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
36 KC_F15, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
37 KC_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
38 ),
39 [_FN] = LAYOUT_ansi(
40 RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END,
41 RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
45 ),
46};
47
48#ifdef OLED_DRIVER_ENABLE
49oled_rotation_t oled_init_user(oled_rotation_t rotation) {
50 oled_timer = timer_read32();
51 set_oled_mode(OLED_MODE_IDLE);
52 return OLED_ROTATION_180;
53}
54
55void oled_task_user(void) {
56 if (timer_elapsed(oled_timer) >= 3000) {
57 set_oled_mode(OLED_MODE_IDLE);
58 }
59 render_frame();
60}
61#endif
62
63bool process_record_user(uint16_t keycode, keyrecord_t *record) {
64 // Send keystrokes to host keyboard, if connected (see readme)
65 process_record_remote_kb(keycode, record);
66
67 switch(keycode) {
68 case RGB_TOG:
69 if (record->event.pressed) {
70#ifdef OLED_DRIVER_ENABLE
71 process_record_keymap_oled(keycode);
72#endif
73 }
74 break;
75 case KC_CUST: //custom macro
76 if (record->event.pressed) {
77 }
78 break;
79 }
80 return true;
81}
82
83
84void encoder_update_user(uint8_t index, bool clockwise) {
85 if (clockwise) {
86 tap_code(KC_VOLU);
87#ifdef OLED_DRIVER_ENABLE
88 process_record_encoder_oled(KC_VOLU);
89#endif
90 } else {
91 tap_code(KC_VOLD);
92#ifdef OLED_DRIVER_ENABLE
93 process_record_encoder_oled(KC_VOLD);
94#endif
95 }
96}
97
98void matrix_init_user(void) {
99 // Initialize remote keyboard, if connected (see readme)
100 matrix_init_remote_kb();
101}
102
103void matrix_scan_user(void) {
104 // Scan and parse keystrokes from remote keyboard, if connected (see readme)
105 matrix_scan_remote_kb();
106}
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c
new file mode 100644
index 000000000..1b132a9e6
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c
@@ -0,0 +1,117 @@
1/* Copyright 2021 Jose Luis Adelantado Torres
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#include <stdio.h>
17#include "quantum.h"
18#include "oled_display.h"
19
20static const char PROGMEM oled_mode_messages[5][15] = {
21 "",
22 "Volume Up",
23 "Volume Down",
24 "RGB ON",
25 "RGB OFF"
26};
27
28static const char PROGMEM oled_mode_icons[5][3][5] = {
29 {{128,129,130,131,0},{160,161,162,163,0},{192,193,194,195,0}},
30 {{132,133,134,135,0},{164,165,166,167,0},{196,197,198,199,0}},
31 {{136,137,138,139,0},{168,169,170,171,0},{200,201,202,203,0}},
32 {{140,141,142,143,0},{172,173,174,175,0},{204,205,206,207,0}},
33 {{144,145,146,147,0},{176,177,178,179,0},{208,209,210,211,0}}
34};
35
36void set_oled_mode(oled_mode_t mode) {
37 oled_mode = mode;
38}
39
40void process_record_encoder_oled(uint16_t keycode) {
41 oled_timer = timer_read32();
42 switch (keycode) {
43 case KC_VOLU:
44 set_oled_mode(OLED_MODE_VOLUME_UP);
45 break;
46 case KC_VOLD:
47 set_oled_mode(OLED_MODE_VOLUME_DOWN);
48 break;
49 default:
50 set_oled_mode(OLED_MODE_IDLE);
51 break;
52 }
53}
54
55void process_record_keymap_oled(uint16_t keycode) {
56 oled_timer = timer_read32();
57 if(rgblight_is_enabled()) {
58 set_oled_mode(OLED_MODE_RGB_OFF);
59 } else {
60 set_oled_mode(OLED_MODE_RGB_ON);
61 }
62}
63
64void render_wpm(void) {
65 char wpm_str[10];
66
67 sprintf(wpm_str, "%03d", get_current_wpm());
68 oled_write_P(PSTR(" "), false);
69 oled_write(wpm_str, false);
70}
71
72void render_idle(void) {
73 // Host Keyboard LED Status
74 led_t led_state = host_keyboard_led_state();
75
76 // Printing logo, state
77 oled_write_P(oled_mode_icons[0][0], false);
78 oled_write_P(PSTR(" "), false);
79 oled_write_P(led_state.scroll_lock ? PSTR("S ") : PSTR(" "), false);
80 oled_write_P(led_state.num_lock ? PSTR("N ") : PSTR(" "), false);
81 oled_write_P(led_state.caps_lock ? PSTR("C ") : PSTR(" "), false);
82 oled_write_P(PSTR("\n"), false);
83 oled_write_P(oled_mode_icons[0][1], false);
84 oled_write_P(PSTR(" Nibble"), false);
85 oled_write_P(PSTR("\n"), false);
86 oled_write_P(oled_mode_icons[0][2], false);
87 oled_write_P(PSTR("\n"), false);
88
89 // Printing WPM
90 render_wpm();
91}
92
93void render_status_mode_message(void) {
94 // Printing state icon with message
95 oled_write_P(oled_mode_icons[oled_mode][0], false);
96 oled_write_P(PSTR("\n"), false);
97 oled_write_P(oled_mode_icons[oled_mode][1], false);
98 oled_write_P(PSTR(" "), false);
99 oled_write_P(oled_mode_messages[oled_mode], false);
100 oled_write_P(PSTR("\n"), false);
101 oled_write_P(oled_mode_icons[oled_mode][2], false);
102 oled_write_P(PSTR("\n\n"), false);
103}
104
105void render_frame(void) {
106 switch (oled_mode) {
107 case OLED_MODE_VOLUME_UP:
108 case OLED_MODE_VOLUME_DOWN:
109 case OLED_MODE_RGB_ON:
110 case OLED_MODE_RGB_OFF:
111 render_status_mode_message();
112 break;
113 default:
114 render_idle();
115 break;
116 }
117}
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.h b/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.h
new file mode 100644
index 000000000..bd59d44b4
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.h
@@ -0,0 +1,41 @@
1/* Copyright 2021 Jose Luis Adelantado Torres
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#pragma once
17
18typedef enum {
19 OLED_MODE_IDLE = 0,
20 OLED_MODE_VOLUME_UP = 1,
21 OLED_MODE_VOLUME_DOWN = 2,
22 OLED_MODE_RGB_ON = 3,
23 OLED_MODE_RGB_OFF = 4,
24} oled_mode_t;
25
26uint16_t oled_timer;
27oled_mode_t oled_mode;
28
29void set_oled_mode(oled_mode_t mode);
30
31void process_record_encoder_oled(uint16_t keycode);
32
33void process_record_keymap_oled(uint16_t keycode);
34
35void render_wpm(void);
36
37void render_idle(void);
38
39void render_status_mode_message(void);
40
41void render_frame(void);
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/readme.md b/keyboards/nullbitsco/nibble/keymaps/oled_status/readme.md
new file mode 100644
index 000000000..5b56e5a35
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/readme.md
@@ -0,0 +1,29 @@
1# Oled Status
2
3This uses the [default keymap layout](#layout) and uses the oled to display some useful information. Also VIA is enabled by default!
4
5Oled displays
6 * [Led status](#idle)
7 * [WPM](#idle)
8 * [Volume Notifications](#volume-notification)
9 * [RGB Notifications](#rgb-notification)
10
11
12## Layout
13![Layout](https://i.imgur.com/XtxdHRH.png)
14
15## Display
16### IDLE
17![IDLE1](https://i.imgur.com/OzS3l6J.png)
18
19![IDLE2](https://i.imgur.com/KG03xkV.png)
20
21### Volume Notification
22![VOL1](https://i.imgur.com/ZEMeme9.png)
23
24![VOL2](https://i.imgur.com/fQ14uhM.png)
25
26### RGB Notification
27![RGB1](https://i.imgur.com/ILCMudA.png)
28
29![RGB2](https://i.imgur.com/V5v6PVq.png)
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk b/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk
new file mode 100644
index 000000000..51c47cff8
--- /dev/null
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk
@@ -0,0 +1,7 @@
1OLED_DRIVER_ENABLE = yes
2WPM_ENABLE = yes
3VIA_ENABLE = yes
4
5ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
6 SRC += oled_display.c
7endif