]> granicus.if.org Git - esp-idf/blob - examples/08_bt_sdp/components/bluedroid_demos/include/bt_app_common.h
component/bt: legacy bt API provide
[esp-idf] / examples / 08_bt_sdp / components / bluedroid_demos / include / bt_app_common.h
1 #ifndef __BT_APP_COMMON_H__
2 #define __BT_APP_COMMON_H__
3
4 #include <stdint.h>
5 #include "osi.h"
6 #include "bt_common_types.h"
7 #include "bt_defs.h"
8     
9 /* BT APP Events */
10 #define BT_EVT_APP                     (0xB000)
11 #define BT_EVT_APP_CONTEXT_SWITCH      (0x0001 | BT_EVT_APP)
12
13 typedef void (tBTAPP_CBACK) (uint16_t event, char *p_param);
14 typedef void (tBTAPP_COPY_CBACK) (uint16_t event, char *p_dest, char *p_src);
15
16 typedef struct
17 {
18     BT_HDR               hdr;
19     tBTAPP_CBACK*       p_cb;    /* context switch callback */
20
21     /* parameters passed to callback */
22     UINT16               event;   /* message event id */
23     char                 p_param[0]; /* parameter area needs to be last */
24 } tBTAPP_CONTEXT_SWITCH_CBACK;
25
26 bt_status_t bt_app_transfer_context (tBTAPP_CBACK *p_cback, UINT16 event, char* p_params, int param_len, tBTAPP_COPY_CBACK *p_copy_cback);
27
28 void bt_app_task_start_up(void);
29
30 #endif /* __BT_APP_COMMON_H__ */