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.

66 lines
1.8 KiB

  1. /* Copyright 2022 DOIO
  2. * Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include "quantum.h"
  18. // OLED animation
  19. #include "./lib/logo.h"
  20. #ifdef OLED_ENABLE
  21. uint16_t startup_timer;
  22. oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
  23. startup_timer = timer_read();
  24. return rotation;
  25. }
  26. bool oled_task_kb(void) {
  27. static bool finished_logo = false;
  28. if ((timer_elapsed(startup_timer) < 5000) && !finished_logo) {
  29. render_logo();
  30. } else {
  31. finished_logo = true;
  32. if (!oled_task_user()) {
  33. return false;
  34. }
  35. }
  36. return true;
  37. }
  38. #endif
  39. #ifdef RGB_MATRIX_ENABLE
  40. led_config_t g_led_config = { {
  41. { 0, 1, 2, 3, NO_LED },
  42. { 4, 5, 6, 7, NO_LED },
  43. { 8, 9, 10, 11, NO_LED },
  44. { 12, 13, 14, 15, NO_LED }
  45. }, {
  46. {0 , 0}, {75 , 0}, {149, 0}, {224, 0},
  47. {0 , 21}, {75 , 21}, {149, 21}, {224, 21},
  48. {0 , 43}, {75 , 43}, {149, 43}, {224, 43},
  49. {0 , 64}, {75 , 64}, {149, 64}, {224, 64},
  50. }, {
  51. 1, 1, 1, 1,
  52. 1, 4, 4, 1,
  53. 1, 4, 4, 1,
  54. 1, 1, 1, 1,
  55. } };
  56. #endif