Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ble_glue.h « ble_glue « f6 « targets « firmware - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c8cdce6ccfdcf5c25131a11532ea7f8069d8514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once

#include <stdint.h>
#include <stdbool.h>
#include <shci/shci.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();

bool ble_glue_wait_for_fus_start(WirelessFwInfo_t* info);

/** 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