You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. /* Copyright 2021 Brandon Lewis
  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 "ristretto.h"
  17. enum layers {
  18. _BASE,
  19. _RAISE,
  20. _LOWER,
  21. _ADJUST
  22. };
  23. #ifdef OLED_ENABLE
  24. oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
  25. return OLED_ROTATION_270;
  26. }
  27. bool oled_task_kb(void) {
  28. if (!oled_task_user()) {
  29. return false;
  30. }
  31. oled_write_P(PSTR("\n\n"), false);
  32. oled_write_ln_P(PSTR("LAYER"), false);
  33. oled_write_ln_P(PSTR(""), false);
  34. switch (get_highest_layer(layer_state)) {
  35. case _BASE:
  36. oled_write_P(PSTR("BASE\n"), false);
  37. break;
  38. case _RAISE:
  39. oled_write_P(PSTR("RAISE\n"), false);
  40. break;
  41. case _LOWER:
  42. oled_write_P(PSTR("LOWER\n"), false);
  43. break;
  44. case _ADJUST:
  45. oled_write_P(PSTR("ADJ\n"), false);
  46. break;
  47. }
  48. return false;
  49. }
  50. #endif