Add Bluetooth HID remote control support
Integrate BLE keyboard host functionality for page-turner remotes. Adds device pairing, button mapping, preset configurations for Free2/Free3 remotes, and persistent storage of mappings. Migrates from open-x4-sdk to freeink-sdk submodule which includes the BleKeyboardHost library. Implements CPU frequency locking during BLE operations to prevent watchdog timeouts.
This commit is contained in:
+19
-4
@@ -38,6 +38,16 @@ build_flags =
|
||||
-Wno-bidi-chars
|
||||
-Wl,--wrap=panic_print_backtrace,--wrap=panic_abort,--wrap=bootloader_common_check_efuse_blk_validity
|
||||
-fno-exceptions
|
||||
# FreeInk panel profiles: compile both X3 (792x528/UC8253) and X4 (800x480/SSD1677);
|
||||
# the firmware picks the active one at runtime via HalDisplay setDisplayX3().
|
||||
-DFREEINK_DEVICE_X3=1
|
||||
-DFREEINK_DEVICE_X4=1
|
||||
# BLE HID page-turner host (BleKeyboardHost). NimBLE role/bond config is baked into
|
||||
# the prebuilt arduino-esp32 framework's sdkconfig.h, so we don't redefine it here
|
||||
# (doing so only warns and has no effect). The host only compiles when
|
||||
# FREEINK_CAP_BLE_HID_HOST is set on the env (below); with the capability off,
|
||||
# BleKeyboardHost links stubs and pulls in zero NimBLE code.
|
||||
-DFREEINK_BLE_HID_SHOW_UNNAMED_DEVICES=0
|
||||
|
||||
build_unflags =
|
||||
-std=gnu++11
|
||||
@@ -57,10 +67,12 @@ extra_scripts =
|
||||
|
||||
; Libraries
|
||||
lib_deps =
|
||||
BatteryMonitor=symlink://open-x4-sdk/libs/hardware/BatteryMonitor
|
||||
InputManager=symlink://open-x4-sdk/libs/hardware/InputManager
|
||||
EInkDisplay=symlink://open-x4-sdk/libs/display/EInkDisplay
|
||||
SDCardManager=symlink://open-x4-sdk/libs/hardware/SDCardManager
|
||||
BatteryMonitor=symlink://freeink-sdk/libs/hardware/BatteryMonitor
|
||||
InputManager=symlink://freeink-sdk/libs/hardware/InputManager
|
||||
EInkDisplay=symlink://freeink-sdk/libs/display/FreeInkDisplay
|
||||
SDCardManager=symlink://freeink-sdk/libs/hardware/SDCardManager
|
||||
BleKeyboardHost=symlink://freeink-sdk/libs/network/BleKeyboardHost
|
||||
h2zero/NimBLE-Arduino @ ^2.3.8
|
||||
bblanchon/ArduinoJson @ 7.4.2
|
||||
ricmoo/QRCode @ 0.0.1
|
||||
bitbank2/PNGdec @ 1.1.6
|
||||
@@ -74,6 +86,7 @@ build_flags =
|
||||
; CROSSPOINT_VERSION is set by scripts/git_branch.py (includes branch + short SHA)
|
||||
-DENABLE_SERIAL_LOG
|
||||
-DLOG_LEVEL=2 ; Set log level to debug for development builds
|
||||
-DFREEINK_CAP_BLE_HID_HOST=1 ; BLE HID page-turner host (NimBLE)
|
||||
|
||||
|
||||
[env:gh_release]
|
||||
@@ -83,6 +96,7 @@ build_flags =
|
||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}\"
|
||||
-DENABLE_SERIAL_LOG
|
||||
-DLOG_LEVEL=1 ; Set log level to info for release builds
|
||||
-DFREEINK_CAP_BLE_HID_HOST=1 ; BLE HID page-turner host (NimBLE)
|
||||
|
||||
[env:gh_release_rc]
|
||||
extends = base
|
||||
@@ -91,6 +105,7 @@ build_flags =
|
||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}-rc+${sysenv.CROSSPOINT_RC_HASH}\"
|
||||
-DENABLE_SERIAL_LOG
|
||||
-DLOG_LEVEL=1 ; Set log level to info for release candidate builds
|
||||
-DFREEINK_CAP_BLE_HID_HOST=1 ; BLE HID page-turner host (NimBLE)
|
||||
|
||||
[env:slim]
|
||||
extends = base
|
||||
|
||||
Reference in New Issue
Block a user