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.

73 lines
1.6 KiB

  1. /* Copyright 2020 Paul James
  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. #define USE_2U_SPACE 1
  17. #include QMK_KEYBOARD_H
  18. #include "peej.h"
  19. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  20. [_BASE] = LAYOUT_PEEJ(
  21. BASE_ROW_2,
  22. BASE_ROW_3,
  23. BASE_ROW_4,
  24. BASE_ROW_5
  25. ),
  26. [_SYMBOL] = LAYOUT_PEEJ(
  27. SYMBOL_ROW_2,
  28. SYMBOL_ROW_3,
  29. SYMBOL_ROW_4,
  30. SYMBOL_ROW_5
  31. ),
  32. [_FUNCTION] = LAYOUT_PEEJ(
  33. FUNCTION_ROW_2,
  34. FUNCTION_ROW_3,
  35. FUNCTION_ROW_4,
  36. FUNCTION_ROW_5
  37. ),
  38. [_ADJUST] = LAYOUT_PEEJ(
  39. ADJUST_ROW_2,
  40. ADJUST_ROW_3,
  41. ADJUST_ROW_4,
  42. ADJUST_ROW_5
  43. )
  44. };
  45. layer_state_t layer_state_set_user(layer_state_t state) {
  46. #if defined(LED_RED) && defined(LED_GREEN)
  47. writePinLow(LED_RED);
  48. writePinLow(LED_GREEN);
  49. switch (biton32(state)) {
  50. case _FUNCTION:
  51. writePinHigh(LED_RED);
  52. break;
  53. case _SYMBOL:
  54. writePinHigh(LED_GREEN);
  55. break;
  56. case _ADJUST:
  57. writePinHigh(LED_RED);
  58. writePinHigh(LED_GREEN);
  59. break;
  60. }
  61. #endif
  62. return state;
  63. }