1 /******************************************************************************
2  *
3  *  Copyright 2015-2018,2020 NXP
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 #ifndef __CAP_H__
19 #define __CAP_H__
20 #include "Nxp_Features.h"
21 #define pConfigFL (capability::getInstance())
22 
23 class capability {
24  private:
25   static capability* instance;
26   const uint16_t offsetHwVersion = 24;
27   const uint16_t offsetFwRomCodeVersion = 4;
28   const uint16_t offsetFwMajorVersion = 7;
29   /*product[] will be used to print product version and
30   should be kept in accordance with tNFC_chipType*/
31   const char* product[13] = {"UNKNOWN", "PN547C2", "PN65T", "PN548C2", "PN66T",
32                              "PN551",   "PN67T",   "PN553", "PN80T",   "PN557",
33                              "PN81T",   "sn100u",  "sn220u"};
34   capability();
35 
36  public:
37   static tNFC_chipType chipType;
38   static capability* getInstance();
39   tNFC_chipType processChipType(uint8_t* msg, uint16_t msg_len);
40 };
41 #endif
42