• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include <android-base/properties.h>
18 #include <dlfcn.h>
19 #include <errno.h>
20 #include <string.h>
21 
22 #include "Vendor_hal_api.h"
23 
24 bool logging = false;
25 
Vendor_hal_open(nfc_stack_callback_t * p_cback,nfc_stack_data_callback_t * p_data_cback)26 int Vendor_hal_open(nfc_stack_callback_t* p_cback, nfc_stack_data_callback_t* p_data_cback) {
27     (void)p_cback;
28     (void)p_data_cback;
29     // nothing to open in this example
30     return -1;
31 }
32 
Vendor_hal_write(uint16_t data_len,const uint8_t * p_data)33 int Vendor_hal_write(uint16_t data_len, const uint8_t* p_data) {
34     (void)data_len;
35     (void)p_data;
36     return -1;
37 }
38 
Vendor_hal_core_initialized()39 int Vendor_hal_core_initialized() {
40     return -1;
41 }
42 
Vendor_hal_pre_discover()43 int Vendor_hal_pre_discover() {
44     return -1;
45 }
46 
Vendor_hal_close()47 int Vendor_hal_close() {
48     return -1;
49 }
50 
Vendor_hal_close_off()51 int Vendor_hal_close_off() {
52     return -1;
53 }
54 
Vendor_hal_power_cycle()55 int Vendor_hal_power_cycle() {
56     return -1;
57 }
58 
Vendor_hal_factoryReset()59 void Vendor_hal_factoryReset() {}
60 
Vendor_hal_getConfig(NfcConfig & config)61 void Vendor_hal_getConfig(NfcConfig& config) {
62     (void)config;
63 }
64 
Vendor_hal_setVerboseLogging(bool enable)65 void Vendor_hal_setVerboseLogging(bool enable) {
66     logging = enable;
67 }
68 
Vendor_hal_getVerboseLogging()69 bool Vendor_hal_getVerboseLogging() {
70     return logging;
71 }
72