NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
bta_sys_int.h
1/******************************************************************************
2 *
3 * NOTICE OF CHANGES
4 * 2024/03/26:
5 * - Modify tBTA_SYS_CB structure to match RVL target
6 *
7 * Compile with REVOLUTION defined to include these changes.
8 *
9 ******************************************************************************/
10
11
12
13/******************************************************************************
14 *
15 * Copyright (C) 2003-2012 Broadcom Corporation
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at:
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 ******************************************************************************/
30
31/******************************************************************************
32 *
33 * This is the private interface file for the BTA system manager.
34 *
35 ******************************************************************************/
36#ifndef BTA_SYS_INT_H
37#define BTA_SYS_INT_H
38
39#include "ptim.h"
40
41/*****************************************************************************
42** Constants and data types
43*****************************************************************************/
44
45/*****************************************************************************
46** state table
47*****************************************************************************/
48
49/* SYS HW state */
50enum
51{
52 BTA_SYS_HW_OFF,
53 BTA_SYS_HW_STARTING,
54 BTA_SYS_HW_ON,
55 BTA_SYS_HW_STOPPING
56};
57typedef UINT8 tBTA_SYS_HW_STATE;
58
59/* Collision callback */
60#define MAX_COLLISION_REG 5
61
62typedef struct
63{
64 UINT8 id[MAX_COLLISION_REG];
65 tBTA_SYS_CONN_CBACK *p_coll_cback[MAX_COLLISION_REG];
67
68/* system manager control block */
69typedef struct
70{
71 tBTA_SYS_REG *reg[BTA_ID_MAX]; /* registration structures */
72
73#ifndef REVOLUTION
74 BOOLEAN is_reg[BTA_ID_MAX]; /* registration structures */
75#endif
76
77 tPTIM_CB ptim_cb; /* protocol timer list */
78 BOOLEAN timers_disabled; /* TRUE if sys timers disabled */
79 UINT8 task_id; /* GKI task id */
80
81#ifndef REVOLUTION
82 tBTA_SYS_HW_STATE state;
83 tBTA_SYS_HW_CBACK *sys_hw_cback[BTA_SYS_MAX_HW_MODULES]; /* enable callback for each HW modules */
84 UINT32 sys_hw_module_active; /* bitmask of all active modules */
85 UINT16 sys_features; /* Bitmask of sys features */
86#endif
87
88#ifdef REVOLUTION
89 BOOLEAN events_disabled;
90#endif
91
92 tBTA_SYS_CONN_CBACK *prm_cb; /* role management callback registered by DM */
93 tBTA_SYS_CONN_CBACK *ppm_cb; /* low power management callback registered by DM */
94
95#ifdef REVOLUTION
96 tBTA_SYS_CONN_CBACK *compress_cb;
97#endif
98
99#ifndef REVOLUTION
100 tBTA_SYS_CONN_CBACK *p_policy_cb; /* link policy change callback registered by DM */
101 tBTA_SYS_CONN_CBACK *p_sco_cb; /* SCO connection change callback registered by AV */
102 tBTA_SYS_CONN_CBACK *p_role_cb; /* role change callback registered by AV */
103 tBTA_SYS_COLLISION colli_reg; /* collision handling module */
104#if ( BTM_EIR_SERVER_INCLUDED == TRUE )&&(BTA_EIR_CANNED_UUID_LIST != TRUE)
105 tBTA_SYS_EIR_CBACK *eir_cb; /* add/remove UUID into EIR */
106#endif
107#if (BTM_SSR_INCLUDED == TRUE)
108 tBTA_SYS_SSR_CFG_CBACK *p_ssr_cb;
109#endif
110#endif
112
113
114
115
116/*****************************************************************************
117** Global variables
118*****************************************************************************/
119
120/* system manager control block */
121#if BTA_DYNAMIC_MEMORY == FALSE
122extern tBTA_SYS_CB bta_sys_cb;
123#else
124extern tBTA_SYS_CB *bta_sys_cb_ptr;
125#define bta_sys_cb (*bta_sys_cb_ptr)
126#endif
127
128
129/* system manager configuration structure */
130extern tBTA_SYS_CFG *p_bta_sys_cfg;
131
132
133
134/* functions used for BTA SYS HW state machine */
135void bta_sys_hw_btm_cback( tBTM_DEV_STATUS status );
136void bta_sys_hw_error(tBTA_SYS_HW_MSG *p_sys_hw_msg);
137void bta_sys_hw_api_enable( tBTA_SYS_HW_MSG *p_sys_hw_msg );
138void bta_sys_hw_api_disable(tBTA_SYS_HW_MSG *p_sys_hw_msg);
139void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg);
140void bta_sys_hw_evt_disabled(tBTA_SYS_HW_MSG *p_sys_hw_msg);
141void bta_sys_hw_evt_stack_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg);
142
143BOOLEAN bta_sys_sm_execute(BT_HDR *p_msg);
144
145
146
147
148
149#endif /* BTA_SYS_INT_H */