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.

122 lines
4.5 KiB

  1. /* Copyright 2020 ademey "MsMustard"
  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. #pragma once
  17. #include "quantum.h"
  18. /* Default staggered layout
  19. Bottom row: 1u 1.5u 2.25u 2.75u 1.5u 1u */
  20. #define LAYOUT( \
  21. K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \
  22. K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K55, \
  23. K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K54, K45, \
  24. K30, K31, K32, K33, K40, K42, K43 \
  25. ){ \
  26. { K00, K01, K02, K03, K04, K05,}, \
  27. { K10, K11, K12, K13, K14, K15,}, \
  28. { K20, K21, K22, K23, K24, K25,}, \
  29. { K30, K31, K32, K33, KC_NO, KC_NO,},\
  30. { K40, KC_NO, K42, K43, KC_NO, K45,},\
  31. { K50, K51, K52, K53, K54, K55,}, \
  32. { K60, K61, K62, K63, K64, K65,}, \
  33. { K70, K71, K72, K73, K74, K75, } \
  34. }
  35. /* Default ortho layout
  36. Bottom row: 1u 1u 1u 2u 2u 1u 1u 1u */
  37. #define LAYOUT_ortho( \
  38. K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \
  39. K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K54, K55, \
  40. K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K43, K44, K45, \
  41. K30, K31, K32, K33, K34, K35, K40, K41, K42 \
  42. ){ \
  43. { K00, K01, K02, K03, K04, K05,}, \
  44. { K10, K11, K12, K13, K14, K15,}, \
  45. { K20, K21, K22, K23, K24, K25,}, \
  46. { K30, K31, K32, K33, K34, K35,}, \
  47. { K40, K41, K42, K43, K44, K45,}, \
  48. { K50, K51, K52, K53, K54, K55,}, \
  49. { K60, K61, K62, K63, K64, K65,}, \
  50. { K70, K71, K72, K73, K74, K75, }, \
  51. { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, } \
  52. }
  53. /* MIT ortho layout
  54. Bottom row: 1u 1u 1u 1u 2u 1u 1u 1u 1u */
  55. #define LAYOUT_ortho_mit( \
  56. K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \
  57. K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K54, K55, \
  58. K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K43, K44, K45, \
  59. K30, K31, K32, K33, K84, K35, K85, K40, K41, K42 \
  60. ){ \
  61. { K00, K01, K02, K03, K04, K05,}, \
  62. { K10, K11, K12, K13, K14, K15,}, \
  63. { K20, K21, K22, K23, K24, K25,}, \
  64. { K30, K31, K32, K33, KC_NO, K35,}, \
  65. { K40, K41, K42, K43, K44, K45,}, \
  66. { K50, K51, K52, K53, K54, K55,}, \
  67. { K60, K61, K62, K63, K64, K65,}, \
  68. { K70, K71, K72, K73, K74, K75, }, \
  69. { KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, } \
  70. }
  71. /* All 1u ortho layout
  72. Bottom row: 1u 1u 1u 1u 1u 1u 1u 1u 1u 1u */
  73. #define LAYOUT_ortho_all( \
  74. K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \
  75. K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K54, K55, \
  76. K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K43, K44, K45, \
  77. K30, K31, K32, K33, K84, K34, K35, K85, K40, K41, K42 \
  78. ){ \
  79. { K00, K01, K02, K03, K04, K05,}, \
  80. { K10, K11, K12, K13, K14, K15,}, \
  81. { K20, K21, K22, K23, K24, K25,}, \
  82. { K30, K31, K32, K33, K34, K35,}, \
  83. { K40, K41, K42, K43, K44, K45,}, \
  84. { K50, K51, K52, K53, K54, K55,}, \
  85. { K60, K61, K62, K63, K64, K65,}, \
  86. { K70, K71, K72, K73, K74, K75, }, \
  87. { KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, } \
  88. }
  89. enum terrazzo_matrix_effects {
  90. TERRAZZO_NONE = 0,
  91. // --------------------------------------
  92. // -----Begin led effect enum macros-----
  93. #define TERRAZZO_EFFECT(name, ...) TERRAZZO_EFFECT_##name,
  94. #include "terrazzo_effects/terrazzo_effects.inc"
  95. #undef TERRAZZO_EFFECT
  96. // --------------------------------------
  97. // -----End led effect enum macros-------
  98. // All new effects go above this line
  99. TERRAZZO_EFFECT_MAX
  100. };
  101. enum terrazzo_keycodes {
  102. TZ_NXT = SAFE_RANGE,
  103. TZ_PRV,
  104. TZ_OFF
  105. };
  106. void terrazzo_render(void);
  107. void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value);
  108. void terrazzo_draw_at(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t image[]);
  109. void terrazzo_scroll_pixel(bool clockwise);
  110. void terrazzo_step_mode(void);
  111. void terrazzo_step_mode_reverse(void);
  112. void terrazzo_mode_off(void);