forked from forks/qmk_firmware
Output selection: Remove "USB and BT" option (#11940)
This commit is contained in:
parent
4794f6ac4d
commit
7ab9f6a101
|
@ -671,9 +671,7 @@ static void send_keyboard(report_keyboard_t *report) {
|
||||||
uint8_t timeout = 255;
|
uint8_t timeout = 255;
|
||||||
|
|
||||||
#ifdef BLUETOOTH_ENABLE
|
#ifdef BLUETOOTH_ENABLE
|
||||||
uint8_t where = where_to_send();
|
if (where_to_send() == OUTPUT_BLUETOOTH) {
|
||||||
|
|
||||||
if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
|
|
||||||
# ifdef MODULE_ADAFRUIT_BLE
|
# ifdef MODULE_ADAFRUIT_BLE
|
||||||
adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys));
|
adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys));
|
||||||
# elif MODULE_RN42
|
# elif MODULE_RN42
|
||||||
|
@ -686,9 +684,6 @@ static void send_keyboard(report_keyboard_t *report) {
|
||||||
serial_send(report->keys[i]);
|
serial_send(report->keys[i]);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
|
||||||
|
|
||||||
if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -729,9 +724,7 @@ static void send_mouse(report_mouse_t *report) {
|
||||||
uint8_t timeout = 255;
|
uint8_t timeout = 255;
|
||||||
|
|
||||||
# ifdef BLUETOOTH_ENABLE
|
# ifdef BLUETOOTH_ENABLE
|
||||||
uint8_t where = where_to_send();
|
if (where_to_send() == OUTPUT_BLUETOOTH) {
|
||||||
|
|
||||||
if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
|
|
||||||
# ifdef MODULE_ADAFRUIT_BLE
|
# ifdef MODULE_ADAFRUIT_BLE
|
||||||
// FIXME: mouse buttons
|
// FIXME: mouse buttons
|
||||||
adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->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(report->h); // should try sending the wheel h here
|
||||||
serial_send(0x00);
|
serial_send(0x00);
|
||||||
# endif
|
# endif
|
||||||
}
|
|
||||||
|
|
||||||
if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
@ -807,9 +797,7 @@ static void send_system(uint16_t data) {
|
||||||
static void send_consumer(uint16_t data) {
|
static void send_consumer(uint16_t data) {
|
||||||
#ifdef EXTRAKEY_ENABLE
|
#ifdef EXTRAKEY_ENABLE
|
||||||
# ifdef BLUETOOTH_ENABLE
|
# ifdef BLUETOOTH_ENABLE
|
||||||
uint8_t where = where_to_send();
|
if (where_to_send() == OUTPUT_BLUETOOTH) {
|
||||||
|
|
||||||
if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
|
|
||||||
# ifdef MODULE_ADAFRUIT_BLE
|
# ifdef MODULE_ADAFRUIT_BLE
|
||||||
adafruit_ble_send_consumer_key(data);
|
adafruit_ble_send_consumer_key(data);
|
||||||
# elif MODULE_RN42
|
# elif MODULE_RN42
|
||||||
|
@ -823,9 +811,6 @@ static void send_consumer(uint16_t data) {
|
||||||
serial_send(bitmap & 0xFF);
|
serial_send(bitmap & 0xFF);
|
||||||
serial_send((bitmap >> 8) & 0xFF);
|
serial_send((bitmap >> 8) & 0xFF);
|
||||||
# endif
|
# endif
|
||||||
}
|
|
||||||
|
|
||||||
if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -21,21 +21,11 @@ enum outputs {
|
||||||
|
|
||||||
OUTPUT_NONE,
|
OUTPUT_NONE,
|
||||||
OUTPUT_USB,
|
OUTPUT_USB,
|
||||||
OUTPUT_BLUETOOTH,
|
OUTPUT_BLUETOOTH
|
||||||
|
|
||||||
// backward compatibility
|
|
||||||
OUTPUT_USB_AND_BT
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default
|
|
||||||
*/
|
|
||||||
#ifndef OUTPUT_DEFAULT
|
#ifndef OUTPUT_DEFAULT
|
||||||
# ifdef BLUETOOTH_ENABLE
|
# define OUTPUT_DEFAULT OUTPUT_AUTO
|
||||||
# define OUTPUT_DEFAULT OUTPUT_USB_AND_BT
|
|
||||||
# else
|
|
||||||
# define OUTPUT_DEFAULT OUTPUT_AUTO
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void set_output(uint8_t output);
|
void set_output(uint8_t output);
|
||||||
|
|
Loading…
Reference in a new issue