nfa_sys_int.h revision e9df6ba5a8fcccf306a80b1670b423be8fe7746a
1/******************************************************************************
2 *
3 *  Copyright (C) 2010-2012 Broadcom Corporation
4 *
5 *  Licensed under the Apache License, Version 2.0 (the "License");
6 *  you may not use this file except in compliance with the License.
7 *  You may obtain a copy of the License at:
8 *
9 *  http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 *
17 ******************************************************************************/
18
19/******************************************************************************
20 *
21 *  This is the private interface file for the NFA system manager.
22 *
23 ******************************************************************************/
24#ifndef NFA_SYS_INT_H
25#define NFA_SYS_INT_H
26
27#include "nfa_sys_ptim.h"
28
29/*****************************************************************************
30**  Constants and data types
31*****************************************************************************/
32
33
34/* nfa_sys flags */
35#define NFA_SYS_FL_INITIALIZED  0x00000001          /* nfa_sys initialized */
36
37/*****************************************************************************
38**  state table
39*****************************************************************************/
40
41/* system manager control block */
42typedef struct
43{
44    UINT32                  flags;                  /* nfa_sys flags (must be first element of structure) */
45    tNFA_SYS_REG            *reg[NFA_ID_MAX];       /* registration structures */
46    BOOLEAN                 is_reg[NFA_ID_MAX];     /* registration structures */
47    tPTIM_CB                ptim_cb;                /* protocol timer list */
48    tNFA_SYS_ENABLE_CBACK   *p_enable_cback;
49    UINT16                  enable_cplt_flags;
50    UINT16                  enable_cplt_mask;
51
52    tNFA_SYS_PROC_NFCC_PWR_MODE_CMPL  *p_proc_nfcc_pwr_mode_cmpl_cback;
53    UINT16                  proc_nfcc_pwr_mode_cplt_flags;
54    UINT16                  proc_nfcc_pwr_mode_cplt_mask;
55
56    BOOLEAN                 graceful_disable;       /* TRUE if NFA_Disable () is called with TRUE */
57    BOOLEAN                 timers_disabled;        /* TRUE if sys timers disabled */
58    UINT8                   trace_level;            /* Trace level */
59} tNFA_SYS_CB;
60
61
62
63/*****************************************************************************
64**  Global variables
65*****************************************************************************/
66
67/* system manager control block */
68#if NFA_DYNAMIC_MEMORY == FALSE
69extern tNFA_SYS_CB nfa_sys_cb;
70#else
71extern tNFA_SYS_CB *nfa_sys_cb_ptr;
72#define nfa_sys_cb (*nfa_sys_cb_ptr)
73#endif
74
75
76/* system manager configuration structure */
77extern tNFA_SYS_CFG *p_nfa_sys_cfg;
78
79BOOLEAN nfa_sys_sm_execute (BT_HDR *p_msg);
80
81#endif /* NFA_SYS_INT_H */
82