diff options
author | Joel Challis <git@zvecr.com> | 2019-07-20 21:35:30 +0100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-20 13:35:30 -0700 |
commit | 0da743d80ba9c8dc913f46f91e16354883ac27ac (patch) | |
tree | cd0dddf90b9e7967050cff71b4ef024b66411b00 /keyboards/handwired/splittest/teensy_2/teensy_2.c | |
parent | 7afae46ea6075a5410d230fb8c35eaacd1872ba2 (diff) |
[Keyboard] Refactor handwired/splittest to support multiple boards (#6373)
* Refactor splittest to support multiple dev boards
* Refactor splittest to support multiple dev boards - revert change to number of RGB led
* Refactor splittest to support multiple dev boards - update docs
* Refactor splittest to support multiple dev boards - correct docs
* Refactor splittest to support multiple dev boards - update teensy master logic
Diffstat (limited to 'keyboards/handwired/splittest/teensy_2/teensy_2.c')
-rw-r--r-- | keyboards/handwired/splittest/teensy_2/teensy_2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/keyboards/handwired/splittest/teensy_2/teensy_2.c b/keyboards/handwired/splittest/teensy_2/teensy_2.c new file mode 100644 index 0000000000..bcc2a437bd --- /dev/null +++ b/keyboards/handwired/splittest/teensy_2/teensy_2.c @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +bool is_keyboard_master(void) { + // TODO: replace this override once USB host detection is implemented + // SPLIT_HAND_PIN Combined with MASTER_LEFT or MASTER_RIGHT, gives a crude + // way to force teensy to run as slave/master + setPinInput(SPLIT_HAND_PIN); + +#if defined(MASTER_RIGHT) + return !readPin(SPLIT_HAND_PIN); +#else + return readPin(SPLIT_HAND_PIN); +#endif +} |