planck.c 870 B

123456789101112131415161718192021222324252627282930313233
  1. #include "planck.h"
  2. #include "raw_hid.h"
  3. #include "keymap.h"
  4. #ifdef ONEHAND_ENABLE
  5. __attribute__ ((weak))
  6. const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
  7. {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
  8. {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
  9. {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
  10. {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
  11. };
  12. #endif
  13. void matrix_init_kb(void) {
  14. // Turn status LED on
  15. DDRE |= (1<<6);
  16. PORTE |= (1<<6);
  17. matrix_init_user();
  18. }
  19. #ifdef RAW_ENABLE
  20. void raw_hid_receive( uint8_t *data, uint8_t length )
  21. {
  22. // Basic test of Raw HID
  23. // Echo back data received
  24. raw_hid_send( data, length );
  25. }
  26. #endif