2021-11-04 17:26:41 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2021-11-13 02:41:54 +00:00
|
|
|
#include <stdbool.h>
|
2021-11-04 17:26:41 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef void(*BleGlueKeyStorageChangedCallback)(uint8_t* change_addr_start, uint16_t size, void* context);
|
|
|
|
|
|
|
|
|
2021-11-13 02:41:54 +00:00
|
|
|
/** Initialize start core2 and initialize transport */
|
2021-11-04 17:26:41 +00:00
|
|
|
void ble_glue_init();
|
|
|
|
|
2021-11-13 02:41:54 +00:00
|
|
|
/** 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
|
|
|
|
*/
|
2021-11-04 17:26:41 +00:00
|
|
|
void ble_glue_set_key_storage_changed_callback(BleGlueKeyStorageChangedCallback callback, void* context);
|
|
|
|
|
2021-12-08 11:28:01 +00:00
|
|
|
void ble_glue_thread_stop();
|
|
|
|
|
2021-11-04 17:26:41 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|