1 /******************************************************************************
2  *
3  *  Copyright (C) 2010-2014 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 /* nfa_sys flags */
34 #define NFA_SYS_FL_INITIALIZED 0x00000001 /* nfa_sys initialized */
35 
36 /*****************************************************************************
37 **  state table
38 *****************************************************************************/
39 
40 /* system manager control block */
41 typedef struct {
42   uint32_t flags; /* nfa_sys flags (must be first element of structure) */
43   tNFA_SYS_REG* reg[NFA_ID_MAX]; /* registration structures */
44   bool is_reg[NFA_ID_MAX];       /* registration structures */
45   tPTIM_CB ptim_cb;              /* protocol timer list */
46   tNFA_SYS_ENABLE_CBACK* p_enable_cback;
47   uint16_t enable_cplt_flags;
48   uint16_t enable_cplt_mask;
49 
50   tNFA_SYS_PROC_NFCC_PWR_MODE_CMPL* p_proc_nfcc_pwr_mode_cmpl_cback;
51   uint16_t proc_nfcc_pwr_mode_cplt_flags;
52   uint16_t proc_nfcc_pwr_mode_cplt_mask;
53 
54   bool graceful_disable; /* TRUE if NFA_Disable () is called with TRUE */
55   bool timers_disabled;  /* TRUE if sys timers disabled */
56   uint8_t trace_level;   /* Trace level */
57 } tNFA_SYS_CB;
58 
59 /*****************************************************************************
60 **  Global variables
61 *****************************************************************************/
62 
63 /* system manager control block */
64 extern tNFA_SYS_CB nfa_sys_cb;
65 
66 /* system manager configuration structure */
67 extern tNFA_SYS_CFG* p_nfa_sys_cfg;
68 
69 bool nfa_sys_sm_execute(NFC_HDR* p_msg);
70 
71 #endif /* NFA_SYS_INT_H */
72