1 /*
2  * Copyright (C) 2012-2020 NXP
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 /*
18  * phNxpNciHal_nciParser.h
19  */
20 
21 #ifndef _PHNXPNCIHAL_NCIPARSER_H_
22 #define _PHNXPNCIHAL_NCIPARSER_H_
23 
24 #define NXP_NCI_PARSER_PATH "/vendor/lib64/nxp_nci_parser.so"
25 
26 /*******************Lx_DEBUG_CFG*******************/
27 #define LX_DEBUG_CFG_DISABLE 0x00
28 #define LX_DEBUG_CFG_ENABLE_L2_EVENT 0x01
29 #define LX_DEBUG_CFG_ENABLE_FELICA_RF 0x02
30 #define LX_DEBUG_CFG_ENABLE_FELICA_SYSCODE 0x04
31 #define LX_DEBUG_CFG_ENABLE_L2_EVENT_READER 0x08
32 #define LX_DEBUG_CFG_ENABLE_L1_EVENT 0x10
33 #define LX_DEBUG_CFG_ENABLE_MOD_DETECTED_EVENT 0x20
34 #define LX_DEBUG_CFG_MASK_RFU 0xFFC0
35 #define LX_DEBUG_CFG_MASK 0x00FF
36 
37 typedef void* (*tHAL_API_NATIVE_CREATE_PARSER)();
38 typedef void (*tHAL_API_NATIVE_DESTROY_PARSER)(void*);
39 typedef void (*tHAL_API_NATIVE_INIT_PARSER)(void*);
40 typedef void (*tHAL_API_NATIVE_DEINIT_PARSER)(void*);
41 typedef void (*tHAL_API_NATIVE_PARSE_PACKET)(void*, unsigned char*,
42                                              unsigned short);
43 
44 typedef struct {
45   tHAL_API_NATIVE_CREATE_PARSER createParser;
46   tHAL_API_NATIVE_DESTROY_PARSER destroyParser;
47   tHAL_API_NATIVE_INIT_PARSER initParser;
48   tHAL_API_NATIVE_DEINIT_PARSER deinitParser;
49   tHAL_API_NATIVE_PARSE_PACKET parsePacket;
50 } tNCI_PARSER_FUNCTIONS;
51 
52 unsigned char phNxpNciHal_initParser();
53 void phNxpNciHal_parsePacket(unsigned char*, unsigned short);
54 void phNxpNciHal_deinitParser();
55 
56 #endif /* _PHNXPNCIHAL_NCIPARSER_H_ */
57