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 | |
parent | 4794f6ac4d9bb91b2b7ecf078e1406e6a81aaf12 (diff) |
Output selection: Remove "USB and BT" option (#11940)
Diffstat (limited to 'tmk_core/protocol/lufa')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 21 | ||||
-rw-r--r-- | tmk_core/protocol/lufa/outputselect.h | 14 |
2 files changed, 5 insertions, 30 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index bd9daaac90..f1908b3d07 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) { uint8_t timeout = 255; #ifdef BLUETOOTH_ENABLE - uint8_t where = where_to_send(); - - if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + if (where_to_send() == OUTPUT_BLUETOOTH) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); # elif MODULE_RN42 @@ -686,9 +684,6 @@ static void send_keyboard(report_keyboard_t *report) { serial_send(report->keys[i]); } # endif - } - - if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } #endif @@ -729,9 +724,7 @@ static void send_mouse(report_mouse_t *report) { uint8_t timeout = 255; # ifdef BLUETOOTH_ENABLE - uint8_t where = where_to_send(); - - if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + if (where_to_send() == OUTPUT_BLUETOOTH) { # ifdef MODULE_ADAFRUIT_BLE // FIXME: mouse buttons 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) { serial_send(report->h); // should try sending the wheel h here serial_send(0x00); # endif - } - - if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } # endif @@ -807,9 +797,7 @@ static void send_system(uint16_t data) { static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE # ifdef BLUETOOTH_ENABLE - uint8_t where = where_to_send(); - - if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + if (where_to_send() == OUTPUT_BLUETOOTH) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_consumer_key(data); # elif MODULE_RN42 @@ -823,9 +811,6 @@ static void send_consumer(uint16_t data) { serial_send(bitmap & 0xFF); serial_send((bitmap >> 8) & 0xFF); # endif - } - - if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } # endif diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h index 7f7ed00b95..c4548e1122 100644 --- a/tmk_core/protocol/lufa/outputselect.h +++ b/tmk_core/protocol/lufa/outputselect.h @@ -21,21 +21,11 @@ enum outputs { OUTPUT_NONE, OUTPUT_USB, - OUTPUT_BLUETOOTH, - - // backward compatibility - OUTPUT_USB_AND_BT + OUTPUT_BLUETOOTH }; -/** - * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default - */ #ifndef OUTPUT_DEFAULT -# ifdef BLUETOOTH_ENABLE -# define OUTPUT_DEFAULT OUTPUT_USB_AND_BT -# else -# define OUTPUT_DEFAULT OUTPUT_AUTO -# endif +# define OUTPUT_DEFAULT OUTPUT_AUTO #endif void set_output(uint8_t output); |