aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/keymaps/kidbrazil/layer.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/crkbd/keymaps/kidbrazil/layer.c')
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/layer.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/kidbrazil/layer.c b/keyboards/crkbd/keymaps/kidbrazil/layer.c
new file mode 100644
index 000000000..bd04f3b88
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/layer.c
@@ -0,0 +1,69 @@
+#include QMK_KEYBOARD_H
+#include "enums.h"
+
+// Render Blank Space
+void render_space(void) {
+ oled_write_ln_P(PSTR(" "), false);
+}
+
+// Render separator lines for oled display
+void render_separator(void) {
+ switch (get_highest_layer(layer_state)){
+ case _GAME:
+ case _WEAPON:
+ oled_write_ln_P(PSTR("===================="), false);
+ break;
+ default:
+ oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
+ }
+}
+
+// Render current layer state
+void render_layer_state(void){
+ // If you want to change the display of OLED, you need to change here
+ switch (get_highest_layer(layer_state)){
+ case _QWERTY:
+ oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
+ break;
+ case _NUM:
+ oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
+ break;
+ case _SYM:
+ oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
+ break;
+ case _GAME:
+ oled_write_ln_P(PSTR("| G A M E ]"), false);
+ break;
+ case _WEAPON:
+ oled_write_ln_P(PSTR("| W E A P O N ]"), false);
+ break;
+ default:
+ oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
+ }
+}
+
+// Render USB State
+void render_usb_state(void) {
+ switch (USB_DeviceState) {
+ case DEVICE_STATE_Unattached:
+ oled_write_ln_P(PSTR("| USB | FREE ]"), false);
+ break;
+ case DEVICE_STATE_Suspended:
+ oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
+ break;
+ case DEVICE_STATE_Configured:
+ oled_write_ln_P(PSTR("| USB | READY ]"), false);
+ break;
+ case DEVICE_STATE_Powered:
+ oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
+ break;
+ case DEVICE_STATE_Default:
+ oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
+ break;
+ case DEVICE_STATE_Addressed:
+ oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
+ break;
+ default:
+ oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
+ }
+}