logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

rev1.c (3131B)


  1. /* Copyright 2022 Thomas Baart <thomas@splitkb.com>
  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. #include "quantum.h"
  17. #ifdef SWAP_HANDS_ENABLE
  18. // clang-format off
  19. __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
  20. {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}},
  21. {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}},
  22. {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}},
  23. {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}},
  24. {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}},
  25. {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}},
  26. {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}},
  27. {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}}
  28. };
  29. // clang-format on
  30. # ifdef ENCODER_MAP_ENABLE
  31. const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
  32. # endif
  33. #endif
  34. #ifdef RGB_MATRIX_ENABLE
  35. /* Map physical under glow LEDs for RGB matrix support
  36. *
  37. * 09, 05, xx, xx, 04, xx, xx, 14, xx, xx, 15, 19,
  38. * xx, xx, xx, xx, xx, 03, 13, xx, xx, xx, xx, xx,
  39. * 08, 06, 07, xx, xx, xx, 00, xx, xx, 10, xx, xx, xx, 17, 16, 18,
  40. * xx, 02, 01, xx, xx, xx, xx, 11, 12, xx
  41. */
  42. led_config_t g_led_config = { {
  43. // Key Matrix to LED Index
  44. { NO_LED, NO_LED, NO_LED, 4, NO_LED, NO_LED, 5, 9 },
  45. { NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
  46. { NO_LED, 0, NO_LED, NO_LED, NO_LED, 7, 6, 8 },
  47. { NO_LED, NO_LED, 1, 2, NO_LED, NO_LED, NO_LED, NO_LED },
  48. { NO_LED, NO_LED, NO_LED, 14, NO_LED, NO_LED, 15, 19 },
  49. { NO_LED, NO_LED, 13, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
  50. { NO_LED, 10, NO_LED, NO_LED, NO_LED, 17, 16, 18 },
  51. { NO_LED, NO_LED, 11, 12, NO_LED, NO_LED, NO_LED, NO_LED },
  52. }, {
  53. // LED Index to Physical Position
  54. {91,40}, {77,56}, {63,56}, {77,24}, {63,8}, {21,8}, {21,40}, {35,40}, {7,40}, {7,8},
  55. {133,40}, {147,56}, {161,56}, {147,24}, {161,8}, {203,8}, {203,40}, {189,40}, {217,40}, {217,8}
  56. }, {
  57. // LED Index to Flag
  58. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
  59. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
  60. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
  61. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
  62. } };
  63. #endif