1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
44
45
46
47
48
49
50
51
52
53
54
55
59
60
61
62
70
71
72
73
74
75
76
77
/* ... */
/* ... */
#ifndef BTSTACK_CONTROL_H
#define BTSTACK_CONTROL_H
#include <stdint.h>
#include "btstack_util.h"
#if defined __cplusplus
extern "C" {
#endif
typedef enum {
POWER_WILL_SLEEP = 1,
POWER_WILL_WAKE_UP
...} POWER_NOTIFICATION_t;
typedef struct {
void (*init) (const void *config);
int (*on) (void);
int (*off) (void);
int (*sleep)(void);
int (*wake) (void);
void (*register_for_power_notifications)(void (*cb)(POWER_NOTIFICATION_t event));
...} btstack_control_t;
#if defined __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif