7170864fe4
* ble: prototype ble hid * ble: add HID service and characteristics * debug tools: add ble keyboard app * ble: change appearance * ble: working keyboard * bt: introduce furi-hal-bt-hid * bt: restart hid service on each keyboard app enter * bt: introduce switch profile * bt: add profile to ble glue * bt: working profile switch * bt: introduce bt serial profile, rework API * bt: rewotk HID profile * bt: rework gap with profile configuration * bt: move change profile routine to furi hal bt * bt: change switch profile API to blocking * bt: move battery update to furi hal bt * bt: cleanup * bt: add support for f6 target * bt: update documentation * bt: clean up code * bt: remove NO OUTPUT setting * bt: set numeric comparison pairing in BLE HID * bt: support f6 target * bt: set mac address in profile configuration * bt: set advertise name in profile config * bt: rework with furi thread * bt: support f6 target * bt: clear hci command buffer on core2 restart * bt: correct thread kill sequence * bt: fix freertos functions calls * bt: add some enterprise delays fo correct memory free * bt: code cleanup * bt: change terminate -> stop * bt: fix memory leakage Co-authored-by: あく <alleteam@gmail.com>
46 lines
945 B
C
46 lines
945 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void(*BleGlueKeyStorageChangedCallback)(uint8_t* change_addr_start, uint16_t size, void* context);
|
|
|
|
|
|
/** Initialize start core2 and initialize transport */
|
|
void ble_glue_init();
|
|
|
|
/** Start Core2 Radio stack
|
|
*
|
|
* @return true on success
|
|
*/
|
|
bool ble_glue_start();
|
|
|
|
/** Is core2 alive and at least FUS is running
|
|
*
|
|
* @return true if core2 is alive
|
|
*/
|
|
bool ble_glue_is_alive();
|
|
|
|
/** Is core2 radio stack present and ready
|
|
*
|
|
* @return true if present and ready
|
|
*/
|
|
bool ble_glue_is_radio_stack_ready();
|
|
|
|
/** Set callback for NVM in RAM changes
|
|
*
|
|
* @param[in] callback The callback to call on NVM change
|
|
* @param context The context for callback
|
|
*/
|
|
void ble_glue_set_key_storage_changed_callback(BleGlueKeyStorageChangedCallback callback, void* context);
|
|
|
|
void ble_glue_thread_stop();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|