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.

84 lines
2.1 KiB

  1. /* Copyright 2020 Brandon Schlack
  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. #include "version.h"
  19. #include "eeprom.h"
  20. #include "process_records.h"
  21. #ifdef TAP_DANCE_ENABLE
  22. # include "tap_dances.h"
  23. #endif // TAP_DANCE_ENABLE
  24. #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
  25. # include "rgb_bs.h"
  26. #endif
  27. /* TODO Layer Names */
  28. enum bs_layers {
  29. _BASE = 0,
  30. _M1 = 1,
  31. _M2 = 2,
  32. _M3 = 3,
  33. _M4 = 4,
  34. _FN1 = 5,
  35. _M1_FN1 = 6,
  36. _M2_FN1 = 7,
  37. _M3_FN1 = 8,
  38. _M4_FN1 = 9,
  39. _FN2 = 10,
  40. _M1_FN2 = 11,
  41. _M2_FN2 = 12,
  42. _M3_FN2 = 13,
  43. _M4_FN2 = 14,
  44. _ADJUST = 15 // 15: Change keyboard settings
  45. };
  46. #define _MACRO _M1
  47. #define _LOWER _FN1
  48. #define _RAISE _FN2
  49. /* TODO User EECONFIG */
  50. typedef union {
  51. uint32_t raw;
  52. struct {
  53. bool rgb_layer_change :1;
  54. uint8_t rgb_theme :4;
  55. };
  56. } user_config_t;
  57. extern user_config_t user_config;
  58. void matrix_init_keymap(void);
  59. void keyboard_post_init_keymap(void);
  60. void shutdown_keymap(void);
  61. void suspend_power_down_keymap(void);
  62. void suspend_wakeup_init_keymap(void);
  63. void matrix_scan_keymap(void);
  64. layer_state_t default_layer_state_set_keymap(layer_state_t state);
  65. layer_state_t layer_state_set_keymap(layer_state_t state);
  66. bool led_update_keymap(led_t led_state);
  67. #ifdef STOPLIGHT_LED
  68. typedef struct {
  69. bool is_active :1;
  70. uint8_t index :7;
  71. uint16_t timer :16;
  72. } stoplight_led_t;
  73. void led_stoplight_start(void);
  74. void led_stoplight_set(pin_t pin);
  75. void led_stoplight_end(void);
  76. void matrix_scan_led_stoplight(void);
  77. #endif