-
-// 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, \
)
#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
#+NAME: header
#+BEGIN_SRC C :tangle no
-generated from users/manna-harbour_miryoku/miryoku.org
+generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*-
#+END_SRC
Contains the keymap. Included from keymap.c
[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]]
-#+BEGIN_SRC C :noweb yes :tangle manna-harbour_miryoku.c
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.c
// <<header>>
#include QMK_KEYBOARD_H
Config options. Automatically included.
[[./config.h][users/manna-harbour_miryoku/config.h]]
-#+BEGIN_SRC C :noweb yes :tangle config.h
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle config.h
// <<header>>
#pragma once
Build options. Automatically included.
[[./rules.mk][users/manna-harbour_miryoku/rules.mk]]
-#+BEGIN_SRC makefile :noweb yes :tangle rules.mk
-
+#+BEGIN_SRC makefile :noweb yes :padline no :tangle rules.mk
# <<header>>
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-
+EXTRAFLAGS += -flto # Link Time Optimization to reduce code size, 31358->28034/28672
#+END_SRC
are unused.
[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]]
-#+BEGIN_SRC C :noweb yes :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c
// <<header>>
#define LAYOUT_miryoku(\
are the thumb keys. The remaining keys are unused.
[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]]
-#+BEGIN_SRC C :noweb yes :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c
// <<header>>
#define LAYOUT_miryoku(\
**** keymap.c
[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]]
-#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
// <<header>>
#define LAYOUT_miryoku( \
#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
+
#+END_SRC
**** config.h
[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]]
-#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h
// <<header>>
#pragma once
#define RGB_MATRIX_SPD_STEP 10
#endif
+#define SSD1306OLED // old oled driver
+
#+END_SRC
**** rules.mk
[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk][keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk]]
-#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk
-
+#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk
# <<header>>
RGB_MATRIX_ENABLE = WS2812
+# old oled driver
+SRC += ./lib/glcdfont.c \
+ ./lib/logo_reader.c
+
#+END_SRC