70a9823e05
* bt: don't stop shci on wrong stack. Start radios stack if FUS is running * bt: code clean up, f6 target sync Co-authored-by: あく <alleteam@gmail.com>
58 lines
1.2 KiB
C
58 lines
1.2 KiB
C
#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);
|
|
|
|
/** Stop SHCI thread */
|
|
void ble_glue_thread_stop();
|
|
|
|
/** Restart MCU to launch radio stack firmware if necessary
|
|
*
|
|
* @return true on radio stack start command
|
|
*/
|
|
bool ble_glue_radio_stack_fw_launch_started();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|