BSB Developer Docs
Loading...
Searching...
No Matches
ble_model.h
1#pragma once
2
3#include <furi.h>
4#include <ble/ble.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef enum {
11 BleModelStateEventBleChanged,
12 BleModelStateEventNameChanged,
13 BleModelStateEventPairingTimeout,
14
15 BleModelStateEventCount,
16} BleModelStateEvent;
17
18typedef void (*BleModelStateCallback)(BleModelStateEvent event, void* context);
19
20typedef struct BleModel BleModel;
21
22BleModel* ble_model_alloc(void);
23
24void ble_model_free(BleModel* model);
25
26bool ble_model_ready(BleModel* model);
27
28void ble_model_get_state(BleModel* model, BleState* output);
29
30void ble_model_get_name(BleModel* model, FuriString* name);
31
32bool ble_model_is_device_paired(BleModel* model);
33
34void ble_model_set_state_callback(BleModel* model, BleModelStateCallback callback, void* context);
35
36void ble_model_start(BleModel* model);
37
38void ble_model_stop(BleModel* model);
39
40void ble_model_forget(BleModel* model);
41
42#ifdef __cplusplus
43}
44#endif
Public ble api.
Definition ble_model.c:9
Depicts current ble state.
Definition ble.h:48