summaryrefslogtreecommitdiff
path: root/keyboards/prototypist/oceanographer/oceanographer.c
diff options
context:
space:
mode:
authorAnjheos <69339386+Anjheos@users.noreply.github.com>2023-04-03 13:18:08 -0700
committerGitHub <noreply@github.com>2023-04-03 21:18:08 +0100
commiteb52984a94f70b95811fbc0853c158c68c40ea4f (patch)
treec66419d25e0b803f797b9a5106bdda0f836bbeb2 /keyboards/prototypist/oceanographer/oceanographer.c
parenta5272a15754e5e5ca68918628b635858d19ad1fa (diff)
Adding Oceanographer to QMK. (#20324)
Diffstat (limited to 'keyboards/prototypist/oceanographer/oceanographer.c')
-rw-r--r--keyboards/prototypist/oceanographer/oceanographer.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/keyboards/prototypist/oceanographer/oceanographer.c b/keyboards/prototypist/oceanographer/oceanographer.c
new file mode 100644
index 0000000000..ad9378b75c
--- /dev/null
+++ b/keyboards/prototypist/oceanographer/oceanographer.c
@@ -0,0 +1,54 @@
+// Copyright 2023 Anjheos (@Anjheos)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#ifdef OLED_ENABLE
+oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
+ return OLED_ROTATION_90;
+}
+
+bool oled_task_kb(void) {
+ if (!oled_task_user()){
+ return false;
+ }
+
+ oled_write_ln_P(PSTR("LAYER"), false);
+
+ switch (get_highest_layer(layer_state)) {
+
+ case 0:
+ oled_write_ln_P(PSTR("L1"), false);
+ break;
+
+ case 1:
+ oled_write_ln_P(PSTR("L2"), false);
+ break;
+
+ case 2:
+ oled_write_ln_P(PSTR("L3"), false);
+ break;
+
+ case 3:
+ oled_write_ln_P(PSTR("L4"), false);
+ break;
+
+ default:
+ oled_write_ln_P(PSTR(" "), false);
+
+ }
+
+ oled_write_ln_P(PSTR(" "), false);
+
+ oled_write_ln_P(PSTR("LOCK:"), false);
+
+ led_t led_state = host_keyboard_led_state();
+
+ oled_write_P(led_state.caps_lock ? PSTR ("CAPS ") : PSTR(" "), false);
+ oled_write_P(led_state.scroll_lock ? PSTR ("SCROL") : PSTR(" "), false);
+ oled_write_ln_P(led_state.num_lock ? PSTR ("NUM ") : PSTR(" "), false);
+
+ return false;
+}
+
+#endif \ No newline at end of file