1 /******************************************************************************
2  *
3  *  Copyright (C) 2018 ST Microelectronics S.A.
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 #ifndef _STNFC_HAL_API_H_
21 #define _STNFC_HAL_API_H_
22 
23 #include <android/hardware/nfc/1.1/INfc.h>
24 #include <android/hardware/nfc/1.1/types.h>
25 #include <hardware/nfc.h>
26 
27 using ::android::hardware::nfc::V1_1::NfcConfig;
28 
29 #define NFC_MODE_OFF 0
30 #define NFC_MODE_QuickBoot 2
31 
32 
33 int StNfc_hal_open(nfc_stack_callback_t* p_cback,
34                    nfc_stack_data_callback_t* p_data_cback);
35 int StNfc_hal_write(uint16_t data_len, const uint8_t* p_data);
36 int StNfc_hal_core_initialized(uint8_t* p_core_init_rsp_params);
37 
38 int StNfc_hal_pre_discover();
39 
40 int StNfc_hal_close(int nfc_mode);
41 
42 int StNfc_hal_control_granted();
43 
44 int StNfc_hal_power_cycle();
45 
46 void StNfc_hal_factoryReset();
47 
48 int StNfc_hal_closeForPowerOffCase();
49 
50 void StNfc_hal_getConfig(NfcConfig& config);
51 
52 #endif /* _STNFC_HAL_API_H_ */
53