ble_glue.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 (
  9. *BleGlueKeyStorageChangedCallback)(uint8_t* change_addr_start, uint16_t size, void* context);
  10. /** Initialize start core2 and initialize transport */
  11. void ble_glue_init();
  12. /** Start Core2 Radio stack
  13. *
  14. * @return true on success
  15. */
  16. bool ble_glue_start();
  17. /** Is core2 alive and at least FUS is running
  18. *
  19. * @return true if core2 is alive
  20. */
  21. bool ble_glue_is_alive();
  22. bool ble_glue_wait_for_fus_start(WirelessFwInfo_t* info);
  23. /** Is core2 radio stack present and ready
  24. *
  25. * @return true if present and ready
  26. */
  27. bool ble_glue_is_radio_stack_ready();
  28. /** Set callback for NVM in RAM changes
  29. *
  30. * @param[in] callback The callback to call on NVM change
  31. * @param context The context for callback
  32. */
  33. void ble_glue_set_key_storage_changed_callback(
  34. BleGlueKeyStorageChangedCallback callback,
  35. void* context);
  36. void ble_glue_thread_stop();
  37. #ifdef __cplusplus
  38. }
  39. #endif