diff options
author | Ryan <fauxpark@gmail.com> | 2021-02-20 18:11:02 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-20 18:11:02 +1100 |
commit | 7ab9f6a1010108c329f6880fe08716dd06a90daf (patch) | |
tree | 353aad3c8803db05d4cf9e191816dc3e8adcd995 /tmk_core/protocol/lufa/lufa.c | |
parent | 4794f6ac4d9bb91b2b7ecf078e1406e6a81aaf12 (diff) | |
download | qmk_firmware-7ab9f6a1010108c329f6880fe08716dd06a90daf.tar.gz qmk_firmware-7ab9f6a1010108c329f6880fe08716dd06a90daf.zip |
Output selection: Remove "USB and BT" option (#11940)
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.c')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index bd9daaac9..f1908b3d0 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
@@ -671,9 +671,7 @@ static void send_keyboard(report_keyboard_t *report) { | |||
671 | uint8_t timeout = 255; | 671 | uint8_t timeout = 255; |
672 | 672 | ||
673 | #ifdef BLUETOOTH_ENABLE | 673 | #ifdef BLUETOOTH_ENABLE |
674 | uint8_t where = where_to_send(); | 674 | if (where_to_send() == OUTPUT_BLUETOOTH) { |
675 | |||
676 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { | ||
677 | # ifdef MODULE_ADAFRUIT_BLE | 675 | # ifdef MODULE_ADAFRUIT_BLE |
678 | adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); | 676 | adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); |
679 | # elif MODULE_RN42 | 677 | # elif MODULE_RN42 |
@@ -686,9 +684,6 @@ static void send_keyboard(report_keyboard_t *report) { | |||
686 | serial_send(report->keys[i]); | 684 | serial_send(report->keys[i]); |
687 | } | 685 | } |
688 | # endif | 686 | # endif |
689 | } | ||
690 | |||
691 | if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { | ||
692 | return; | 687 | return; |
693 | } | 688 | } |
694 | #endif | 689 | #endif |
@@ -729,9 +724,7 @@ static void send_mouse(report_mouse_t *report) { | |||
729 | uint8_t timeout = 255; | 724 | uint8_t timeout = 255; |
730 | 725 | ||
731 | # ifdef BLUETOOTH_ENABLE | 726 | # ifdef BLUETOOTH_ENABLE |
732 | uint8_t where = where_to_send(); | 727 | if (where_to_send() == OUTPUT_BLUETOOTH) { |
733 | |||
734 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { | ||
735 | # ifdef MODULE_ADAFRUIT_BLE | 728 | # ifdef MODULE_ADAFRUIT_BLE |
736 | // FIXME: mouse buttons | 729 | // FIXME: mouse buttons |
737 | adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); | 730 | adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); |
@@ -746,9 +739,6 @@ static void send_mouse(report_mouse_t *report) { | |||
746 | serial_send(report->h); // should try sending the wheel h here | 739 | serial_send(report->h); // should try sending the wheel h here |
747 | serial_send(0x00); | 740 | serial_send(0x00); |
748 | # endif | 741 | # endif |
749 | } | ||
750 | |||
751 | if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { | ||
752 | return; | 742 | return; |
753 | } | 743 | } |
754 | # endif | 744 | # endif |
@@ -807,9 +797,7 @@ static void send_system(uint16_t data) { | |||
807 | static void send_consumer(uint16_t data) { | 797 | static void send_consumer(uint16_t data) { |
808 | #ifdef EXTRAKEY_ENABLE | 798 | #ifdef EXTRAKEY_ENABLE |
809 | # ifdef BLUETOOTH_ENABLE | 799 | # ifdef BLUETOOTH_ENABLE |
810 | uint8_t where = where_to_send(); | 800 | if (where_to_send() == OUTPUT_BLUETOOTH) { |
811 | |||
812 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { | ||
813 | # ifdef MODULE_ADAFRUIT_BLE | 801 | # ifdef MODULE_ADAFRUIT_BLE |
814 | adafruit_ble_send_consumer_key(data); | 802 | adafruit_ble_send_consumer_key(data); |
815 | # elif MODULE_RN42 | 803 | # elif MODULE_RN42 |
@@ -823,9 +811,6 @@ static void send_consumer(uint16_t data) { | |||
823 | serial_send(bitmap & 0xFF); | 811 | serial_send(bitmap & 0xFF); |
824 | serial_send((bitmap >> 8) & 0xFF); | 812 | serial_send((bitmap >> 8) & 0xFF); |
825 | # endif | 813 | # endif |
826 | } | ||
827 | |||
828 | if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { | ||
829 | return; | 814 | return; |
830 | } | 815 | } |
831 | # endif | 816 | # endif |