rev3.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Copyright 2018 Jack Humbert <jack.humb@gmail.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 "rev3.h"
  17. void matrix_init_kb(void) {
  18. matrix_init_user();
  19. }
  20. void matrix_scan_kb(void) {
  21. matrix_scan_user();
  22. }
  23. #ifdef DIP_SWITCH_ENABLE
  24. __attribute__((weak))
  25. void dip_update(uint8_t index, bool active) {}
  26. __attribute__((weak))
  27. void dip_switch_update_user(uint8_t index, bool active) {
  28. dip_update(index, active);
  29. }
  30. #endif
  31. #ifdef SWAP_HANDS_ENABLE
  32. __attribute__ ((weak))
  33. const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
  34. {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
  35. {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}},
  36. {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
  37. {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
  38. {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
  39. {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
  40. {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
  41. {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
  42. {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}},
  43. {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}},
  44. };
  45. #endif