Flipper Zero Firmware
Loading...
Searching...
No Matches
profile_interface.h
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5#include <gap.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
12
13/* Actual profiles must inherit (include this structure) as their first field */
14typedef struct {
15 /* Pointer to the config for this profile. Must be used to check if the
16 * instance belongs to the profile */
17 const FuriHalBleProfileTemplate* config;
19
20typedef void* FuriHalBleProfileParams;
21
22typedef FuriHalBleProfileBase* (*FuriHalBleProfileStart)(FuriHalBleProfileParams profile_params);
23typedef void (*FuriHalBleProfileStop)(FuriHalBleProfileBase* profile);
24typedef void (*FuriHalBleProfileGetGapConfig)(
25 GapConfig* target_config,
26 FuriHalBleProfileParams profile_params);
27
29 /* Returns an instance of the profile */
30 FuriHalBleProfileStart start;
31 /* Destroys the instance of the profile. Must check if instance belongs to the profile */
32 FuriHalBleProfileStop stop;
33 /* Called before starting the profile to get the GAP configuration */
34 FuriHalBleProfileGetGapConfig get_gap_config;
35};
36
37#ifdef __cplusplus
38}
39#endif
Definition profile_interface.h:14
Definition profile_interface.h:28
Definition gap.h:70