1
0
Fork 0

Refactor Bluetooth Handling

Refactored Bluetooth support to make adding new Bluetooth modules
easier in the future.

* Remove `OUT_BLE` key from QMK's keymap. `OUT_BT` is all we need now
as there's no difference anymore.
* Made BLUETOOTH_ENABLE build option legacy as not to break existing
keymaps (Falls back to existing EZ Key support if on)
* Removed `ADAFRUIT_BLE_ENABLE` build option
* Created new build option `BLUETOOTH` with module option (Currently
`AdafruitEZKey` & `AdafruitBLE`)
* Moved all LUFA bluetooth key/mouse events under `BLUETOOTH_ENABLE`
ifdef with selected modules output.
This commit is contained in:
Travis La Marr 2017-03-24 12:53:55 -04:00
parent 7a9437a2e3
commit ddc036b69e
8 changed files with 57 additions and 66 deletions

View file

@ -14,7 +14,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "lufa.h"
#include "outputselect.h"
#ifdef ADAFRUIT_BLE_ENABLE
#ifdef MODULE_ADAFRUIT_BLE
#include "adafruit_ble.h"
#endif
@ -34,9 +34,9 @@ uint8_t auto_detect_output(void) {
return OUTPUT_USB;
}
#ifdef ADAFRUIT_BLE_ENABLE
#ifdef MODULE_ADAFRUIT_BLE
if (adafruit_ble_is_connected()) {
return OUTPUT_ADAFRUIT_BLE;
return OUTPUT_BLUETOOTH;
}
#endif