ble_glue.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdbool.h>
  4. #include <shci/shci.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. typedef void(*BleGlueKeyStorageChangedCallback)(uint8_t* change_addr_start, uint16_t size, void* context);
  9. /** Initialize start core2 and initialize transport */
  10. void ble_glue_init();
  11. /** Start Core2 Radio stack
  12. *
  13. * @return true on success
  14. */
  15. bool ble_glue_start();
  16. /** Is core2 alive and at least FUS is running
  17. *
  18. * @return true if core2 is alive
  19. */
  20. bool ble_glue_is_alive();
  21. bool ble_glue_wait_for_fus_start(WirelessFwInfo_t* info);
  22. /** Is core2 radio stack present and ready
  23. *
  24. * @return true if present and ready
  25. */
  26. bool ble_glue_is_radio_stack_ready();
  27. /** Set callback for NVM in RAM changes
  28. *
  29. * @param[in] callback The callback to call on NVM change
  30. * @param context The context for callback
  31. */
  32. void ble_glue_set_key_storage_changed_callback(BleGlueKeyStorageChangedCallback callback, void* context);
  33. void ble_glue_thread_stop();
  34. #ifdef __cplusplus
  35. }
  36. #endif