[FL-2119] BT HID App (#888)

* view_dispatcher: add default back processing for Long events
* assets: add ble connected and disconnected assets
* bt keyboard: introduce new application
* bt keyboard: add logic to keyboard mode
* bt: remove debug ble hid application
* bt hid: introduce media controller
* gui canvas: rename CanvasFontDirection -> CanvasDirection
* gui canvas: add arrow element
* assets: update finilized assets
* bt hid: finalise keynote GUI
* bt hid: finalise media player GUI
* bt: add media key buttons support
* bt: add exit confirm view
* bt: change Clicker -> Remote
* bt: support f6 target
* bt: hopefully final bt hid design
* bt hid: add blue led notification when device is connected
* bt: leave only bt clicker for now
* bt: add display notification on pin code show event
This commit is contained in:
gornekich
2021-12-15 20:39:06 +03:00
committed by GitHub
parent 63642617ee
commit f0d4584b40
36 changed files with 1319 additions and 579 deletions

View File

@@ -75,7 +75,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification( void *pckt )
}
if(gap->enable_adv) {
// Restart advertising
gap_advertise_start(GapCommandAdvFast);
gap_advertise_start(GapStateAdvFast);
furi_hal_power_insomnia_exit();
}
BleEvent event = {.type = BleEventTypeDisconnected};
@@ -446,7 +446,11 @@ void gap_thread_stop() {
static int32_t gap_app(void *context) {
GapCommand command;
while(1) {
furi_check(osMessageQueueGet(gap->command_queue, &command, NULL, osWaitForever) == osOK);
osStatus status = osMessageQueueGet(gap->command_queue, &command, NULL, osWaitForever);
if(status != osOK) {
FURI_LOG_E(TAG, "Message queue get error: %d", status);
continue;
}
osMutexAcquire(gap->state_mutex, osWaitForever);
if(command == GapCommandKillThread) {
break;

View File

@@ -3,8 +3,8 @@
#include <stdint.h>
#include <stdbool.h>
#define HID_SVC_REPORT_MAP_MAX_LEN (80)
#define HID_SVC_REPORT_MAX_LEN (8)
#define HID_SVC_REPORT_MAP_MAX_LEN (120)
#define HID_SVC_REPORT_MAX_LEN (9)
#define HID_SVC_BOOT_KEYBOARD_INPUT_REPORT_MAX_LEN (8)
#define HID_SVC_REPORT_REF_LEN (2)
#define HID_SVC_INFO_LEN (4)