seos_profile.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include <furi_ble/profile_interface.h>
  3. #include "seos_common.h"
  4. #include "seos_service.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #define BLE_PROFILE_SEOS_PACKET_SIZE_MAX BLE_SVC_SEOS_DATA_LEN_MAX
  9. typedef struct ble_profile_params {
  10. FlowMode mode;
  11. } BleProfileParams;
  12. /** Seos service callback type */
  13. typedef SeosServiceEventCallback FuriHalBtSeosCallback;
  14. /** Seos profile descriptor */
  15. extern const FuriHalBleProfileTemplate* ble_profile_seos;
  16. /** Send data through BLE
  17. *
  18. * @param profile Profile instance
  19. * @param data data buffer
  20. * @param size data buffer size
  21. *
  22. * @return true on success
  23. */
  24. bool ble_profile_seos_tx(FuriHalBleProfileBase* profile, uint8_t* data, uint16_t size);
  25. /** Set Seos service events callback
  26. *
  27. * @param profile Profile instance
  28. * @param buffer_size Applicaition buffer size
  29. * @param calback FuriHalBtSeosCallback instance
  30. * @param context pointer to context
  31. */
  32. void ble_profile_seos_set_event_callback(
  33. FuriHalBleProfileBase* profile,
  34. uint16_t buff_size,
  35. FuriHalBtSeosCallback callback,
  36. void* context);
  37. #ifdef __cplusplus
  38. }
  39. #endif