teensy_2.c 408 B

1234567891011121314
  1. #include QMK_KEYBOARD_H
  2. bool is_keyboard_master(void) {
  3. // TODO: replace this override once USB host detection is implemented
  4. // SPLIT_HAND_PIN Combined with MASTER_LEFT or MASTER_RIGHT, gives a crude
  5. // way to force teensy to run as slave/master
  6. setPinInput(SPLIT_HAND_PIN);
  7. #if defined(MASTER_RIGHT)
  8. return !readPin(SPLIT_HAND_PIN);
  9. #else
  10. return readPin(SPLIT_HAND_PIN);
  11. #endif
  12. }