summaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c')
-rw-r--r--keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
index 56d4de25ac..f5be6844f8 100644
--- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
+++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
@@ -1,5 +1,4 @@
-
-// generated from users/manna-harbour_miryoku/miryoku.org
+// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*-
#define LAYOUT_miryoku( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \
@@ -15,3 +14,41 @@ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_
)
#include "manna-harbour_miryoku.c"
+
+
+#ifdef SSD1306OLED
+
+#include "ssd1306.h"
+
+void matrix_init_user(void) {
+ iota_gfx_init(!has_usb()); // turns on the display
+}
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_logo(void);
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
+ matrix_write(matrix, read_logo());
+ }
+}
+
+void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+
+#endif //SSD1306OLED