blob: ac54453b52b196f692848244609000093da54770 (
plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
/*****************************************************************************
**
** Name: bta_sys_int.h
**
** Description: This is the private interface file for the BTA system
** manager.
**
** Copyright (c) 2003-2010, Broadcom Corp., All Rights Reserved.
** Broadcom Bluetooth Core. Proprietary and confidential.
**
*****************************************************************************/
#ifndef BTA_SYS_INT_H
#define BTA_SYS_INT_H
#include "ptim.h"
/*****************************************************************************
** Constants and data types
*****************************************************************************/
/*****************************************************************************
** state table
*****************************************************************************/
/* SYS HW state */
enum
{
BTA_SYS_HW_OFF,
BTA_SYS_HW_STARTING,
BTA_SYS_HW_ON,
BTA_SYS_HW_STOPPING
};
typedef UINT8 tBTA_SYS_HW_STATE;
/* Collision callback */
#define MAX_COLLISION_REG 5
typedef struct
{
UINT8 id[MAX_COLLISION_REG];
tBTA_SYS_CONN_CBACK *p_coll_cback[MAX_COLLISION_REG];
} tBTA_SYS_COLLISION;
/* system manager control block */
typedef struct
{
tBTA_SYS_REG *reg[BTA_ID_MAX]; /* registration structures */
BOOLEAN is_reg[BTA_ID_MAX]; /* registration structures */
tPTIM_CB ptim_cb; /* protocol timer list */
BOOLEAN timers_disabled; /* TRUE if sys timers disabled */
UINT8 task_id; /* GKI task id */
tBTA_SYS_HW_STATE state;
tBTA_SYS_HW_CBACK *sys_hw_cback[BTA_SYS_MAX_HW_MODULES]; /* enable callback for each HW modules */
UINT32 sys_hw_module_active; /* bitmask of all active modules */
UINT16 sys_features; /* Bitmask of sys features */
tBTA_SYS_CONN_CBACK *prm_cb; /* role management callback registered by DM */
tBTA_SYS_CONN_CBACK *ppm_cb; /* low power management callback registered by DM */
tBTA_SYS_CONN_CBACK *p_policy_cb; /* link policy change callback registered by DM */
tBTA_SYS_CONN_CBACK *p_sco_cb; /* SCO connection change callback registered by AV */
tBTA_SYS_CONN_CBACK *p_role_cb; /* role change callback registered by AV */
tBTA_SYS_COLLISION colli_reg; /* collision handling module */
#if ( BTM_EIR_SERVER_INCLUDED == TRUE )&&(BTA_EIR_CANNED_UUID_LIST != TRUE)
tBTA_SYS_EIR_CBACK *eir_cb; /* add/remove UUID into EIR */
#endif
#if (BTM_SSR_INCLUDED == TRUE)
tBTA_SYS_SSR_CFG_CBACK *p_ssr_cb;
#endif
} tBTA_SYS_CB;
/*****************************************************************************
** Global variables
*****************************************************************************/
/* system manager control block */
#if BTA_DYNAMIC_MEMORY == FALSE
extern tBTA_SYS_CB bta_sys_cb;
#else
extern tBTA_SYS_CB *bta_sys_cb_ptr;
#define bta_sys_cb (*bta_sys_cb_ptr)
#endif
/* system manager configuration structure */
extern tBTA_SYS_CFG *p_bta_sys_cfg;
/* functions used for BTA SYS HW state machine */
void bta_sys_hw_btm_cback( tBTM_DEV_STATUS status );
void bta_sys_hw_error(tBTA_SYS_HW_MSG *p_sys_hw_msg);
void bta_sys_hw_api_enable( tBTA_SYS_HW_MSG *p_sys_hw_msg );
void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg);
void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg);
void bta_sys_hw_evt_disabled(tBTA_SYS_HW_MSG *p_sys_hw_msg);
void bta_sys_hw_evt_stack_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg);
BOOLEAN bta_sys_sm_execute(BT_HDR *p_msg);
#endif /* BTA_SYS_INT_H */
|