rev2.c 782 B

12345678910111213141516171819202122232425262728293031
  1. #include "rev2.h"
  2. #ifdef SSD1306OLED
  3. void led_set_kb(uint8_t usb_led) {
  4. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  5. led_set_user(usb_led);
  6. }
  7. #endif
  8. bool is_keyboard_left(void) {
  9. #if defined(MASTER_LEFT)
  10. return is_keyboard_master();
  11. #elif defined(MASTER_RIGHT)
  12. return !is_keyboard_master();
  13. #elif defined(SPLIT_HAND_PIN)
  14. // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
  15. setPinInputHigh(SPLIT_HAND_PIN);
  16. bool x = !readPin(SPLIT_HAND_PIN);
  17. setPinInput(SPLIT_HAND_PIN);
  18. return x;
  19. #elif defined(EE_HANDS)
  20. return eeprom_read_byte(EECONFIG_HANDEDNESS);
  21. #endif
  22. return is_keyboard_master();
  23. }
  24. void matrix_init_kb(void) {
  25. matrix_init_user();
  26. };