1 /* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _VENDOR_HAL_API_H_ 18 #define _VENDOR_HAL_API_H_ 19 20 #include <aidl/android/hardware/nfc/INfc.h> 21 #include <aidl/android/hardware/nfc/NfcConfig.h> 22 #include <aidl/android/hardware/nfc/NfcEvent.h> 23 #include <aidl/android/hardware/nfc/NfcStatus.h> 24 #include <aidl/android/hardware/nfc/PresenceCheckAlgorithm.h> 25 #include <aidl/android/hardware/nfc/ProtocolDiscoveryConfig.h> 26 #include "hardware_nfc.h" 27 28 using aidl::android::hardware::nfc::NfcConfig; 29 using aidl::android::hardware::nfc::NfcEvent; 30 using aidl::android::hardware::nfc::NfcStatus; 31 using aidl::android::hardware::nfc::PresenceCheckAlgorithm; 32 using aidl::android::hardware::nfc::ProtocolDiscoveryConfig; 33 34 int Cf_hal_open(nfc_stack_callback_t* p_cback, 35 nfc_stack_data_callback_t* p_data_cback); 36 int Cf_hal_write(uint16_t data_len, const uint8_t* p_data); 37 38 int Cf_hal_core_initialized(); 39 40 int Cf_hal_pre_discover(); 41 42 int Cf_hal_close(); 43 44 int Cf_hal_close_off(); 45 46 int Cf_hal_power_cycle(); 47 48 void Cf_hal_factoryReset(); 49 50 void Cf_hal_getConfig(NfcConfig& config); 51 52 void Cf_hal_setVerboseLogging(bool enable); 53 54 bool Cf_hal_getVerboseLogging(); 55 56 #endif /* _VENDOR_HAL_API_H_ */ 57