oled_stuff.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. /*
  3. Copyright 2018-2022 Eric Gebhart <e.a.gebhart@gmail.com>
  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. 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. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifdef OLED_CUSTOM_ENABLE
  16. #include "quantum.h"
  17. //#include "oled_driver.h"
  18. void oled_render_mod_lock_status(void);
  19. void oled_driver_render_logo(void);
  20. bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
  21. void oled_render_layer_map(void);
  22. void oled_render_default_layer_state(void);
  23. void oled_render_layer_state(void);
  24. #define WRITE_STR_CASE(CASE, STRING) \
  25. case CASE: \
  26. oled_write_P(PSTR(STRING), false); \
  27. break; \
  28. // kinda hacky for the moment.
  29. // assume bepo is enabled.
  30. #define WRITE_STR_LAYER(CASE, STRING) \
  31. LCASE(CASE) \
  32. oled_write_P(PSTR(STRING), false); \
  33. break;
  34. // make maps for the oled. code doc.
  35. #define carte_de_map(ROW1, ROW2, ROW3) \
  36. oled_write_ln_P(PSTR(ROW1), false); \
  37. oled_write_ln_P(PSTR(ROW2), false); \
  38. oled_write_ln_P(PSTR(ROW3), false);
  39. // generate Case for all locales for this map.
  40. #define SHOW_MAP(LAYER) \
  41. LCASE(LAYER) \
  42. CAT(CARTE, LAYER) \
  43. break;
  44. // a single case, for single locale layers.
  45. #define SHOW_MAP_S(LAYER) \
  46. case LAYER: \
  47. CAT(CARTE, LAYER) \
  48. break;
  49. #endif