Skip to content

Commit

Permalink
real basic oled shit
Browse files Browse the repository at this point in the history
  • Loading branch information
plodah committed Dec 10, 2024
1 parent 7da7834 commit 6f2e453
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions users/plodah/functions/oled.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#ifdef OLED_ENABLE
bool oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);

switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("QWE\n"), false);
break;
case _COLEMAK:
oled_write_P(PSTR("COL\n"), false);
break;
case _FN_A:
oled_write_P(PSTR("FnA\n"), false);
break;
case _FN_B:
oled_write_P(PSTR("FnB\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("???"), false);
}

// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);

return false;
}
#endif
1 change: 1 addition & 0 deletions users/plodah/plodah.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "functions/dipswitch.c"
#include "functions/dynamic_macros.c"
#include "functions/mouse_jiggler.c"
#include "functions/oled.c"
#include "functions/repeathold_rgb.c"
#include "functions/tapdance.c"
#include "functions/textfns.c"
Expand Down

0 comments on commit 6f2e453

Please sign in to comment.