logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

rev2.c (2461B)


  1. /* Copyright 2020 Spaceman
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "quantum.h"
  17. #ifdef OLED_ENABLE
  18. oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
  19. return OLED_ROTATION_270;
  20. }
  21. bool oled_task_kb(void) {
  22. if (!oled_task_user()) {
  23. return false;
  24. }
  25. static const char PROGMEM pancake_logo[] = {
  26. 0x00, 0x00, 0x3e, 0x0a, 0x04, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x0c, 0x18, 0x3e, 0x00, 0x3e,
  27. 0x22, 0x22, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x08, 0x36, 0x00, 0x3e, 0x2a, 0x22, 0x00, 0x00,
  28. 0x00, 0x30, 0xc8, 0x84, 0x84, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x19, 0x1d,
  29. 0x1d, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x84, 0x84, 0xc8, 0x30, 0x00,
  30. 0x00, 0x63, 0x94, 0x08, 0x08, 0x11, 0x71, 0x17, 0x13, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x62,
  31. 0xe2, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, 0x11, 0x11, 0x31, 0x08, 0x08, 0x94, 0x63, 0x00,
  32. 0x00, 0x00, 0x03, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
  33. 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 };
  34. oled_write_raw_P(pancake_logo, sizeof(pancake_logo));
  35. // Host Keyboard Layer Status
  36. oled_set_cursor(0, 4);
  37. oled_write_P(PSTR("\nLAYER\n-----\n"), false);
  38. switch (get_highest_layer(layer_state)) {
  39. case 0:
  40. oled_write_P(PSTR("DEFLT\n"), false);
  41. break;
  42. case 2:
  43. oled_write_P(PSTR("FUNCT\n"), false);
  44. break;
  45. case 1:
  46. oled_write_P(PSTR("RAISE\n"), false);
  47. break;
  48. default:
  49. // Or use the write_ln shortcut over adding '\n' to the end of your string
  50. oled_write_ln_P(PSTR("Undefined"), false);
  51. break;
  52. }
  53. return false;
  54. }
  55. #endif