ble_glue.h 915 B

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