ez.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
  2. * Copyright 2015 ZSA Technology Labs Inc (@zsa)
  3. * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #pragma once
  19. #include "planck.h"
  20. #ifdef KEYBOARD_planck_ez_glow
  21. # include "glow.h"
  22. #endif
  23. #define LAYOUT_planck_1x2uC( \
  24. k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
  25. k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
  26. k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
  27. k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
  28. ) \
  29. { \
  30. { k00, k01, k02, k03, k04, k05 }, \
  31. { k10, k11, k12, k13, k14, k15 }, \
  32. { k20, k21, k22, k23, k24, k25 }, \
  33. { k30, k31, k32, k3a, k3b, KC_NO }, \
  34. { k06, k07, k08, k09, k0a, k0b }, \
  35. { k16, k17, k18, k19, k1a, k1b }, \
  36. { k26, k27, k28, k29, k2a, k2b }, \
  37. { k37, k38, k39, k33, k34, k35 } \
  38. }
  39. #define LAYOUT_ortho_4x12( \
  40. k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
  41. k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
  42. k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
  43. k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
  44. ) \
  45. { \
  46. { k00, k01, k02, k03, k04, k05 }, \
  47. { k10, k11, k12, k13, k14, k15 }, \
  48. { k20, k21, k22, k23, k24, k25 }, \
  49. { k30, k31, k32, k3a, k3b, k36 }, \
  50. { k06, k07, k08, k09, k0a, k0b }, \
  51. { k16, k17, k18, k19, k1a, k1b }, \
  52. { k26, k27, k28, k29, k2a, k2b }, \
  53. { k37, k38, k39, k33, k34, k35 } \
  54. }
  55. #define LAYOUT_planck_mit LAYOUT_planck_1x2uC
  56. #define LAYOUT_planck_grid LAYOUT_ortho_4x12
  57. void planck_ez_right_led_on(void);
  58. void planck_ez_right_led_off(void);
  59. void planck_ez_right_led_level(uint8_t level);
  60. void planck_ez_left_led_on(void);
  61. void planck_ez_left_led_off(void);
  62. void planck_ez_left_led_level(uint8_t level);
  63. enum planck_ez_keycodes {
  64. LED_LEVEL = SAFE_RANGE,
  65. TOGGLE_LAYER_COLOR,
  66. EZ_SAFE_RANGE,
  67. };
  68. #ifndef WEBUSB_ENABLE
  69. # define WEBUSB_PAIR KC_NO
  70. #endif
  71. typedef union {
  72. uint32_t raw;
  73. struct {
  74. uint8_t led_level :3;
  75. bool disable_layer_led :1;
  76. bool rgb_matrix_enable :1;
  77. };
  78. } keyboard_config_t;
  79. extern keyboard_config_t keyboard_config;