1 /****************************************************************************** 2 * 3 * Copyright 2015-2018,2020-2022 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 offsetDlRspChipType = 3; 28 const uint16_t offsetFwRomCodeVersion = 4; 29 const uint16_t offsetFwMinorVersion = 6; 30 const uint16_t offsetFwMajorVersion = 7; 31 const uint16_t offsetFwMajorVersion_pn557 = 11; 32 /*product[] will be used to print product version and 33 should be kept in accordance with tNFC_chipType*/ 34 const char* product[14] = {"UNKNOWN", "PN547C2", "PN65T", "PN548C2", "PN66T", 35 "PN551", "PN67T", "PN553", "PN80T", "PN557", 36 "PN81T", "sn100", "sn220", "pn560"}; 37 capability(); 38 39 public: 40 static tNFC_chipType chipType; 41 static capability* getInstance(); 42 tNFC_chipType processChipType(uint8_t* msg, uint16_t msg_len); 43 uint32_t getFWVersionInfo(uint8_t* msg, uint16_t msg_len); 44 }; 45 #endif 46