aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-02-07 13:12:29 -0500
committerGitHub <noreply@github.com>2017-02-07 13:12:29 -0500
commit0c2b6951a6ad80649798c0eca36a9999ebae0b13 (patch)
treefb8c24479e7978848a1c2a7ff39f117cb3383464 /quantum/quantum.c
parentde659486f52db6492be6ca03ce5450690f5d891d (diff)
parente7c4f621f14b60bde68c01ae076cac49cac9927e (diff)
downloadfirmware-0c2b6951a6ad80649798c0eca36a9999ebae0b13.tar.gz
firmware-0c2b6951a6ad80649798c0eca36a9999ebae0b13.tar.bz2
firmware-0c2b6951a6ad80649798c0eca36a9999ebae0b13.zip
Merge pull request #1057 from priyadi/selectable_output
Implement runtime selectable output (USB or BT)
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index b83ae433e..d3905decf 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -1,4 +1,7 @@
#include "quantum.h"
+#ifdef PROTOCOL_LUFA
+#include "outputselect.h"
+#endif
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
@@ -243,6 +246,36 @@ bool process_record_quantum(keyrecord_t *record) {
return false;
break;
#endif
+ #ifdef PROTOCOL_LUFA
+ case OUT_AUTO:
+ if (record->event.pressed) {
+ set_output(OUTPUT_AUTO);
+ }
+ return false;
+ break;
+ case OUT_USB:
+ if (record->event.pressed) {
+ set_output(OUTPUT_USB);
+ }
+ return false;
+ break;
+ #ifdef BLUETOOTH_ENABLE
+ case OUT_BT:
+ if (record->event.pressed) {
+ set_output(OUTPUT_BLUETOOTH);
+ }
+ return false;
+ break;
+ #endif
+ #ifdef ADAFRUIT_BLE_ENABLE
+ case OUT_BLE:
+ if (record->event.pressed) {
+ set_output(OUTPUT_ADAFRUIT_BLE);
+ }
+ return false;
+ break;
+ #endif
+ #endif
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO:
if (record->event.pressed) {
// MAGIC actions (BOOTMAGIC without the boot)