1 /******************************************************************************
2  *
3  *  Copyright (C) 2009-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  *  Post NCI reset routines
22  *
23  ******************************************************************************/
24 #ifndef NFC_HAL_POST_RESET_H
25 #define NFC_HAL_POST_RESET_H
26 
27 /*****************************************************************************
28 ** Application control block definitions
29 ******************************************************************************/
30 #define NFA_APP_PATCHFILE_MAX_PATH 255
31 
32 typedef struct {
33   uint8_t prm_file[NFA_APP_PATCHFILE_MAX_PATH + 1]; /* Filename of patchram */
34   uint8_t* p_prm_buf; /* Pointer to buffer for holding patchram data */
35 
36   /* Patchfile for I2C fix */
37   uint8_t prm_i2c_patchfile[NFA_APP_PATCHFILE_MAX_PATH + 1];
38   uint8_t* p_prm_i2c_buf;
39 
40   uint8_t userial_baud;
41 
42   tNFC_HAL_DEV_INIT_CFG dev_init_config;
43 
44   /* snooze mode setting */
45   uint8_t snooze_mode;
46   uint8_t idle_threshold_dh;
47   uint8_t idle_threshold_nfcc;
48   uint8_t nfc_wake_active_mode;
49   uint8_t dh_wake_active_mode;
50 
51   /* NVM detection retry (some platforms require re-attempts to detect NVM) */
52   uint8_t spd_nvm_detection_max_count; /* max retry to get NVM type */
53   uint8_t spd_nvm_detection_cur_count; /* current retry count       */
54 
55   /* handling for failure to download patch */
56   bool spd_debug_mode; /* debug mode for downloading patchram, report failure
57                           immediately and obviously */
58   bool spd_skip_on_power_cycle; /* skip downloading patchram after power cycle
59                                    because of patch download failure */
60 } tNFC_POST_RESET_CB;
61 extern tNFC_POST_RESET_CB nfc_post_reset_cb;
62 
63 #endif /* NFC_HAL_POST_RESET_H */
64