[Add] First commit

This commit is contained in:
yegaogang
2024-07-08 21:03:06 +08:00
commit 042721aab5
2084 changed files with 1456360 additions and 0 deletions

View File

@ -0,0 +1,48 @@
PROJECT(Nfcrdlib_SimplifiedAPI_ISO)
FILE(GLOB Nfcrdlib_SimplifiedAPI_ISO_Sources
*.c
src/*.c
)
include_directories(
intfs
types
)
ADD_EXECUTABLE(Nfcrdlib_SimplifiedAPI_ISO
${Nfcrdlib_SimplifiedAPI_ISO_Sources}
)
TARGET_LINK_LIBRARIES(
Nfcrdlib_SimplifiedAPI_ISO
phOsal
DAL
NxpRdLib_acDiscLoop
NxpRdLib_halHw
NxpRdLib_KeyStore
NxpRdLib_phTools
NxpRdLib_palFelica
NxpRdLib_palI18092mPI
NxpRdLib_palI14443p4a
NxpRdLib_palI14443p4
NxpRdLib_palI14443p4
NxpRdLib_palMifare
NxpRdLib_alFelica
NxpRdLib_alMful
NxpRdLib_alMfdf
NxpRdLib_alT1T
NxpRdLib_alTop
NxpRdLib_alMfc
NxpRdLib_lnLlcp
NxpRdLib_phTools
NxpRdLib_palI18092mT
NxpRdLib_npSnep
NxpRdLib_alMfNtag42XDna
NxpRdLib_phNfcLib
NxpRdLib_palEpcUid
)

View File

@ -0,0 +1,281 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2017-2021,2023 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
/**
* Reader Library Headers
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
/*******************************************************************************
** Definitions
*******************************************************************************/
#define DATA_BUFFER_LEN 256 /* Buffer length */
uint8_t bMoreDataAvailable = 0;
uint16_t wNumberofBytes = 256;
phNfcLib_Transmit_t phNfcLib_TransmitInput;
phNfcLib_PeerInfo_t PeerInfo = {0};
uint8_t bDataBuffer[DATA_BUFFER_LEN]; /* universal data buffer */
#ifdef PHOSAL_FREERTOS_STATIC_MEM_ALLOCATION
uint32_t aSimplifiedTaskBuffer[SIMPLIFIED_ISO_STACK];
#else /* PHOSAL_FREERTOS_STATIC_MEM_ALLOCATION */
#define aSimplifiedTaskBuffer NULL
#endif /* PHOSAL_FREERTOS_STATIC_MEM_ALLOCATION */
#ifdef PH_OSAL_FREERTOS
const uint8_t bTaskName[configMAX_TASK_NAME_LEN] = {"SimplifiedApi"};
#else
const uint8_t bTaskName[] = {"SimplifiedApi"};
#endif /* PH_OSAL_FREERTOS */
/*******************************************************************************
** Static Defines
*******************************************************************************/
static volatile uint8_t bInfLoop = 1U;
/*******************************************************************************
** Prototypes
*******************************************************************************/
void SimplifiedApiDemo (void* pParams);
/*******************************************************************************
** Code
*******************************************************************************/
int main(void)
{
do
{
phStatus_t status;
phNfcLib_Status_t dwStatus;
#ifdef PH_PLATFORM_HAS_ICFRONTEND
phNfcLib_AppContext_t AppContext = {0};
#endif /* PH_PLATFORM_HAS_ICFRONTEND */
#ifndef PH_OSAL_NULLOS
phOsal_ThreadObj_t SimplifiedApi;
#endif /* PH_OSAL_NULLOS */
#ifndef MCUXPRESSO_SDK
/* Perform Controller specific initialization. */
phApp_CPU_Init();
#endif
/* Perform OSAL Initialization. */
(void)phOsal_Init();
#ifdef PH_PLATFORM_HAS_ICFRONTEND
status = phbalReg_Init(&sBalParams, sizeof(phbalReg_Type_t));
CHECK_STATUS(status);
AppContext.pBalDataparams = &sBalParams;
dwStatus = phNfcLib_SetContext(&AppContext);
CHECK_NFCLIB_STATUS(dwStatus);
#endif /* PH_PLATFORM_HAS_ICFRONTEND */
/* Initialize library */
dwStatus = phNfcLib_Init();
CHECK_NFCLIB_STATUS(dwStatus);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS) break;
/* Set the generic pointer */
pHal = phNfcLib_GetDataParams(PH_COMP_HAL);
/* IRQ configuration for different HOST environments */
status = phApp_Configure_IRQ();
CHECK_STATUS(status);
if(status != PH_ERR_SUCCESS) break;
DEBUG_PRINTF("\n Simplified API ISO example: ");
#ifndef PH_OSAL_NULLOS
SimplifiedApi.pTaskName = (uint8_t *)bTaskName;
SimplifiedApi.pStackBuffer = aSimplifiedTaskBuffer;
SimplifiedApi.priority = SIMPLIFIED_ISO_PRIO;
SimplifiedApi.stackSizeInNum = SIMPLIFIED_ISO_STACK;
phOsal_ThreadCreate(&SimplifiedApi.ThreadHandle, &SimplifiedApi, &SimplifiedApiDemo, NULL);
phOsal_StartScheduler();
DEBUG_PRINTF("RTOS Error : Scheduler exited. \n");
#else
SimplifiedApiDemo(NULL);
#endif /* PH_OSAL_NULLOS */
} while(0);
while(bInfLoop); /* Comes here if initialization failure or scheduler exit due to error */
return 0;
}
void SimplifiedApiDemo (void* pParams)
{
uint32_t dwStatus = 0;
uint16_t wStatus = 0;
uint16_t wTechnologyMask = 0x1B;
uint8_t bAtqb[13] = {0x00};
uint8_t bAtqbLen = 0;
uint8_t bGetParamDemo = 0;
/* This call shall allocate secure context before calling any secure function,
* when FreeRtos trust zone is enabled.
* */
phOsal_ThreadSecureStack( 512 );
while(1)
{
do
{
/* Configuring the activation profile as ISO */
phNfcLib_SetConfig_Value(PH_NFCLIB_CONFIG_ACTIVATION_PROFILE, PH_NFCLIB_ACTIVATION_PROFILE_ISO);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
break;
}
/* Activating the card with blocking activation mode */
dwStatus = phNfcLib_Activate(wTechnologyMask, &PeerInfo, NULL);
if(dwStatus != PH_NFCLIB_STATUS_PEER_ACTIVATION_DONE)
{
break;
}
bGetParamDemo = 0;
switch(PeerInfo.dwActivatedType)
{
/* Reference application for the particular tech type will divert form here */
case E_PH_NFCLIB_MIFARE_CLASSIC_1K:
DEBUG_PRINTF (" \nMIFARE Classic contactless IC 1K detected... \n");
dwStatus = NfcLib_MifareClassic_1k_Reference_app();
break;
case E_PH_NFCLIB_MIFARE_CLASSIC_4K:
DEBUG_PRINTF (" \nMifare Classic 4K detected... \n");
dwStatus = NfcLib_MifareClassic_1k_Reference_app();
break;
case E_PH_NFCLIB_MIFARE_ULTRALIGHT:
DEBUG_PRINTF (" \nMIFARE Ultralight contactless IC detected... \n");
dwStatus = NfcLib_MifareUltralight_Reference_app();
break;
case E_PH_NFCLIB_MIFARE_DESFIRE:
DEBUG_PRINTF (" \nMIFARE DESFire contactless IC detected... \n");
DEBUG_PRINTF (" \nMifare Desfire not supported in simplified api... \n");
break;
case E_PH_NFCLIB_TYPEB_LAYER3:
DEBUG_PRINTF (" \nType B Layer 3 card detected... \n");
DEBUG_PRINTF (" \nThis application contains nothing for only layer 3 Type B card... \n");
break;
case E_PH_NFCLIB_TYPEA_LAYER3:
DEBUG_PRINTF (" \nType A Layer 3 card or Mifare Classic/ultralight with merged atqa detected... \n");
DEBUG_PRINTF (" \nThis application contains nothing for only layer 3 Type A card... \n");
break;
case E_PH_NFCLIB_TYPEA_LAYER4:
DEBUG_PRINTF (" \nType A Layer 4 card or Mifare desfire with merged atqa detected... \n");
dwStatus = NfcLib_Layer4TypeA_Reference_app();
break;
case E_PH_NFCLIB_TYPEB_LAYER4:
DEBUG_PRINTF (" \nType B Layer 4 card detected... \n");
DEBUG_PRINTF (" \n Do not remove the card ..\n");
DEBUG_PRINTF (" \n Wait till operation completes... \n");
dwStatus = NfcLib_TypeB_Reference_app();
bGetParamDemo = 1;
break;
case E_PH_NFCLIB_ISO15693:
DEBUG_PRINTF (" \nType ISO 15693 compatible card detected... \n");
dwStatus = NfcLib_ISO15693_Reference_app();
break;
case E_PH_NFCLIB_ISO18000p3m3:
DEBUG_PRINTF (" \nType ISO 18000 compatible card detected... \n");
dwStatus = NfcLib_ISO18000p3m3_Reference_app();
break;
default:
break;
}
dwStatus = phNfcLib_Deactivate(PH_NFCLIB_DEACTIVATION_MODE_RELEASE,
&PeerInfo
);
DEBUG_PRINTF("\n Please remove the card\n");
if(bGetParamDemo)
{
(void)phhalHw_SetConfig(phNfcLib_GetDataParams(PH_COMP_HAL),
PHHAL_HW_CONFIG_SET_EMD,
PH_OFF);
(void)phhalHw_Wait(phNfcLib_GetDataParams(PH_COMP_HAL),
PHHAL_HW_TIME_MILLISECONDS,
5);
wStatus = phpalI14443p3b_WakeUpB(phNfcLib_GetDataParams(PH_COMP_PAL_ISO14443P3B),
0x00, 0x00,
0x00, &bAtqb[0], &bAtqbLen);
wStatus = wStatus & PH_ERR_MASK;
while(((wStatus == PH_ERR_SUCCESS) || (wStatus == PH_ERR_COLLISION_ERROR)))
{
(void)phpalI14443p3b_HaltB(phNfcLib_GetDataParams(PH_COMP_PAL_ISO14443P3B));
(void)phhalHw_Wait(phNfcLib_GetDataParams(PH_COMP_HAL),
PHHAL_HW_TIME_MILLISECONDS,
5);
wStatus = phpalI14443p3b_WakeUpB(phNfcLib_GetDataParams(PH_COMP_PAL_ISO14443P3B), 0x00, 0x00,
0x00, &bAtqb[0], &bAtqbLen);
wStatus = wStatus & PH_ERR_MASK;
}
}
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \nDeactivate with Release Mode failed, card was removed from vicinity... \n");
DEBUG_PRINTF (" \n Thus Performing Deactivate with RF OFF mode... \n");
dwStatus = phNfcLib_Deactivate(PH_NFCLIB_DEACTIVATION_MODE_RF_OFF,
&PeerInfo
);
}
if(bGetParamDemo)
{
(void)phhalHw_Wait(phNfcLib_GetDataParams(PH_COMP_HAL), PHHAL_HW_TIME_MILLISECONDS, 1000);
}
} while(0);
}
}
#ifdef NXPBUILD__PHHAL_HW_TARGET
/* Stubbed definitions in case TARGET is enabled */
uint8_t sens_res[2] = {0x04, 0x00};
uint8_t nfc_id1[3] = {0xA1, 0xA2, 0xA3};
uint8_t sel_res = 0x40;
uint8_t nfc_id3 = 0xFA;
uint8_t poll_res[18] = {0x01, 0xFE, 0xB2, 0xB3, 0xB4, 0xB5,
0xB6, 0xB7, 0xC0, 0xC1, 0xC2, 0xC3,
0xC4, 0xC5, 0xC6, 0xC7, 0x23, 0x45 };
#endif /* NXPBUILD__PHHAL_HW_TARGET */

View File

@ -0,0 +1,253 @@
__________________________________________________
NXPNFCRDLIB EXAMPLE : NFCRDLIB_SIMPLIFIEDAPI_ISO
(V07.10.00)
__________________________________________________
Table of Contents
_________________
1 Document Purpose
2 Description of the Nfcrdlib_SimplifiedAPI_ISO
3 Restrictions on Nfcrdlib_SimplifiedAPI_ISO
4 Package Contents
5 Mandatory materials (not included)
6 Hardware Configuration
7 Software Configuration
8 Steps to build Nfcrdlib_SimplifiedAPI_ISO for LPC1769 with PN5190 using MCUXpresso
9 Steps to build Nfcrdlib_SimplifiedAPI_ISO for LPC1769 with PN5180 using MCUXpresso
10 Steps to build Nfcrdlib_SimplifiedAPI_ISO for LPC1769 with RC663 using MCUXpresso
11 Steps to build Nfcrdlib_SimplifiedAPI_ISO for PN7462AU using MCUXpresso
12 Steps to build Nfcrdlib_SimplifiedAPI_ISO for FRDM-K82F using MCUXpresso
13 Selection of Board / OSAL / Frontend (MCUXpresso)
14 Steps to follow for PI / Linux / CMake
15 Running Nfcrdlib_SimplifiedAPI_ISO
16 List of supported NFC Reader Boards/ICs
17 Reference Documents
1 Document Purpose
==================
This document describes the steps to be followed to execute
Nfcrdlib_SimplifiedAPI_ISO example as well as it's known problems and
restrictions.
2 Description of the Nfcrdlib_SimplifiedAPI_ISO
===============================================
This example is a Reference Application to demonstrate the usage of
Simplified API with ISO profile. Application contains example of Type
A Layer 4, Type B Layer 4, Mifare UltraLight, Mifare Classic, ISO
15693 and ISO 18000p3m3.
3 Restrictions on Nfcrdlib_SimplifiedAPI_ISO
============================================
- Nfcrdlib_SimplifiedAPI_ISO is restricted to be run on NFC Reader
Boards/ICs mentioned in Section-16.
- The APIs are intended for NXP contact-less reader ICs only, as such
the APIs are not to be ported to any technology from any other
vendor.
- NXP will not support porting to any other vendor platform.
- This software project requires NxpNfcRdLib v07.10.00 or later.
- **IMPORTANT** The default used MCU Type is K82. When executing
example on LPC1769 or PN7462AU, the MCU Type has to be changed in
the MCUXpresso IDE.
- For switching to MCU Type to PN7462AU, see Section-11
- For switching to MCU Type to LPC1769, see Section-8, Section-9 and
Section-10.
4 Package Contents
==================
- Readme.txt
+ This readme file
- Nfcrdlib_SimplifiedAPI_ISO.c
+ Main example file.
- intfs/Nfcrdlib_SimplifiedAPI_ISO.h
+ Interfaces/Defines specific to the example
- intfs/ph_NxpBuild_App.h
+ Reader library build configuration file
- src/phApp_Helper.c
- src/phApp_PN5180_Init.c
- src/phApp_PN5190_Init.c
- src/phApp_PN7462AU_Init.c
- src/phApp_RC663_Init.c
- src/phApp_Init.c and intfs/phApp_Init.h
+ Common utility functions (common across all examples)
- src/Nfcrdlib_SimplifiedApi_ISO_15693.c
- src/Nfcrdlib_SimplifiedApi_ISO_18000.c
- src/Nfcrdlib_SimplifiedApi_ISO_Layer4TypeA.c
- src/Nfcrdlib_SimplifiedApi_ISO_MFC.c
- src/Nfcrdlib_SimplifiedApi_ISO_MFUL.c
- src/Nfcrdlib_SimplifiedApi_ISO_TypeB.c
+ Reference Functionality for the component of corresponding
protocol
- intfs/Nfcrdlib_SimplifiedApi_ISO.h
- intfs/Nfcrdlib_SimplifiedApi_ISO_15693.h
- intfs/Nfcrdlib_SimplifiedApi_ISO_18000.h
- intfs/Nfcrdlib_SimplifiedApi_ISO_MFC.h
- intfs/Nfcrdlib_SimplifiedApi_ISO_MFUL.h
+ Function Macros to create the command for the component of
corresponding protocol
- mcux/.cproject and mcux/.project
+ MCUXpresso project configuration file
- cr_startup_lpc175x_6x.c
+ Startup required to compile example for LPC1769 Micro Controller.
5 Mandatory materials (not included)
====================================
- MCUXpresso IDE. It can be downloaded from
[http://www.nxp.com/products/:MCUXpresso-IDE]
- SDK for Freedom K82 Board
([http://www.nxp.com/products/:FRDM-K82F]). The pre-build SDK can
be downloaded from
[https://mcuxpresso.nxp.com/en/license?hash=9897a8c19a6bc569c3fade7141f0f405&hash_download=true&to_vault=true]
See MCUXpresso User Manual for steps needed to install an SDK.
- Plugin to extend MCUXpresso to support PN7462AU. (Required for
MCUXpresso versions before MCUXpressoIDE_10.0.2)
- LPCXpresso LPC1769 / Freedom K82 development boards For NFC ICs
listed in Section-16 (Note: PN7462AU (Section-16 Bullet-3) does not
need any other other microcontroller).
6 Hardware Configuration
========================
Before starting this application, HW Changes may be required for the
used board. Refer to the following User Manuals / Application notes
before starting with this example.
- AN11211: Quick Start Up Guide RC663 Blueboard
- AN11744: PN5180 Evaluation board quick start guide
- AN11802: NFC Reader Library for Linux Installation Guidelines
- AN12550: PNEV5190B Evaluation board quick start guide
7 Software Configuration
========================
- The Software can be compiled for Cortex M3 LPC1769 micro-controller,
Cortex M4 Freedom K82 and Cortex M0 based PN7462AU from NXP.
- Since this example can be configured to run on various MCU ICs and
various NFC ICs, appropriate changes are required as mentioned in
Section-8, Section-9, Section-10, Section-11 and Section-12.
8 Steps to build Nfcrdlib_SimplifiedAPI_ISO for LPC1769 with PN5190 using MCUXpresso
====================================================================================
See "PNEV5190B Evaluation board quick start guide" in AN12550 (See
Section-17, Bullet-6 below)
9 Steps to build Nfcrdlib_SimplifiedAPI_ISO for LPC1769 with PN5180 using MCUXpresso
====================================================================================
See "Importing provided SW example projects" in AN11908 (See
Section-17, Bullet-2 below)
10 Steps to build Nfcrdlib_SimplifiedAPI_ISO for LPC1769 with RC663 using MCUXpresso
====================================================================================
See "Importing provided SW example projects" in AN11022 (See
Section-17, Bullet-3 below)
11 Steps to build Nfcrdlib_SimplifiedAPI_ISO for PN7462AU using MCUXpresso
==========================================================================
- For MCUXpresso versions before MCUXpressoIDE_10.0.2, See "Adding
PN7462AU Plugin" in UM10883. (See Section-17, Bullet-4 below)
- See "Importing provided SW example projects" in UM10883.
12 Steps to build Nfcrdlib_SimplifiedAPI_ISO for FRDM-K82F using MCUXpresso
===========================================================================
See "Import projects to the MCUXpresso" in AN11908. (See Section-17,
Bullet-2 below)
13 Selection of Board / OSAL / Frontend (MCUXpresso)
====================================================
For MCUXpresso, the selection of Board / OSAL / Frontend has to be
done via -D (Preprocessor defines).
1) To select the board go to "Project Properties" --> "C/C++ Build"
--> "Settings" --> "Preprocessor" --> "Defined symbols (-D)", and
define the relevant PHDRIVER_<BoardNFCCombination>_BOARD macro.
e.g. For using LPC1769 with Pn5180 use
PHDRIVER_LPC1769PN5180_BOARD. For list of supported boards refer
to Platform\DAL\cfg\BoardSelection.h.
2) To select the osal/os type, go to "Project Properties" --> "C/C++
Build" --> "Settings" --> "Preprocessor" --> "Defined symbols
(-D)".
e.g. For using FreeRTOS use PH_OSAL_FREERTOS. For other options
refer to RTOS\phOsal\inc\phOsal_Config.h.
14 Steps to follow for PI / Linux / CMake
=========================================
The steps are described in AN11802. (See Section-17, Bullet-5 below)
15 Running Nfcrdlib_SimplifiedAPI_ISO
=====================================
The running application can now be used for EMVCo Test case
validation.
16 List of supported NFC Reader Boards/ICs
==========================================
1) CLEV6630B v2.0 Customer Evaluation Board
2) PNEV5180B v2.0 Customer Evaluation Board
3) PN7462AU v2.1 Customer Evaluation Board
4) PNEV5190B v1.0 Customer Evaluation Board
17 Reference Documents
======================
1) UM10954 : PN5180 SW Quick start guide
[http://www.nxp.com/docs/en/user-guide/UM10954.pdf]
2) AN11908 : NFC Reader Library for FRDM-K82F Board Installation
guidelines
[http://www.nxp.com/docs/en/application-note/AN11908.pdf]
3) AN11022 : CLRC663 Evaluation board quick start guide
[http://www.nxp.com/docs/en/application-note/AN11022.pdf]
4) UM10883 : PN7462AU Quick Start Guide - Development Kit
[http://www.nxp.com/docs/en/user-guide/UM10883.pdf]
5) AN11802 : NFC Reader Library for Linux Installation Guidelines
[http://www.nxp.com/docs/en/application-note/AN11802.pdf]
6) AN12550 : PNEV5190B Evaluation board quick start guide
----------------------------------------------------------------------
For updates of this example, see
[http://www.nxp.com/products/:NFC-READER-LIBRARY]

View File

@ -0,0 +1,56 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2017-2021 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Example Source Header for Nfcrdlib_SimplifiedApi_ISO application.
*
* $Author: NXP $
* $Revision: $ (v07.10.00)
* $Date: $
*/
#ifndef INTFS_NFCRDLIB_SIMPLIFIEDAPI_ISO_H_
#define INTFS_NFCRDLIB_SIMPLIFIEDAPI_ISO_H_
#include <phApp_Init.h>
#include <Nfcrdlib_SimplifiedApi_ISO_15693.h>
#include <Nfcrdlib_SimplifiedApi_ISO_18000.h>
#include <Nfcrdlib_SimplifiedApi_ISO_MFUL.h>
#include <Nfcrdlib_SimplifiedApi_ISO_MFC.h>
uint32_t NfcLib_MifareClassic_1k_Reference_app(void);
uint32_t NfcLib_ISO18000p3m3_Reference_app(void);
uint32_t NfcLib_ISO15693_Reference_app(void);
uint32_t NfcLib_MifareDesfire_Reference_app(void);
uint32_t NfcLib_MifareUltralight_Reference_app(void);
uint32_t NfcLib_TypeB_Reference_app(void);
uint32_t NfcLib_Layer4TypeA_Reference_app(void);
#ifdef PH_OSAL_FREERTOS
#ifdef PHOSAL_FREERTOS_STATIC_MEM_ALLOCATION
#define SIMPLIFIED_ISO_STACK (2200/4)
#else /* PHOSAL_FREERTOS_STATIC_MEM_ALLOCATION */
#if defined( __PN74XXXX__) || defined(__PN76XX__)
#define SIMPLIFIED_ISO_STACK (2000/4)
#else /* defined( __PN74XXXX__) || defined(__PN76XX__) */
#define SIMPLIFIED_ISO_STACK (2050)
#endif /* defined( __PN74XXXX__) || defined(__PN76XX__) */
#endif /* PHOSAL_FREERTOS_STATIC_MEM_ALLOCATION*/
#define SIMPLIFIED_ISO_PRIO 4
#endif /* PH_OSAL_FREERTOS */
#ifdef PH_OSAL_LINUX
#define SIMPLIFIED_ISO_PRIO 0
#define SIMPLIFIED_ISO_STACK 0x20000
#endif /* PH_OSAL_LINUX*/
#endif /* INTFS_NFCRDLIB_SIMPLIFIEDAPI_ISO_H_ */

View File

@ -0,0 +1,170 @@
/*
* Copyright 2017-2020, NXP
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
*particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Simplified API ISO15693.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#ifndef EX11_SIMPLIFIEDAPI_15693_H
#define EX11_SIMPLIFIEDAPI_15693_H
/* Read Single Block takes the option and block num to read */
/* bOpt can be #PH_ON or #PH_OFF, bBlockNo can be 0x00 - 0xFF */
#define READ_SINGLEBLOCK(bOpt, bBlockNo) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_ReadSingleBlock; \
}
/* Extended Read Single Block takes the option and block num to read the extended memory card*/
/* bOpt can be #PH_ON or #PH_OFF, wBlockNo can be 0x00 - 0xFFFF */
#define EXTENDEDREAD_SINGLEBLOCK(bOpt, wBlockNo) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = wBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_Extended_ReadSingleBlock; \
}
/* Read Multiple Block takes the option, block num and num of Blocks to Read*/
/* Option can be #PH_ON or #PH_OFF, block bBlockNo can be 0x00 - 0xFF, wNumBlock can be 0x01 - 0x100 */
#define READ_MULTIPLEBLOCK(bOpt, bBlockNo, wNumBlock) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wNumBlocks = wNumBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_ReadMultipleBlocks; \
}
/* Read Multiple Block takes the option, block num and num of Blocks to Read from the extended memory card */
/* Option can be #PH_ON or #PH_OFF, block bBlockNo can be 0x00 - 0xFFFF, wNumBlock can be 0x01 - 0xFFFF */
#define EXTENDEDREAD_MULTIPLEBLOCK(bOpt, wBlockNo, wNumBlock) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = wBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wNumBlocks = wNumBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_Extended_ReadMultipleBlocks; \
}
/* Get System Information takes no parameter and gets the system information */
#define GET_SYSTEMINFORMATION() { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_GetSystemInformation; \
}
/* Extended Get System Information takes no parameter and gets the system information for extended memory card */
#define EXTENDEDGET_SYSTEMINFORMATION() { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_ExtendedGetSystemInformation; \
}
/* Get Multiple Block Security status takes the Block no and num of blocks whose security status to be read */
/* bBlockNo can be 0x00 - 0xFF and wNumBlock can be 0x01 - 0x100 */
#define GET_MULTIPLEBLOCKSECURITYSTATUS(bBlockNo, wNumBlock) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wNumBlocks = wNumBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_GetMultipleBlockSecurityStatus; \
}
/* Extended Get Multiple Block Security status takes the Block no and num of blocks for extended memory whose security status to be read */
/* wBlockNo can be 0x00 - 0xFFFF and wNumBlock can be 0x01 - 0xFFFF */
#define EXTENDEDGET_MULTIPLEBLOCKSECURITYSTATUS(wBlockNo, wNumBlock) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = wBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wNumBlocks = wNumBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_Extended_GetMultipleBlockSecurityStatus; \
}
/* Write Single Block takes the option , block number and data to write */
/* bOpt can be #PH_ON or #PH_OFF, bBlockNo can be 0x00 - 0xFF, pData takes the pointer to the start of the data */
#define WRITE_SINGLEBLOCK(bOpt, bBlockNo, pData) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_WriteSingleBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.pBuffer = pData; \
}
/* Extended Write Single Block takes the option , block number and data to write to a extended memory card */
/* bOpt can be #PH_ON or #PH_OFF, wBlockNo can be 0x00 - 0xFFFF, pData takes the pointer to the start of the data */
#define EXTENDEDWRITE_SINGLEBLOCK(bOpt, wBlockNo, pData) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = wBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_Extended_WriteSingleBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.pBuffer = pData; \
}
/* Write Multiple Block takes the option , block number, number of blocks and data to write */
/* bOpt can be #PH_ON or #PH_OFF, bBlockNo can be 0x00 - 0xFF, wNumBlock can be 0x01 - 0x100, pData takes the pointer to the start of the data */
#define WRITE_MULTIPLEBLOCK(bOpt, bBlockNo, wNumBlock, pData) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wNumBlocks = wNumBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_WriteMultipleBlocks; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.pBuffer = pData; \
}
/* Extended Write Multiple Block takes the option , block number, number of blocks and data to write to a extended memory card */
/* bOpt can be #PH_ON or #PH_OFF, wBlockNo can be 0x00 - 0xFFFF, wNumBlock can be 0x01 - 0xFFFF, pData takes the pointer to the start of the data */
#define EXTENDEDWRITE_MULTIPLEBLOCK(bOpt, wBlockNo, wNumBlock, pData) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = wBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wNumBlocks = wNumBlock; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_Extended_WriteMultipleBlocks; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.pBuffer = pData; \
}
/* Lock Block takes the option and block number to Lock */
/* bOpt can be #PH_ON or #PH_OFF, bBlockNo can be 0x00 - 0xFF */
#define LOCK_BLOCK(bOpt, bBlockNo) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_LockBlock; \
}
/* Extended Lock Block takes the option and block number of Extended Memory Card to Lock */
/* bOpt can be #PH_ON or #PH_OFF, wBlockNo can be 0x00 - 0xFFFF */
#define EXTENDEDLOCK_BLOCK(bOpt, wBlockNo) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.wBlockNumber = wBlockNo; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_Extended_LockBlock; \
}
/* Write AFI takes the option and AFI to write */
/* bOpt can be #PH_ON or #PH_OFF, bAFI can be any valid AFI value */
#define WRITE_AFI(bOpt, bAFI) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bAfi = bAFI; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_WriteAFI; \
}
/* Lock AFI takes the option with which to lock the AFI */
/* bOpt can be #PH_ON or #PH_OFF */
#define LOCK_AFI(bOpt) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_LockAFI; \
}
/* Write DSFID takes the option and DSFID to write */
/* bOpt can be #PH_ON or #PH_OFF and bDSFID can be any valid DSFID value */
#define WRITE_DSFID(bOpt, bDSFID) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bDsfid = bDSFID; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_WriteDSFID; \
}
/* Lock DSFID takes the option with which to lock the DSFID */
/* bOpt can be #PH_ON or #PH_OFF */
#define LOCK_DSFID(bOpt) { \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO15693.bCommand = ISO15693_LockDSFID; \
}
#endif /* EX11_SIMPLIFIEDAPI_15693_H */

View File

@ -0,0 +1,132 @@
/*
* Copyright 2017-2020, NXP
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
*particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Simplified API ISO 18000.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#ifndef EX11_SIMPLIFIEDAPI_ISO_18000_H
#define EX11_SIMPLIFIEDAPI_ISO_18000_H
/* ACK does not take any parameter and uses the handle present in context */
#define I18000_ACK() { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_Ack; \
}
/* REQRN takes the option with which to perform the REQRn Command */
/* bOpt can be only PHAL_I18000P3M3_REQRN_USE_HANDLE here */
#define I18000_REQRN(bOpt) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_ReqRn; \
}
/* READ takes the Memory Bank to read, address of the word to read, length of the word ptr and No of words to read */
/* bMembank can be 0x00 - 0x03 , pWordptr is user choice limited to tag memory size */
/* bWordPtrLength can be 0x00 - 0x03 and depends on the TAG memory size , bWordcount is the number of words to read */
#define I18000_READ(bMembank, pWordptr, bWordPtrlength, bWordcount) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bMemBank = bMembank; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pWordPtr = pWordptr; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordPtrLength = bWordPtrlength; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordCount = bWordcount; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_Read; \
}
/* WRITE takes the option, Memory Bank to write, address of the word to write, length of the word ptr and Data to write */
/* bOpt can be #PH_NFCLIB_18000P3M3_AC_NO_COVER_CODING or #PH_NFCLIB_18000P3M3_AC_USE_COVER_CODING, bMembank can be 0x00 - 0x03 */
/* pWordptr is user choice limited to tag memory size, bWordPtrLength can be 0x00 - 0x03 and depends on the TAG memory size */
/* pData is a 2 byte word to write */
#define I18000_WRITE(bOpt, bMembank, pWordptr, bWordPtrlength, pData) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bMemBank = bMembank; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pWordPtr = pWordptr; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordPtrLength = bWordPtrlength; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pBuffer = pData; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_Write; \
}
/* KILL takes the option , the password for the kill and recommissioning option */
/* bOpt can be #PH_NFCLIB_18000P3M3_AC_NO_COVER_CODING or #PH_NFCLIB_18000P3M3_AC_USE_COVER_CODING, pPassWord is a 4 byte password */
/* bReCom can be any optional or mandatory support Recom option, value 0x04 is a mandatory support */
#define I18000_KILL(bOpt, pPassWord, bReCom) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pPassword = pPassWord; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bRecom = bReCom; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_Kill; \
}
/* LOCK takes the Mask on which and the action with which to perform the Lock */
/* pLockMask and pLockAction both are a 10-bit field please refer ISO 18000-3M3 for detailed value */
#define I18000_LOCK(pLockMask, pLockAction) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pMask = pLockMask; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pAction = pLockAction; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_Lock; \
}
/* ACCESS takes the option and password for the Access */
/* bOpt can be #PH_NFCLIB_18000P3M3_AC_NO_COVER_CODING or #PH_NFCLIB_18000P3M3_AC_USE_COVER_CODING, pPassWord is a 4 byte password */
#define I18000_ACCESS(bOpt, pPassWord) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bOption = bOpt; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pPassword = pPassWord; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_Access; \
}
/* BLOCKWRITE takes the Memory Bank to write ,address of the word,length of the word ptr, No of words and Data to write */
/* bMembank can be 0x00 - 0x03, pWordptr is user choice limited to tag memory size, bWordPtrLen can be 0x00 - 0x03 and depends on the TAG memory size */
/* bWordcount is the no of words to write and is card support specific, pData takes the data to write */
#define I18000_BLOCKWRITE(bMembank, pWordptr, bWordPtrLen, bWordcount, pData) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bMemBank = bMembank; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pWordPtr = pWordptr; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordPtrLength = bWordPtrLen; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordCount = bWordcount; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pBuffer = pData; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_BlockWrite; \
}
/* BLOCKERASE takes the Memory Bank to write ,address of the word,length of the word ptr and No of words to erase */
/* bMembank can be 0x00 - 0x03, pWordptr is user choice limited to tag memory size */
/* bWordPtrLen can be 0x00 - 0x03 and depends on the TAG memory size and No of words to erase is card support specific*/
#define I18000_BLOCKERASE(bMembank, pWordptr, bWordPtrLen, bWordcount) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bMemBank = bMembank; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pWordPtr = pWordptr; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordPtrLength = bWordPtrLen; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bWordCount = bWordcount; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_BlockErase; \
}
/* BLOCKPERMALOCK takes the RFU, READ/LOCK choice, Memory Bank to PermaLock, starting address of the block and length of the block ptr, range of the block mask, and MemMask */
/* bRFU is to be kept 0, bReadlock can be 0/1, bMembank can be 0x00 - 0x03, pBlockptr is user choice limited to tag memory size */
/* bBlockPtrLen can be 0x00 - 0x03, bBlockrange depends on Tag Memory and pMemMask along with ReadLock depend upon 0/1 */
#define I18000_BLOCKPERMALOCK(bRfu, bReadlock, bMembank, pBlockptr, bBlockPtrLen, bBlockrange, pMemMask) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bRFU = bRfu; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bReadLock = bReadlock; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bMemBank = bMembank; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pBlockPtr = pBlockptr; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bBlockPtrLength = bBlockPtrLen; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bBlockRange = bBlockrange; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pMask = pMemMask; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_BlockPermaLock; \
}
/* SETHANDLE takes the pointer to the handle */
/* pHandlePtr is a 2 byte Handle return by the REQRN command */
#define I18000_SETHANDLE(pHandlePtr) { \
phNfcLib_TransmitInput.phNfcLib_ISO18000.pHandle = pHandlePtr; \
phNfcLib_TransmitInput.phNfcLib_ISO18000.bCommand = ISO18000_SetHandle; \
}
#endif /* EX11_SIMPLIFIEDAPI_ISO_18000_H */

View File

@ -0,0 +1,89 @@
/*
* Copyright 2017-2020, NXP
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
*particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Simplified API ISO MIFARE Classic contactless IC.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#ifndef EX11_SIMPLIFIEDAPI_MFC_H
#define EX11_SIMPLIFIEDAPI_MFC_H
/* READ takes the block number to Read */
/* bBlockNo can take any value between 0x00-0xFF depending upon card size */
#define MFC_READ(bBlockNo) { \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Read; \
}
/* WRITE takes the block number and data to Write */
/* bBlockNo can take any value between 0x00-0xFF depending upon card size and the pBlockData is the pointer to 16 bytes data */
#define MFC_WRITE(bBlockNo, pBlockData) {\
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.pBuffer = pBlockData; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Write; \
}
/* INCREMENT takes the block number of the value block and the value with which to increment the block */
/* bBlockNo can take any value between 0x00-0xFF depending upon card size and should be value block*/
/* pValue takes pointer to a 4 byte value data */
#define MFC_INCREMENT(bBlockNo, pValue) { \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.pBuffer = pValue; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Increment; \
}
/* DECREMENT takes the block number of the value block and the value with which to decrement the block */
/* bBlockNo can take any value between 0x00-0xFF depending upon card size and should be value block*/
/* pValue takes pointer to a 4 byte value data */
#define MFC_DECREMENT(bBlockNo, pValue) { \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.pBuffer = pValue; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Decrement; \
}
/* TRANSFER takes the block number of the value block where the transfer buffer should be transferred */
/* bBlockNo can take any value between 0x00-0xFF depending upon card size and should be value block*/
#define MFC_TRANSFER(bBlockNo) { \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Transfer; \
}
/* RESTORE takes the block number of the value block the transfer buffer shall be restored from*/
/* bBlockNo can take any value between 0x00-0xFF depending upon card size and should be value block*/
#define MFC_RESTORE(bBlockNo) {\
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Restore; \
}
/* AUTHENTICATE takes the block number, key type, key number and key version of the Key with which to authenticate */
/* bBlockNo can take any value between 0x00-0xFF constraint to card memory, bKeyType can be #PHAL_MFC_KEYA or #PHAL_MFC_KEYB */
/* bKeyNumber and wKeyVersion of the Keystore depends upon the size of keystore and size is 2 for current settings */
#define MFC_AUTHENTICATE(bBlockNo, bKeytype, bKeyNo, wKeyVersion) { \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bBlockNumber = bBlockNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bKeyType = bKeytype; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bKeyNumber = bKeyNo; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bKeyVersion = wKeyVersion; \
phNfcLib_TransmitInput.phNfcLib_MifareClassic.bCommand = Authenticate; \
}
/* PERSONALIZEUID takes the UID type with which to personalize the presented card */
/* bUidType can be PHAL_MFC_UID_TYPE_UIDF0 or PHAL_MFC_UID_TYPE_UIDF1 or PHAL_MFC_UID_TYPE_UIDF2 or PHAL_MFC_UID_TYPE_UIDF3 */
#define MFC_PERSONALIZEUID(bUidType) { \
}
#endif /* EX11_SIMPLIFIEDAPI_MFC_H */

View File

@ -0,0 +1,49 @@
/*
* Copyright 2017-2020, NXP
*
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
*particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Simplified API ISO MFUL.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#ifndef EX11_SIMPLIFIEDAPI_ISO_MFUL_H
#define EX11_SIMPLIFIEDAPI_ISO_MFUL_H
/* MFUL_READ takes the page no to read */
/* bPageNo can be 0x00 - 0xFF depending upon card layout */
#define MFUL_READ(bPageNo) { \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.bPageNumber = bPageNo; \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.bCommand = MFUL_Read; \
}
/* MFUL_WRITE takes the page no and data to write */
/* bPageNo can be 0x00 - 0xFF depending upon card layout, pData is a pointer to 4 byte page data */
#define MFUL_WRITE(bPageNo, pData) { \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.bPageNumber = bPageNo; \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.pBuffer = pData; \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.bCommand = MFUL_Write; \
}
/* MFUL_COMPATIBILITY_WRITE takes the page no and data to write */
/* bPageNo can be 0x00 - 0xFF depending upon card layout, pData is a pointer to 16 byte page data */
#define MFUL_COMPATIBILITY_WRITE(bPageNo, pData) { \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.bPageNumber = bPageNo; \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.pBuffer = pData; \
phNfcLib_TransmitInput.phNfcLib_MifareUltraLight.bCommand = MFUL_Compatibility_Write; \
}
#endif /* EX11_SIMPLIFIEDAPI_ISO_MFUL_H */

View File

@ -0,0 +1,189 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2016-2023 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Example Source abstracting component header specific to HW used in the examples
* This file shall be present in all examples. A customer does not need to touch/modify this file. This file
* purely depends on the phNxpBuild_Lpc.h or phNxpBuild_App.h
* The phAppInit.h externs the component data structures initialized here that is in turn included by the core examples.
* The core example shall not use any other variable defined here except the RdLib component data structures(as explained above)
* The RdLib component initialization requires some user defined data and function pointers.
* These are defined in the respective examples and externed here.
*
* Keystore and Crypto initialization needs to be handled by application.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#ifndef PHAPP_INIT_H
#define PHAPP_INIT_H
/* Status header */
#include <ph_Status.h>
/* Driver Header */
#include <phDriver.h>
/* NFCLIB Header */
#include <phNfcLib.h>
/* Discovery Loop Header */
#include <phacDiscLoop.h>
/* Platform definitions Header */
#include <ph_RefDefs.h>
/* Check for K82 controller based boards. */
#if defined(PHDRIVER_FRDM_K82FPN5180_BOARD) || \
defined(PHDRIVER_FRDM_K82FRC663_BOARD) || \
defined(PHDRIVER_K82F_PNEV5190B_BOARD)
#define PHDRIVER_KINETIS_K82
#endif
/* Check for LPC1769 controller based boards. */
#if defined(PHDRIVER_LPC1769PN5180_BOARD) || \
defined(PHDRIVER_LPC1769RC663_BOARD) || \
defined(PHDRIVER_LPC1769PN5190_BOARD)
#define PHDRIVER_LPC1769
#endif
#if defined(PHDRIVER_PIPN5180_BOARD) || \
defined(PHDRIVER_PIRC663_BOARD) || \
defined(PHDRIVER_PIPN5190_BOARD)
#include <phDriver_Linux_Int.h>
#endif
#ifdef PHDRIVER_KINETIS_K82
# include <fsl_debug_console.h>
# include <stdio.h>
#endif
#if !defined(__PN76XX__)
#ifdef DEBUG
#ifdef PHDRIVER_KINETIS_K82
#if SDK_DEBUGCONSOLE==1
#define DEBUG_PRINTF DbgConsole_Printf
#else
#define DEBUG_PRINTF(...) printf(__VA_ARGS__);
#endif
#else /* PHDRIVER_KINETIS_K82 */
#include <stdio.h>
#define DEBUG_PRINTF(...) printf(__VA_ARGS__); fflush(stdout)
#endif /* PHDRIVER_KINETIS_K82 */
#else /* DEBUG */
#define DEBUG_PRINTF(...)
#define DEBUG_SCANF(...)
#endif /* DEBUG */
#else /* __PN76XX__ */
#if (SEGGER_RTT_ENABLE == 1)
#include "SEGGER_RTT.h"
#define DEBUG_PRINTF(...) SEGGER_RTT_printf(0, __VA_ARGS__);
#define DEBUG_SCANF(Input , data) *data = (SEGGER_RTT_WaitKey() - 0x30); SEGGER_RTT_WaitKey()
#else
#if DEBUG
#include <fsl_debug_console.h>
#define DEBUG_PRINTF(...) PRINTF(__VA_ARGS__);
#define DEBUG_SCANF(...) SCANF(__VA_ARGS__);while ((GETCHAR()) != '\n');
#define DEBUG_GETCHAR GETCHAR
#else
#define DEBUG_PRINTF(...)
#define DEBUG_SCANF(...)
#endif /* DEBUG */
#endif /* (SEGGER_RTT_ENABLE == 1) */
#endif /* __PN76XX__ */
/*******************************************************************************
** Global Variable Declaration
*******************************************************************************/
#define PH_NFCRDLIB_EXAMPLE_LPCD_GUARDTIME 100 /* LPCD Guard time(T4) in milli-seconds configured by application for Rc663. */
#define PH_NFCRDLIB_EXAMPLE_LPCD_RFON_TIME 56 /* LPCD RFON time(T3) in micro-seconds configured by application for Rc663. */
/* HAL & BAL declarations */
#ifdef PH_PLATFORM_HAS_ICFRONTEND
extern phbalReg_Type_t sBalParams;
#endif /* PH_PLATFORM_HAS_ICFRONTEND */
#ifdef NXPBUILD__PHHAL_HW_PN5180
extern phhalHw_Pn5180_DataParams_t * pHal;
#endif /* NXPBUILD__PHHAL_HW_PN5180 */
#ifdef NXPBUILD__PHHAL_HW_PN5190
extern phhalHw_Pn5190_DataParams_t * pHal;
#endif /* NXPBUILD__PHHAL_HW_PN5190 */
#ifdef NXPBUILD__PHHAL_HW_RC663
extern phhalHw_Rc663_DataParams_t * pHal;
#endif /* NXPBUILD__PHHAL_HW_RC663 */
#ifdef NXPBUILD__PHHAL_HW_PN7462AU
extern phhalHw_PN7462AU_DataParams_t * pHal;
#endif /* NXPBUILD__PHHAL_HW_PN7462AU */
#ifdef NXPBUILD__PHHAL_HW_PN76XX
extern phhalHw_Pn76xx_DataParams_t * pHal;
#endif /* NXPBUILD__PHHAL_HW_PN76XX */
/**************************************************Prints if error is detected**************************************************************/
/* Enable(1) / Disable(0) printing error/info */
#define DETECT_ERROR 0
#if DETECT_ERROR
#define DEBUG_ERROR_PRINT(x) x
#define PRINT_INFO(...) DEBUG_PRINTF(__VA_ARGS__)
#else
#define DEBUG_ERROR_PRINT(x)
#define PRINT_INFO(...)
#endif
#define CHECK_STATUS(x) \
if ((x) != PH_ERR_SUCCESS) \
{ \
DEBUG_PRINTF("Line: %d Error - (0x%04X) has occurred : 0xCCEE CC-Component ID, EE-Error code. Refer-ph_Status.h\n", __LINE__, (x)); \
}
/* prints if error is detected */
#define CHECK_SUCCESS(x) \
if ((x) != PH_ERR_SUCCESS) \
{ \
DEBUG_PRINTF("\nLine: %d Error - (0x%04X) has occurred : 0xCCEE CC-Component ID, EE-Error code. Refer-ph_Status.h\n ", __LINE__, (x)); \
return (x); \
}
/* prints if error is detected */
#define CHECK_NFCLIB_STATUS(x) \
if ((x) != PH_NFCLIB_STATUS_SUCCESS) \
{ \
DEBUG_PRINTF("\nLine: %d Error - (0x%04X) has occurred in NFCLIB\n ", __LINE__, (x)); \
}
/*********************************************************************************************************************************************/
/*******************************************************************************
** Function Declarations
*******************************************************************************/
extern void phApp_CPU_Init(void);
extern void phApp_PrintTagInfo(phacDiscLoop_Sw_DataParams_t *pDataParams, uint16_t wNumberOfTags, uint16_t wTagsDetected);
extern void phApp_PrintTech(uint8_t TechType);
extern void phApp_Print_Buff(uint8_t *pBuff, uint8_t num);
extern void PrintErrorInfo(phStatus_t wStatus);
extern phStatus_t phApp_Configure_IRQ();
#ifdef PH_PLATFORM_HAS_ICFRONTEND
extern void CLIF_IRQHandler(void);
#endif /* PH_PLATFORM_HAS_ICFRONTEND */
#endif /* PHAPP_INIT_H */

View File

@ -0,0 +1,283 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2016-2023 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Application specific selection of Reader Library Components
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#ifndef PH_NXPBUILD_APP_H_INC
#define PH_NXPBUILD_APP_H_INC
/** \defgroup ph_NxpBuild NXP Build
* \brief Controls the Inclusion of required components, Inclusion SRC/DATA within components and the Build Dependencies between the components
* @{
*/
/* NXPBUILD_DELETE: included code lines should be always removed from code */
/* NXP BUILD DEFINES */
/* use #define to include components */
/* comment out #define to exclude components */
/* DEBUG build mode */
/*#define NXPBUILD__PH_DEBUG*/ /**< DEBUG build definition */
#define NXPRDLIB_REM_GEN_INTFS
/*********************************************************************************************************************************************************************************/
#if defined(__PN74XXXX__) || defined (__PN73XXXX__)
#define NXPBUILD__PHHAL_HW_PN7462AU /**< NFC Controller PN7462AU HAL */
#endif
#ifdef __PN76XX__
#ifdef __PN7642__
#define NXPBUILD__PHHAL_HW_PN7642 /**< NFC Controller PN7642 HAL */
#elif __PN7640__
#define NXPBUILD__PHHAL_HW_PN7640 /**< NFC Controller PN7640 HAL */
#else
#error " PN76 platform definition (__PN7642__ or __PN7640__) missing !!! "
#endif
#if defined(__PN7642__) || defined(__PN7640__)
#define NXPBUILD__PHHAL_HW_PN76XX /**< NFC Controller PN76XX HAL */
#endif
#endif /* __PN76XX__ */
#if defined(PHDRIVER_LPC1769PN5180_BOARD) \
|| defined(PHDRIVER_FRDM_K82FPN5180_BOARD)
# define NXPBUILD__PHHAL_HW_PN5180
#endif
#if defined(PHDRIVER_LPC1769PN5190_BOARD) \
|| defined(PHDRIVER_K82F_PNEV5190B_BOARD)
# define NXPBUILD__PHHAL_HW_PN5190
#endif
#if defined(PHDRIVER_LPC1769RC663_BOARD) \
|| defined(PHDRIVER_FRDM_K82FRC663_BOARD)
# define NXPBUILD__PHHAL_HW_RC663
#endif
#if defined(NXPBUILD__PHHAL_HW_PN5180) || \
defined(NXPBUILD__PHHAL_HW_PN5190) || \
defined(NXPBUILD__PHHAL_HW_PN76XX) || \
defined(NXPBUILD__PHHAL_HW_PN7462AU)
// #define NXPBUILD__PHHAL_HW_TARGET /**< Dependency checking if target mode macros should be enabled */
#endif
/*********************************************************************************************************************************************************************************/
#define NXPBUILD__PHPAL_I14443P3A_SW /**< PAL ISO 14443-3A SW Component is included. */
#define NXPBUILD__PHPAL_I14443P3B_SW /**< PAL ISO 14443-3B SW Component is included. */
#define NXPBUILD__PHPAL_I14443P4A_SW /**< PAL ISO 14443-4A SW Component is included. */
#define NXPBUILD__PHPAL_I14443P4_SW /**< PAL ISO 14443-4 SW Component is included. */
//#define NXPBUILD__PHPAL_MIFARE_SW /**< PAL MIFARE SW Component is included */
//#define NXPBUILD__PHPAL_MIFARE_STUB /**< PAL MIFARE STUB Component is included */
//#define NXPBUILD__PHPAL_FELICA_SW /**< PAL Felica SW Component is included. */
#define NXPBUILD__PHPAL_SLI15693_SW /**< PAL SLI 15693 Component is included. */
#ifndef NXPBUILD__PHHAL_HW_PN7640
#define NXPBUILD__PHPAL_I18000P3M3_SW /**< PAL ISO 18000p3m3 Component is included. */
#endif /* NXPBUILD__PHHAL_HW_PN7640 */
#ifdef NXPBUILD__PHHAL_HW_RC663 /**< If FE HAL is RC663, then include EPC UID PAL as required, otherwise exclude. */
// #define NXPBUILD__PHPAL_EPCUID_SW /**< PAL EPC UID SW Component is included. */
#endif
//#define NXPBUILD__PHPAL_I18092MPI_SW /**< PAL ISO18092 (P2P) SW Component is included. */
#ifndef NXPBUILD__PHHAL_HW_RC663 /**< If FE HAL is RC663, then exclude ISO14443 Card Mode PAL & ISO18092 Target Mode PAL, otherwise include as required. */
// #define NXPBUILD__PHPAL_I14443P4MC_SW /**< PAL ISO 14443-4 Card Mode SW Component is included. */
// #define NXPBUILD__PHPAL_I18092MT_SW /**< PAL ISO 18092 Target Mode SW Component is included. */
#endif /* NXPBUILD__PHHAL_HW_RC663 */
/*********************************************************************************************************************************************************************************/
#define NXPBUILD__PHAC_DISCLOOP_SW /**< Discovery Loop Activity SW Component is included. */
#ifdef NXPBUILD__PHAC_DISCLOOP_SW /**< If DiscLoop SW Component is included, macros( & it's dependencies) to include/exclude SRC/DATA within Discloop is defined. */
#if defined (NXPBUILD__PHHAL_HW_PN5180) || \
defined (NXPBUILD__PHHAL_HW_PN5190) || \
defined (NXPBUILD__PHHAL_HW_RC663) || \
defined (NXPBUILD__PHHAL_HW_PN7462AU) || \
defined (NXPBUILD__PHHAL_HW_PN7642)
// #define NXPBUILD__PHAC_DISCLOOP_LPCD /**< SRC to enable LPCD is included. */
#endif
#ifdef NXPBUILD__PHPAL_I14443P3A_SW
#define NXPBUILD__PHAC_DISCLOOP_TYPEA_I3P3_TAGS /**< SRC/DATA to Detect/CollRes/Activate cards such as MFC, MFUL, MFP SL1 etc is included. */
// #define NXPBUILD__PHAC_DISCLOOP_TYPEA_JEWEL_TAGS /**< SRC/DATA to Detect cards such as NFC Forum T1T, Topaz/Jewel is included. */
#if defined(NXPBUILD__PHPAL_I14443P4A_SW) && defined(NXPBUILD__PHPAL_I14443P4_SW)
#define NXPBUILD__PHAC_DISCLOOP_TYPEA_I3P4_TAGS /**< SRC/DATA to Detect cards such as MFDF, MFP, T4AT NFC Forum Tag or Type A EMVCo is included. */
#endif
#endif /* NXPBUILD__PHPAL_I14443P3A_SW */
#if defined(NXPBUILD__PHPAL_I14443P3A_SW) && defined(NXPBUILD__PHPAL_I18092MPI_SW)
#define NXPBUILD__PHAC_DISCLOOP_TYPEA_P2P_TAGS /**< SRC/DATA to Detect Peer Passive Type A P2P Target mode devices is included. */
#endif
#ifndef NXPBUILD__PHHAL_HW_RC663
#ifdef NXPBUILD__PHPAL_I18092MPI_SW
#define NXPBUILD__PHAC_DISCLOOP_TYPEA_P2P_ACTIVE /**< SRC/DATA to Detect Peer Active Type A P2P Target mode devices is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEF212_P2P_ACTIVE/**< SRC/DATA to Detect Peer Active Type F212 P2P Target mode devices is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEF424_P2P_ACTIVE/**< SRC/DATA to Detect Peer Active Type F424 P2P Target mode devices is included. */
#endif /* NXPBUILD__PHPAL_I18092MPI_SW */
#endif /* NXPBUILD__PHHAL_HW_RC663 */
#ifdef NXPBUILD__PHPAL_FELICA_SW
#define NXPBUILD__PHAC_DISCLOOP_FELICA_TAGS /**< SRC/DATA to Detect FeliCa Cards is included. */
#ifdef NXPBUILD__PHPAL_I18092MPI_SW
#define NXPBUILD__PHAC_DISCLOOP_TYPEF_P2P_TAGS /**< SRC/DATA to Detect Peer Passive Type F P2P Target mode devices is included. */
#endif /* NXPBUILD__PHPAL_I18092MPI_SW */
#endif /* NXPBUILD__PHPAL_FELICA_SW */
#ifdef NXPBUILD__PHPAL_I14443P3B_SW
#define NXPBUILD__PHAC_DISCLOOP_TYPEB_I3P3B_TAGS /**< SRC/DATA to Detect Type B Cards that operate at Layer3 level is included */
#ifdef NXPBUILD__PHPAL_I14443P4_SW
#define NXPBUILD__PHAC_DISCLOOP_TYPEB_I3P4B_TAGS /**< SRC/DATA to Detect Type B Cards such as NFC Forum Type 4 Tags, EMVCo Type B Cards etc is included */
#endif /* NXPBUILD__PHPAL_I14443P4_SW */
#endif /* NXPBUILD__PHPAL_I14443P3B_SW */
#ifdef NXPBUILD__PHPAL_SLI15693_SW
#define NXPBUILD__PHAC_DISCLOOP_TYPEV_TAGS /**< SRC/DATA to Detect Type V Cards such as ICODE SLI/SLIX/SLI2/Tesa Cards is included*/
#endif /* NXPBUILD__PHPAL_SLI15693_SW */
#ifdef NXPBUILD__PHPAL_I18000P3M3_SW
#define NXPBUILD__PHAC_DISCLOOP_I18000P3M3_TAGS /**< SRC/DATA to Detect ICODE ILT Cards such as SMARTRAC StackIt Cards is included*/
#endif /* NXPBUILD__PHPAL_I18000P3M3_SW */
#ifndef NXPBUILD__PHHAL_HW_RC663 /**< If FE HAL is RC663, target mode is not supported at all, hence exclude those SRC, otherwise include as required */
#ifdef NXPBUILD__PHHAL_HW_TARGET
#define NXPBUILD__PHAC_DISCLOOP_TYPEA_TARGET_PASSIVE /**< SRC to Initialize Type A passive listen config and subsequently call HAL AutoColl is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEA_TARGET_ACTIVE /**< SRC to Initialize Type A active listen config and subsequently call HAL AutoColl is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEF212_TARGET_PASSIVE/**< SRC to Initialize Type F212 passive listen config and subsequently call HAL AutoColl is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEF212_TARGET_ACTIVE /**< SRC to Initialize Type F212 active listen config and subsequently call HAL AutoColl is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEF424_TARGET_PASSIVE/**< SRC to Initialize Type F424 passive listen config and subsequently call HAL AutoColl is included. */
#define NXPBUILD__PHAC_DISCLOOP_TYPEF424_TARGET_ACTIVE /**< SRC to Initialize Type F424 active listen config and subsequently call HAL AutoColl is included. */
#endif /* NXPBUILD__PHHAL_HW_TARGET */
#endif
#endif /* NXPBUILD__PHAC_DISCLOOP_SW */
/*********************************************************************************************************************************************************************************/
#define NXPBUILD__PHNFCLIB /**< Simplified API Interface, If enabling this the entry point should be this component in the application */
#ifdef NXPBUILD__PHNFCLIB
#define NXPBUILD__PHNFCLIB_PROFILES /**< Simplified API Interface to provide different profiles to user. */
#ifdef NXPBUILD__PHNFCLIB_PROFILES
#define NXPBUILD__PH_NFCLIB_ISO /* Enable the ISO profile of Simplified API */
//#define NXPBUILD__PH_NFCLIB_EMVCO /* Enable the EMVCO profile of Simplified API */
//#define NXPBUILD__PH_NFCLIB_NFC /* Enable the NFC profile of Simplified API */
#endif /* NXPBUILD__PHNFCLIB_PROFILES */
#endif /* NXPBUILD__PHNFCLIB */
#ifdef NXPBUILD__PH_NFCLIB_ISO
#ifdef NXPBUILD__PHAC_DISCLOOP_TYPEA_I3P3_TAGS
#define NXPBUILD__PH_NFCLIB_ISO_MFC
#define NXPBUILD__PH_NFCLIB_ISO_MFUL
#endif /* NXPBUILD__PHAC_DISCLOOP_TYPEA_I3P3_TAGS */
#ifdef NXPBUILD__PHAC_DISCLOOP_TYPEA_I3P4_TAGS
#define NXPBUILD__PH_NFCLIB_ISO_MFDF
#endif /* NXPBUILD__PHAC_DISCLOOP_TYPEA_I3P4_TAGS */
#ifdef NXPBUILD__PHAC_DISCLOOP_TYPEV_TAGS
#define NXPBUILD__PH_NFCLIB_ISO_15693
#endif /* NXPBUILD__PHAC_DISCLOOP_TYPEV_TAGS*/
#ifdef NXPBUILD__PHAC_DISCLOOP_I18000P3M3_TAGS
#define NXPBUILD__PH_NFCLIB_ISO_18000
#endif /* NXPBUILD__PHAC_DISCLOOP_I18000P3M3_TAGS */
#endif /* NXPBUILD__PH_NFCLIB_ISO*/
/*********************************************************************************************************************************************************************************/
//#define NXPBUILD__PH_CIDMANAGER_SW /**< CID Manager SW Component is included. */
#define NXPBUILD__PH_KEYSTORE_SW /**< SW KeyStore Component is included. */
#if defined(NXPBUILD__PHHAL_HW_RC663) && !defined(NXPBUILD__PH_KEYSTORE_SW)
// #define NXPBUILD__PH_KEYSTORE_RC663 /**< RC663 KeyStore Component is included. */
#endif
//#define NXPBUILD__PH_NDA_MFDF /**< MIFARE DESFire contactless IC */
//#define NXPBUILD__PH_CRYPTOSYM_SW /**< Crypto Symbols SW Component is included. */
//#define NXPBUILD__PH_CRYPTORNG_SW /**< Crypto RNG SW Component is included. */
/*********************************************************************************************************************************************************************************/
#ifdef NXPBUILD__PHPAL_FELICA_SW
#define NXPBUILD__PHAL_FELICA_SW /**< AL FeliCa SW Component is included */
#endif /* NXPBUILD__PHPAL_FELICA_SW */
#ifdef NXPBUILD__PHPAL_MIFARE_SW
#if defined(NXPBUILD__PH_KEYSTORE_SW) || defined(NXPBUILD__PH_KEYSTORE_RC663)
#define NXPBUILD__PHAL_MFC_SW /**< AL MIFARE Classic contactless IC SW Component is included */
#endif
#define NXPBUILD__PHAL_MFUL_SW /**< AL Mifare Ultrlight SW Component is included */
#define NXPBUILD__PHAL_MFDF_SW /**< AL Mifare DesFire SW Component is included */
// #define NXPBUILD__PHAL_MFNTAG42XDNA_SW /**< AL MIFARE Prime Ntag42XDna contactless IC SW Component is included */
#endif /* NXPBUILD__PHPAL_MIFARE_SW */
//#define NXPBUILD__PHAL_T1T_SW /**< AL Type T1 Tag SW Component is included */
#ifdef NXPBUILD__PHPAL_SLI15693_SW
//#define NXPBUILD__PHAL_ICODE_SW /**< AL ICODE SW COMPONENT is included */
#endif /* NXPBUILD__PHPAL_SLI15693_SW */
//#define NXPBUILD__PHAL_TOP_SW /**< AL for TagOps Mapping SW Component is included.Required for NDEF operations */
#ifdef NXPBUILD__PHPAL_I18000P3M3_SW
#define NXPBUILD__PHAL_I18000P3M3_SW /**< AL ISO18000p3m3 SW Component is included */
#endif /* NXPBUILD__PHPAL_I18000P3M3_SW */
#ifdef NXPBUILD__PHPAL_I14443P4MC_SW
#if !defined(PH_OSAL_NULLOS)
#define NXPBUILD__PHCE_T4T_SW /**< AL HCE T2AT SW Component is included */
//#define NXPBUILD__PHCE_T4T_PROPRIETARY /**< SRC to handle HCE T4AT Proprietary Commands is included */
/*#define NXPBUILD__PHCE_T4T_EXT_NDEF */ /**< SRC to handle Extended NDEF Support as per T4T spec 3.0 is included */
#endif
#endif /* NXPBUILD__PHPAL_I14443P4MC_SW */
/* LLCP Components */
#if defined(NXPBUILD__PHPAL_I18092MPI_SW) || defined(NXPBUILD__PHPAL_I18092MT_SW)
#if !defined(PH_OSAL_NULLOS)
#define NXPBUILD__PHLN_LLCP_SW /**< Link LLCP SW Component is included */
#endif
#endif
/* SNEP components */
#ifdef NXPBUILD__PHLN_LLCP_SW
#define NXPBUILD__PHNP_SNEP_SW /**< Protocol SNEP SW Component is included */
#endif /* NXPBUILD__PHLN_LLCP_SW */
/* Enable/disable Debugging */
/*#define NXPBUILD__PH_DEBUG*/ /**< TODO: To be checked if required */
/** @}
* end of ph_NxpBuild
*/
#endif /* PH_NXPBUILD_APP_H_INC */

View File

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.crt.advproject.config.exe.debug.738429693">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.738429693" moduleId="org.eclipse.cdt.core.settings" name="DebugLPC1769">
<externalSettings />
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser" />
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser" />
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Debug build for LPC1769" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.debug.738429693" name="DebugLPC1769" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;${BuildArtifactFileName}&quot; ; arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileName}&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; ; #checksum -p ${TargetChip} -d &quot;${BuildArtifactFileBaseName}.bin&quot;" preannouncebuildStep="" prebuildStep="">
<folderInfo id="com.crt.advproject.config.exe.debug.738429693." name="/" resourcePath="">
<toolChain errorParsers="" id="com.crt.advproject.toolchain.exe.debug.1486081712" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug.1843864105" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug" />
<builder autoBuildTarget="all" buildPath="${workspace_loc:/Nfcrdlib_SimplifiedAPI_ISO_mcux}/DebugLPC1769" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="false" enabledIncrementalBuild="true" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="com.crt.advproject.builder.exe.debug.1999230655" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="4" stopOnErr="true" superClass="com.crt.advproject.builder.exe.debug" />
<tool id="com.crt.advproject.cpp.exe.debug.1675794760" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.debug">
<option id="com.crt.advproject.cpp.hdrlib.987982536" name="Library headers" superClass="com.crt.advproject.cpp.hdrlib" useByScannerDiscovery="false" />
<option id="com.crt.advproject.cpp.fpu.946823702" name="Floating point" superClass="com.crt.advproject.cpp.fpu" useByScannerDiscovery="false" />
</tool>
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.crt.advproject.gcc.exe.debug.441056261" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug">
<option id="com.crt.advproject.gcc.arch.2038529659" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="false" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated" />
<option id="com.crt.advproject.gcc.thumb.1879215782" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="com.crt.advproject.gcc.hdrlib.1573272634" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" useByScannerDiscovery="false" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.1031812916" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__USE_LPCOPEN" />
<listOptionValue builtIn="false" value="PH_OSAL_FREERTOS" />
<listOptionValue builtIn="false" value="PHDRIVER_LPC1769PN5180_BOARD" />
<listOptionValue builtIn="false" value="CORE_M3" />
<listOptionValue builtIn="false" value="__REDLIB__" />
<listOptionValue builtIn="false" value="DEBUG" />
<listOptionValue builtIn="false" value="__CODE_RED" />
<listOptionValue builtIn="false" value="NXPBUILD_CUSTOMER_HEADER_INCLUDED" />
</option>
<option id="gnu.c.compiler.option.misc.other.1808498294" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing" valueType="string" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.1447616415" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/boards}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/cfg}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/src/LPCOpen}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1769/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_175x_6x/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/phOsal/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/phOsal/src/NullOs/portable}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/intfs}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/FreeRTOS/include}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/FreeRTOS/portable/GCC/ARM_CM3}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/NxpNfcRdLib/intfs}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/NxpNfcRdLib/types}&quot;" />
</option>
<option id="com.crt.advproject.gcc.exe.debug.option.optimization.level.1462160401" name="Optimization Level" superClass="com.crt.advproject.gcc.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.c.optimization.level.none" valueType="enumerated" />
<option id="gnu.c.compiler.option.optimization.flags.1896036638" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" useByScannerDiscovery="false" value="-fno-common" valueType="string" />
<option id="com.crt.advproject.gcc.fpu.691032358" name="Floating point" superClass="com.crt.advproject.gcc.fpu" useByScannerDiscovery="false" />
<inputType id="com.crt.advproject.compiler.input.2072034180" superClass="com.crt.advproject.compiler.input" />
</tool>
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.gas.exe.debug.195416239" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug">
<option id="com.crt.advproject.gas.arch.1516616708" name="Architecture" superClass="com.crt.advproject.gas.arch" useByScannerDiscovery="false" value="com.crt.advproject.gas.target.cm3" valueType="enumerated" />
<option id="com.crt.advproject.gas.thumb.1086643798" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="gnu.both.asm.option.flags.crt.1087979149" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" useByScannerDiscovery="false" value="-c -x assembler-with-cpp -D__REDLIB__ -DDEBUG -D__CODE_RED" valueType="string" />
<option id="com.crt.advproject.gas.hdrlib.1325832230" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" useByScannerDiscovery="false" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.271612405" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/boards}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/src/LPCOpen}&quot;" />
</option>
<option id="com.crt.advproject.gas.fpu.1149229203" name="Floating point" superClass="com.crt.advproject.gas.fpu" useByScannerDiscovery="false" />
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1801449973" superClass="cdt.managedbuild.tool.gnu.assembler.input" />
<inputType id="com.crt.advproject.assembler.input.130007865" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input" />
</tool>
<tool id="com.crt.advproject.link.cpp.exe.debug.1699166564" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.debug">
<option id="com.crt.advproject.link.cpp.hdrlib.232747821" name="Library" superClass="com.crt.advproject.link.cpp.hdrlib" />
<option id="com.crt.advproject.link.cpp.fpu.574179284" name="Floating point" superClass="com.crt.advproject.link.cpp.fpu" />
</tool>
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="com.crt.advproject.link.exe.debug.1588930933" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug">
<option id="com.crt.advproject.link.arch.1578797841" name="Architecture" superClass="com.crt.advproject.link.arch" useByScannerDiscovery="false" value="com.crt.advproject.link.target.cm3" valueType="enumerated" />
<option id="com.crt.advproject.link.thumb.679646300" name="Thumb mode" superClass="com.crt.advproject.link.thumb" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="com.crt.advproject.link.script.1873584681" name="Linker script" superClass="com.crt.advproject.link.script" useByScannerDiscovery="false" value="&quot;Nfcrdlib_SimplifiedAPI_ISO_mcux_DebugLPC1769.ld&quot;" valueType="string" />
<option id="com.crt.advproject.link.manage.2029705108" name="Manage linker script" superClass="com.crt.advproject.link.manage" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="gnu.c.link.option.nostdlibs.1573423382" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.other.894197808" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="-Map=&quot;${BuildArtifactFileBaseName}.map&quot;" />
<listOptionValue builtIn="false" value="--gc-sections" />
<listOptionValue builtIn="false" value="-print-memory-usage" />
</option>
<option id="com.crt.advproject.link.gcc.hdrlib.1038701104" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" useByScannerDiscovery="false" value="com.crt.advproject.gcc.link.hdrlib.codered.semihost" valueType="enumerated" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.libs.1404070710" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="lpc_board_nxp_lpcxpresso_1769" />
<listOptionValue builtIn="false" value="lpc_chip_175x_6x" />
<listOptionValue builtIn="false" value="lpc_board_nxp_lpcxpresso_1769" />
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.paths.1117236282" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1769/${ConfigName}}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_175x_6x/${ConfigName}}&quot;" />
</option>
<option id="com.crt.advproject.link.gcc.multicore.slave.1478492966" name="Multicore configuration" superClass="com.crt.advproject.link.gcc.multicore.slave" useByScannerDiscovery="false" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.crt.advproject.link.gcc.multicore.master.userobjs.1075299059" name="Slave Objects (not visible)" superClass="com.crt.advproject.link.gcc.multicore.master.userobjs" useByScannerDiscovery="false" valueType="userObjs" />
<option id="com.crt.advproject.link.memory.heapAndStack.1956862" name="Heap and Stack options" superClass="com.crt.advproject.link.memory.heapAndStack" useByScannerDiscovery="false" value="&amp;Heap:RAM2;Post Data;0x7800&amp;Stack:RAM2;End;Default" valueType="string" />
<option defaultValue="com.crt.advproject.heapAndStack.mcuXpressoStyle" id="com.crt.advproject.link.memory.heapAndStack.style.231295632" name="Heap and Stack placement" superClass="com.crt.advproject.link.memory.heapAndStack.style" useByScannerDiscovery="false" value="com.crt.advproject.heapAndStack.mcuXpressoStyle" valueType="enumerated" />
<option id="com.crt.advproject.link.memory.load.image.736634943" name="Plain load image" superClass="com.crt.advproject.link.memory.load.image" useByScannerDiscovery="false" value="false;" valueType="string" />
<option id="com.crt.advproject.link.memory.data.1191503572" name="Global data placement" superClass="com.crt.advproject.link.memory.data" useByScannerDiscovery="false" value="Default" valueType="string" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.crt.advproject.link.memory.sections.1474575243" name="Extra linker script input sections" superClass="com.crt.advproject.link.memory.sections" useByScannerDiscovery="false" valueType="stringList" />
<option id="com.crt.advproject.link.fpu.259033895" name="Floating point" superClass="com.crt.advproject.link.fpu" useByScannerDiscovery="false" />
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1400683781" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)" />
<additionalInput kind="additionalinput" paths="$(LIBS)" />
</inputType>
</tool>
<tool id="com.crt.advproject.tool.debug.debug.2099194084" name="MCU Debugger" superClass="com.crt.advproject.tool.debug.debug" />
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="NxpNfcRdLib/external|DAL/src/PN76xx|phOsal/src/NullOs/portable/phOsal_Port_PN76xx.c|FreeRTOS/portable/MemMang/heap_5.c|FreeRTOS/portable/MemMang/heap_4.c|FreeRTOS/portable/MemMang/heap_2.c|FreeRTOS/portable/MemMang/heap_1.c|FreeRTOS/portable/GCC/ARM_CM33_NTZ|FreeRTOS/portable/GCC/ARM_CM33|phOsal/src/NullOs/portable/phOsal_Port_PN74xxxx.c|phOsal/src/NullOs/portable/phOsal_Port_CM4.c|DAL/src/PN74xxxx|DAL/src/Linux|DAL/src/LinuxKernelSpi|DAL/src/KinetisSDK|PN7462AU|FreeRTOS/portable/GCC/ARM_CM4F|FreeRTOS/portable/IAR|FreeRTOS/heap_2.c|FreeRTOS/portable/RVDS|Listings|FreeRTOS/heap_4.c|FreeRTOS/portable/GCC/ARM_CM0|RTE|Objects" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="" />
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.exe.release.1937522126">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.release.1937522126" moduleId="org.eclipse.cdt.core.settings" name="ReleaseLPC1769">
<externalSettings />
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser" />
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser" />
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Release build for LPC1769" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.release.1937522126" name="ReleaseLPC1769" parent="com.crt.advproject.config.exe.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;${BuildArtifactFileName}&quot; ; arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileName}&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; ; #checksum -p ${TargetChip} -d &quot;${BuildArtifactFileBaseName}.bin&quot;" preannouncebuildStep="" prebuildStep="">
<folderInfo id="com.crt.advproject.config.exe.release.1937522126." name="/" resourcePath="">
<toolChain errorParsers="" id="com.crt.advproject.toolchain.exe.release.1928829209" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.release.2090157066" name="ARM-based MCU (Release)" superClass="com.crt.advproject.platform.exe.release" />
<builder buildPath="${workspace_loc:/Nfcrdlib_SimplifiedAPI_ISO_mcux}/ReleaseLPC1769" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="com.crt.advproject.builder.exe.release.1898996649" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="4" stopOnErr="true" superClass="com.crt.advproject.builder.exe.release" />
<tool id="com.crt.advproject.cpp.exe.release.1462497514" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.release" />
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.crt.advproject.gcc.exe.release.1168945892" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.release">
<option id="com.crt.advproject.gcc.arch.1463213212" name="Architecture" superClass="com.crt.advproject.gcc.arch" useByScannerDiscovery="false" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated" />
<option id="com.crt.advproject.gcc.thumb.2061992551" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="com.crt.advproject.gcc.hdrlib.1061577489" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" useByScannerDiscovery="false" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.1267004570" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__USE_LPCOPEN" />
<listOptionValue builtIn="false" value="PH_OSAL_FREERTOS" />
<listOptionValue builtIn="false" value="PHDRIVER_LPC1769PN5180_BOARD" />
<listOptionValue builtIn="false" value="CORE_M3" />
<listOptionValue builtIn="false" value="__REDLIB__" />
<listOptionValue builtIn="false" value="NDEBUG" />
<listOptionValue builtIn="false" value="__CODE_RED" />
<listOptionValue builtIn="false" value="NXPBUILD_CUSTOMER_HEADER_INCLUDED" />
</option>
<option id="gnu.c.compiler.option.misc.other.621662607" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing" valueType="string" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.134119550" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1769/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_175x_6x/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/phOsal/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/intfs}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/FreeRTOS/include}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/FreeRTOS/portable/GCC/ARM_CM3}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/NxpNfcRdLib/intfs}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/NxpNfcRdLib/types}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/boards}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/cfg}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/src/LPCOpen}&quot;" />
</option>
<option id="com.crt.advproject.gcc.exe.release.option.debugging.level.1205843079" name="Debug Level" superClass="com.crt.advproject.gcc.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated" />
<option id="com.crt.advproject.gcc.exe.release.option.optimization.level.458027837" name="Optimization Level" superClass="com.crt.advproject.gcc.exe.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.c.optimization.level.more" valueType="enumerated" />
<option id="gnu.c.compiler.option.optimization.flags.1517142822" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" useByScannerDiscovery="false" value="-fno-common" valueType="string" />
<inputType id="com.crt.advproject.compiler.input.1796147734" superClass="com.crt.advproject.compiler.input" />
</tool>
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.gas.exe.release.1048353269" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.release">
<option id="com.crt.advproject.gas.arch.1452097257" name="Architecture" superClass="com.crt.advproject.gas.arch" useByScannerDiscovery="false" value="com.crt.advproject.gas.target.cm3" valueType="enumerated" />
<option id="com.crt.advproject.gas.thumb.135501847" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="gnu.both.asm.option.flags.crt.41346378" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" useByScannerDiscovery="false" value="-c -x assembler-with-cpp -D__REDLIB__ -DDEBUG -D__CODE_RED" valueType="string" />
<option id="com.crt.advproject.gas.hdrlib.857984932" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" useByScannerDiscovery="false" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.756974938" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/boards}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/inc}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/DAL/src/LPCOpen}&quot;" />
</option>
<option id="com.crt.advproject.gas.debug.642039656" name="Debug level" superClass="com.crt.advproject.gas.debug" useByScannerDiscovery="false" value="com.crt.advproject.gas.debug.max" valueType="enumerated" />
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.240598307" superClass="cdt.managedbuild.tool.gnu.assembler.input" />
<inputType id="com.crt.advproject.assembler.input.1384245654" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input" />
</tool>
<tool id="com.crt.advproject.link.cpp.exe.release.711816230" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.release" />
<tool command="arm-none-eabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="com.crt.advproject.link.exe.release.529723089" name="MCU Linker" superClass="com.crt.advproject.link.exe.release">
<option id="com.crt.advproject.link.arch.1757428378" name="Architecture" superClass="com.crt.advproject.link.arch" useByScannerDiscovery="false" value="com.crt.advproject.link.target.cm3" valueType="enumerated" />
<option id="com.crt.advproject.link.thumb.1237791813" name="Thumb mode" superClass="com.crt.advproject.link.thumb" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="com.crt.advproject.link.script.1624117829" name="Linker script" superClass="com.crt.advproject.link.script" useByScannerDiscovery="false" value="&quot;Nfcrdlib_SimplifiedAPI_ISO_mcux_ReleaseLPC1769.ld&quot;" valueType="string" />
<option id="com.crt.advproject.link.manage.678781648" name="Manage linker script" superClass="com.crt.advproject.link.manage" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option id="gnu.c.link.option.nostdlibs.1019371875" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs" useByScannerDiscovery="false" value="true" valueType="boolean" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.other.1835124151" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="-Map=&quot;${BuildArtifactFileBaseName}.map&quot;" />
<listOptionValue builtIn="false" value="--gc-sections" />
<listOptionValue builtIn="false" value="-print-memory-usage" />
</option>
<option id="com.crt.advproject.link.gcc.hdrlib.1512129224" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" useByScannerDiscovery="false" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.libs.1114724768" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="lpc_board_nxp_lpcxpresso_1769" />
<listOptionValue builtIn="false" value="lpc_chip_175x_6x" />
<listOptionValue builtIn="false" value="lpc_board_nxp_lpcxpresso_1769" />
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.link.option.paths.413182449" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/FreeRTOS_Library/${ConfigName}}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NxpNfcRdLib/${ConfigName}}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1769/${ConfigName}}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_175x_6x/${ConfigName}}&quot;" />
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.crt.advproject.link.gcc.multicore.master.userobjs.1516294606" name="Slave Objects (not visible)" superClass="com.crt.advproject.link.gcc.multicore.master.userobjs" useByScannerDiscovery="false" valueType="userObjs" />
<option id="com.crt.advproject.link.gcc.multicore.slave.1904410427" name="Multicore configuration" superClass="com.crt.advproject.link.gcc.multicore.slave" useByScannerDiscovery="false" />
<option id="com.crt.advproject.link.memory.heapAndStack.917905695" name="Heap and Stack options" superClass="com.crt.advproject.link.memory.heapAndStack" useByScannerDiscovery="false" value="&amp;Heap:RAM2;Post Data;0x7800&amp;Stack:RAM2;End;Default" valueType="string" />
<option id="com.crt.advproject.link.memory.load.image.510858146" name="Plain load image" superClass="com.crt.advproject.link.memory.load.image" useByScannerDiscovery="false" value="false;" valueType="string" />
<option id="com.crt.advproject.link.memory.data.1424434002" name="Global data placement" superClass="com.crt.advproject.link.memory.data" useByScannerDiscovery="false" value="Default" valueType="string" />
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.crt.advproject.link.memory.sections.900961328" name="Extra linker script input sections" superClass="com.crt.advproject.link.memory.sections" useByScannerDiscovery="false" valueType="stringList" />
<option defaultValue="com.crt.advproject.heapAndStack.mcuXpressoStyle" id="com.crt.advproject.link.memory.heapAndStack.style.1385093608" name="Heap and Stack placement" superClass="com.crt.advproject.link.memory.heapAndStack.style" useByScannerDiscovery="false" value="com.crt.advproject.heapAndStack.mcuXpressoStyle" valueType="enumerated" />
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1551529060" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)" />
<additionalInput kind="additionalinput" paths="$(LIBS)" />
</inputType>
</tool>
<tool id="com.crt.advproject.tool.debug.release.67457642" name="MCU Debugger" superClass="com.crt.advproject.tool.debug.release" />
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="NxpNfcRdLib/external|DAL/src/PN76xx|phOsal/src/NullOs/portable/phOsal_Port_PN76xx.c|FreeRTOS/portable/MemMang/heap_5.c|FreeRTOS/portable/MemMang/heap_4.c|FreeRTOS/portable/MemMang/heap_2.c|FreeRTOS/portable/MemMang/heap_1.c|FreeRTOS/portable/GCC/ARM_CM33_NTZ|FreeRTOS/portable/GCC/ARM_CM33|phOsal/src/NullOs/portable/phOsal_Port_PN74xxxx.c|phOsal/src/NullOs/portable/phOsal_Port_CM4.c|DAL/src/PN74xxxx|DAL/src/Linux|DAL/src/LinuxKernelSpi|DAL/src/KinetisSDK|PN7462AU|FreeRTOS/portable/GCC/ARM_CM4F|FreeRTOS/portable/IAR|FreeRTOS/heap_2.c|FreeRTOS/portable/RVDS|Listings|FreeRTOS/heap_4.c|FreeRTOS/portable/GCC/ARM_CM0|RTE|Objects" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="" />
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="Nfcrdlib_SimplifiedAPI_ISO_mcux.com.crt.advproject.projecttype.exe.1454558793" name="Executable" projectType="com.crt.advproject.projecttype.exe" />
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders" />
<storageModule moduleId="com.crt.config">
<projectStorage>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;TargetConfig&gt;
&lt;Properties property_2="LPC175x_6x_512.cfx" property_3="NXP" property_4="LPC1769" property_count="5" version="100300"/&gt;
&lt;infoList vendor="NXP"&gt;
&lt;info chip="LPC1769" flash_driver="LPC175x_6x_512.cfx" match_id="0x26113F37" name="LPC1769" package="lpc17_lqfp100.xml" stub="crt_emu_cm3_nxp"&gt;
&lt;chip&gt;
&lt;name&gt;LPC1769&lt;/name&gt;
&lt;family&gt;LPC17xx&lt;/family&gt;
&lt;vendor&gt;NXP (formerly Philips)&lt;/vendor&gt;
&lt;reset board="None" core="Real" sys="Real"/&gt;
&lt;clock changeable="TRUE" freq="20MHz" is_accurate="TRUE"/&gt;
&lt;memory can_program="true" id="Flash" is_ro="true" type="Flash"/&gt;
&lt;memory id="RAM" type="RAM"/&gt;
&lt;memory id="Periph" is_volatile="true" type="Peripheral"/&gt;
&lt;memoryInstance derived_from="Flash" id="MFlash512" location="0x0" size="0x80000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamLoc32" location="0x10000000" size="0x8000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB32" location="0x2007c000" size="0x8000"/&gt;
&lt;prog_flash blocksz="0x1000" location="0" maxprgbuff="0x1000" progwithcode="TRUE" size="0x10000"/&gt;
&lt;prog_flash blocksz="0x8000" location="0x10000" maxprgbuff="0x1000" progwithcode="TRUE" size="0x70000"/&gt;
&lt;/chip&gt;
&lt;processor&gt;
&lt;name gcc_name="cortex-m3"&gt;Cortex-M3&lt;/name&gt;
&lt;family&gt;Cortex-M&lt;/family&gt;
&lt;/processor&gt;
&lt;/info&gt;
&lt;/infoList&gt;
&lt;/TargetConfig&gt;</projectStorage>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="DebugPN7462AU" />
<configuration configurationName="ReleaseLPC1769" />
<configuration configurationName="ReleaseFRDMK82F" />
<configuration configurationName="DebugLPC1769" />
<configuration configurationName="ReleaseLPC11u68" />
<configuration configurationName="ReleasePN7462AU" />
<configuration configurationName="DebugFRDMK82F" />
<configuration configurationName="DebugLPC11u68" />
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets" />
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693;com.crt.advproject.config.exe.debug.738429693.;com.crt.advproject.gas.exe.debug.195416239;com.crt.advproject.assembler.input.130007865">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.release.1937522126;com.crt.advproject.config.exe.release.1937522126.;com.crt.advproject.gas.exe.release.1048353269;com.crt.advproject.assembler.input.1384245654">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.220921952;com.crt.advproject.config.exe.debug.738429693.220921952.;com.crt.advproject.gcc.exe.debug.1738457537;com.crt.advproject.compiler.input.499521784">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1005230124;com.crt.advproject.config.exe.debug.738429693.1005230124.;com.crt.advproject.gas.exe.debug.208499822;com.crt.advproject.assembler.input.2022898564">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693;com.crt.advproject.config.exe.debug.738429693.;com.crt.advproject.gcc.exe.debug.441056261;com.crt.advproject.compiler.input.2072034180">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1005230124;com.crt.advproject.config.exe.debug.738429693.1005230124.;com.crt.advproject.gcc.exe.debug.389726388;com.crt.advproject.compiler.input.582051863">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.220921952;com.crt.advproject.config.exe.debug.738429693.220921952.;com.crt.advproject.gas.exe.debug.2061746971;com.crt.advproject.assembler.input.247838150">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1919901899;com.crt.advproject.config.exe.debug.738429693.1919901899.;com.crt.advproject.gcc.exe.debug.1324832425;com.crt.advproject.compiler.input.948108591">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.release.1937522126;com.crt.advproject.config.exe.release.1937522126.;com.crt.advproject.gcc.exe.release.1168945892;com.crt.advproject.compiler.input.1796147734">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.2136922694;com.crt.advproject.config.exe.debug.738429693.2136922694.;com.crt.advproject.gas.exe.debug.1621446990;com.crt.advproject.assembler.input.1563510425">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1901050014.552907120.1244196556;com.crt.advproject.config.exe.debug.738429693.1901050014.552907120.1244196556.;com.crt.advproject.gcc.exe.debug.2096326115;com.crt.advproject.compiler.input.130002557">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.2055349940;com.crt.advproject.config.exe.debug.738429693.2055349940.;com.crt.advproject.gas.exe.debug.276849776;com.crt.advproject.assembler.input.546293037">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1919901899;com.crt.advproject.config.exe.debug.738429693.1919901899.;com.crt.advproject.gas.exe.debug.1683083229;com.crt.advproject.assembler.input.893302735">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.2136922694;com.crt.advproject.config.exe.debug.738429693.2136922694.;com.crt.advproject.gcc.exe.debug.450971579;com.crt.advproject.compiler.input.924909202">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1901050014.1118237901;com.crt.advproject.config.exe.debug.738429693.1901050014.1118237901.;com.crt.advproject.gcc.exe.debug.543427012;com.crt.advproject.compiler.input.22295576">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1901050014.552907120.1244196556;com.crt.advproject.config.exe.debug.738429693.1901050014.552907120.1244196556.;com.crt.advproject.gas.exe.debug.1422642401;com.crt.advproject.assembler.input.247750416">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.2055349940;com.crt.advproject.config.exe.debug.738429693.2055349940.;com.crt.advproject.gcc.exe.debug.1017520906;com.crt.advproject.compiler.input.518769024">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.738429693.1901050014.1118237901;com.crt.advproject.config.exe.debug.738429693.1901050014.1118237901.;com.crt.advproject.gas.exe.debug.2074064778;com.crt.advproject.assembler.input.306441941">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile" />
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="com.nxp.mcuxpresso.core.datamodels">
<sdkName>SDK_2.x_FRDM-K82F</sdkName>
<sdkVersion>2.6.0</sdkVersion>
</storageModule>
</cproject>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Nfcrdlib_SimplifiedAPI_ISO_mcux</name>
<comment></comment>
<projects>
<project>FreeRTOS</project>
<project>lpc_board_nxp_lpcxpresso_1769</project>
<project>lpc_chip_175x_6x</project>
<project>NxpNfcRdLib</project>
<project>SDK_2.x_FRDM-K82F</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>com.nxp.mcuxpresso.core.datamodels.sdkNature</nature>
</natures>
<linkedResources>
<link>
<name>DAL</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/Platform/DAL</locationURI>
</link>
<link>
<name>FreeRTOS</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/RTOS/FreeRTOS</locationURI>
</link>
<link>
<name>Nfcrdlib_SimplifiedAPI_ISO.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Nfcrdlib_SimplifiedApi_ISO.c</locationURI>
</link>
<link>
<name>NxpNfcRdLib</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/NxpNfcRdLib</locationURI>
</link>
<link>
<name>PN7462AU</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/Platform/PN7462AU</locationURI>
</link>
<link>
<name>Readme.txt</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Readme.txt</locationURI>
</link>
<link>
<name>intfs</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/intfs</locationURI>
</link>
<link>
<name>phOsal</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>src</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/src</locationURI>
</link>
<link>
<name>phOsal/inc</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/RTOS/phOsal/inc</locationURI>
</link>
<link>
<name>phOsal/src</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/RTOS/phOsal/src</locationURI>
</link>
</linkedResources>
</projectDescription>

View File

@ -0,0 +1,493 @@
//*****************************************************************************
// LPC175x_6x Microcontroller Startup code for use with LPCXpresso IDE
//
// Version : 140114
//*****************************************************************************
//
// Copyright(C) NXP Semiconductors, 2014
// All rights reserved.
//
// Software that is described herein is for illustrative purposes only
// which provides customers with programming information regarding the
// LPC products. This software is supplied "AS IS" without any warranties of
// any kind, and NXP Semiconductors and its licensor disclaim any and
// all warranties, express or implied, including all implied warranties of
// merchantability, fitness for a particular purpose and non-infringement of
// intellectual property rights. NXP Semiconductors assumes no responsibility
// or liability for the use of the software, conveys no license or rights under any
// patent, copyright, mask work right, or any other intellectual property rights in
// or to any products. NXP Semiconductors reserves the right to make changes
// in the software without notification. NXP Semiconductors also makes no
// representation or warranty that such application will be suitable for the
// specified use without further testing or modification.
//
// Permission to use, copy, modify, and distribute this software and its
// documentation is hereby granted, under NXP Semiconductors' and its
// licensor's relevant copyrights in the software, without fee, provided that it
// is used in conjunction with NXP Semiconductors microcontrollers. This
// copyright, permission, and disclaimer notice must appear in all copies of
// this code.
//*****************************************************************************
#include <ph_Status.h>
#include <cr_section_macros.h>
#include <NXP/crp.h>
#ifdef DEBUG
# define VT_IMAGE_LENGTH 0x76706b64U
#else /* DEBUG */
# define VT_IMAGE_LENGTH 0xFFFFFFFFU
#endif /* DEBUG */
#if defined (__cplusplus)
#ifdef __REDLIB__
#error Redlib does not support C++
#else
//*****************************************************************************
//
// The entry point for the C++ library startup
//
//*****************************************************************************
extern "C" {
extern void __libc_init_array(void);
}
#endif
#endif
#define WEAK __attribute__ ((weak))
#define ALIAS(f) __attribute__ ((weak, alias (#f)))
__CRP const unsigned int CRP_WORD = CRP_NO_CRP;
//*****************************************************************************
#if defined (__cplusplus)
extern "C" {
#endif
//*****************************************************************************
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
// Declaration of external SystemInit function
void SystemInit(void);
extern void Board_SystemInit(void);
extern void Chip_SystemInit(void);
extern void SystemCoreClockUpdate(void);
#endif
//*****************************************************************************
//
// Forward declaration of the default handlers. These are aliased.
// When the application defines a handler (with the same name), this will
// automatically take precedence over these weak definitions
//
//*****************************************************************************
void ResetISR(void);
WEAK void NMI_Handler(void);
//WEAK void HardFault_Handler(void);
WEAK void MemManage_Handler(void);
WEAK void BusFault_Handler(void);
WEAK void UsageFault_Handler(void);
WEAK void SVC_Handler(void);
WEAK void DebugMon_Handler(void);
WEAK void PendSV_Handler(void);
WEAK void SysTick_Handler(void);
WEAK void IntDefaultHandler(void);
/* The prototype shows it is a naked function - in effect this is just an
assembly function. */
void HardFault_Handler( void ) __attribute__( ( naked ) );
//*****************************************************************************
//
// Forward declaration of the specific IRQ handlers. These are aliased
// to the IntDefaultHandler, which is a 'forever' loop. When the application
// defines a handler (with the same name), this will automatically take
// precedence over these weak definitions
//
//*****************************************************************************
void WDT_IRQHandler(void) ALIAS(IntDefaultHandler);
void TIMER0_IRQHandler(void) ALIAS(IntDefaultHandler);
void TIMER1_IRQHandler(void) ALIAS(IntDefaultHandler);
void TIMER2_IRQHandler(void) ALIAS(IntDefaultHandler);
void TIMER3_IRQHandler(void) ALIAS(IntDefaultHandler);
void UART0_IRQHandler(void) ALIAS(IntDefaultHandler);
void UART1_IRQHandler(void) ALIAS(IntDefaultHandler);
void UART2_IRQHandler(void) ALIAS(IntDefaultHandler);
void UART3_IRQHandler(void) ALIAS(IntDefaultHandler);
void PWM1_IRQHandler(void) ALIAS(IntDefaultHandler);
void I2C0_IRQHandler(void) ALIAS(IntDefaultHandler);
void I2C1_IRQHandler(void) ALIAS(IntDefaultHandler);
void I2C2_IRQHandler(void) ALIAS(IntDefaultHandler);
void SPI_IRQHandler(void) ALIAS(IntDefaultHandler);
void SSP0_IRQHandler(void) ALIAS(IntDefaultHandler);
void SSP1_IRQHandler(void) ALIAS(IntDefaultHandler);
void PLL0_IRQHandler(void) ALIAS(IntDefaultHandler);
void RTC_IRQHandler(void) ALIAS(IntDefaultHandler);
void EINT0_IRQHandler(void) ALIAS(IntDefaultHandler);
void EINT1_IRQHandler(void) ALIAS(IntDefaultHandler);
void EINT2_IRQHandler(void) ALIAS(IntDefaultHandler);
void CLIF_IRQHandler(void) ALIAS(IntDefaultHandler);
void ADC_IRQHandler(void) ALIAS(IntDefaultHandler);
void BOD_IRQHandler(void) ALIAS(IntDefaultHandler);
void USB_IRQHandler(void) ALIAS(IntDefaultHandler);
void CAN_IRQHandler(void) ALIAS(IntDefaultHandler);
void DMA_IRQHandler(void) ALIAS(IntDefaultHandler);
void I2S_IRQHandler(void) ALIAS(IntDefaultHandler);
#if defined (__USE_LPCOPEN)
void ETH_IRQHandler(void) ALIAS(IntDefaultHandler);
#else
void ENET_IRQHandler(void) ALIAS(IntDefaultHandler);
#endif
void RIT_IRQHandler(void) ALIAS(IntDefaultHandler);
void MCPWM_IRQHandler(void) ALIAS(IntDefaultHandler);
void QEI_IRQHandler(void) ALIAS(IntDefaultHandler);
void PLL1_IRQHandler(void) ALIAS(IntDefaultHandler);
void USBActivity_IRQHandler(void) ALIAS(IntDefaultHandler);
void CANActivity_IRQHandler(void) ALIAS(IntDefaultHandler);
void UART4_IRQHandler(void) ALIAS(IntDefaultHandler);
void SSP2_IRQHandler(void) ALIAS(IntDefaultHandler);
void LCD_IRQHandler(void) ALIAS(IntDefaultHandler);
void GPIO_IRQHandler(void) ALIAS(IntDefaultHandler);
void PWM0_IRQHandler(void) ALIAS(IntDefaultHandler);
void EEPROM_IRQHandler(void) ALIAS(IntDefaultHandler);
//*****************************************************************************
//
// The entry point for the application.
// __main() is the entry point for Redlib based applications
// main() is the entry point for Newlib based applications
//
//*****************************************************************************
#if defined (__REDLIB__)
extern void __main(void);
#endif
extern int main(void);
//*****************************************************************************
//
// External declaration for the pointer to the stack top from the Linker Script
//
//*****************************************************************************
extern void _vStackTop(void);
//*****************************************************************************
#if defined (__cplusplus)
} // extern "C"
#endif
//*****************************************************************************
//
// The vector table.
// This relies on the linker script to place at correct location in memory.
//
//*****************************************************************************
extern void (* const g_pfnVectors[])(void);
__attribute__ ((section(".isr_vector")))
void (* const g_pfnVectors[])(void) = {
// Core Level - CM3
&_vStackTop, // The initial stack pointer
ResetISR, // The reset handler
NMI_Handler, // The NMI handler
HardFault_Handler, // The hard fault handler
MemManage_Handler, // The MPU fault handler
BusFault_Handler, // The bus fault handler
UsageFault_Handler, // The usage fault handler
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
SVC_Handler, // SVCall handler
DebugMon_Handler, // Debug monitor handler
0, // Reserved
PendSV_Handler, // The PendSV handler
SysTick_Handler, // The SysTick handler
// Chip Level - LPC17
WDT_IRQHandler, // 16, 0x40 - WDT
TIMER0_IRQHandler, // 17, 0x44 - TIMER0
TIMER1_IRQHandler, // 18, 0x48 - TIMER1
TIMER2_IRQHandler, // 19, 0x4c - TIMER2
TIMER3_IRQHandler, // 20, 0x50 - TIMER3
UART0_IRQHandler, // 21, 0x54 - UART0
UART1_IRQHandler, // 22, 0x58 - UART1
UART2_IRQHandler, // 23, 0x5c - UART2
UART3_IRQHandler, // 24, 0x60 - UART3
PWM1_IRQHandler, // 25, 0x64 - PWM1
I2C0_IRQHandler, // 26, 0x68 - I2C0
I2C1_IRQHandler, // 27, 0x6c - I2C1
I2C2_IRQHandler, // 28, 0x70 - I2C2
SPI_IRQHandler, // 29, 0x74 - SPI
SSP0_IRQHandler, // 30, 0x78 - SSP0
SSP1_IRQHandler, // 31, 0x7c - SSP1
PLL0_IRQHandler, // 32, 0x80 - PLL0 (Main PLL)
RTC_IRQHandler, // 33, 0x84 - RTC
EINT0_IRQHandler, // 34, 0x88 - EINT0
EINT1_IRQHandler, // 35, 0x8c - EINT1
EINT2_IRQHandler, // 36, 0x90 - EINT2
CLIF_IRQHandler, // 37, 0x94 - EINT3 (Used for CLIF IRQ)
ADC_IRQHandler, // 38, 0x98 - ADC
BOD_IRQHandler, // 39, 0x9c - BOD
USB_IRQHandler, // 40, 0xA0 - USB
CAN_IRQHandler, // 41, 0xa4 - CAN
DMA_IRQHandler, // 42, 0xa8 - GP DMA
I2S_IRQHandler, // 43, 0xac - I2S
#if defined (__USE_LPCOPEN)
ETH_IRQHandler, // 44, 0xb0 - Ethernet
#else
ENET_IRQHandler, // 44, 0xb0 - Ethernet
#endif
RIT_IRQHandler, // 45, 0xb4 - RITINT
MCPWM_IRQHandler, // 46, 0xb8 - Motor Control PWM
QEI_IRQHandler, // 47, 0xbc - Quadrature Encoder
PLL1_IRQHandler, // 48, 0xc0 - PLL1 (USB PLL)
USBActivity_IRQHandler, // 49, 0xc4 - USB Activity interrupt to wakeup
CANActivity_IRQHandler, // 50, 0xc8 - CAN Activity interrupt to wakeup
UART4_IRQHandler, //; 51 UART4
SSP2_IRQHandler, //; 52 SSP2
LCD_IRQHandler, //; 53 LCD
GPIO_IRQHandler, //; 54 GPIO
PWM0_IRQHandler , //; 55 PWM0
EEPROM_IRQHandler, //; 56 EEPROM
(void *)VT_IMAGE_LENGTH, //; 57 VT Checksum for CRC Check of Vector Table.
};
//*****************************************************************************
// Functions to carry out the initialization of RW and BSS data sections. These
// are written as separate functions rather than being inlined within the
// ResetISR() function in order to cope with MCUs with multiple banks of
// memory.
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void data_init(unsigned int romstart, unsigned int start, unsigned int len) {
unsigned int *pulDest = (unsigned int*) start;
unsigned int *pulSrc = (unsigned int*) romstart;
unsigned int loop;
for (loop = 0; loop < len; loop = loop + 4)
*pulDest++ = *pulSrc++;
}
__attribute__ ((section(".after_vectors")))
void bss_init(unsigned int start, unsigned int len) {
unsigned int *pulDest = (unsigned int*) start;
unsigned int loop;
for (loop = 0; loop < len; loop = loop + 4)
*pulDest++ = 0;
}
//*****************************************************************************
// The following symbols are constructs generated by the linker, indicating
// the location of various points in the "Global Section Table". This table is
// created by the linker via the Code Red managed linker script mechanism. It
// contains the load address, execution address and length of each RW data
// section and the execution and length of each BSS (zero initialized) section.
//*****************************************************************************
extern unsigned int __data_section_table;
extern unsigned int __data_section_table_end;
extern unsigned int __bss_section_table;
extern unsigned int __bss_section_table_end;
//*****************************************************************************
// Reset entry point for your code.
// Sets up a simple runtime environment and initializes the C/C++
// library.
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void
ResetISR(void) {
//
// Copy the data sections from flash to SRAM.
//
unsigned int LoadAddr, ExeAddr, SectionLen;
unsigned int *SectionTableAddr;
// Load base address of Global Section Table
SectionTableAddr = &__data_section_table;
// Copy the data sections from flash to SRAM.
while (SectionTableAddr < &__data_section_table_end) {
LoadAddr = *SectionTableAddr++;
ExeAddr = *SectionTableAddr++;
SectionLen = *SectionTableAddr++;
data_init(LoadAddr, ExeAddr, SectionLen);
}
// At this point, SectionTableAddr = &__bss_section_table;
// Zero fill the bss segment
while (SectionTableAddr < &__bss_section_table_end) {
ExeAddr = *SectionTableAddr++;
SectionLen = *SectionTableAddr++;
bss_init(ExeAddr, SectionLen);
}
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
SystemInit();
#endif
#if defined (__cplusplus)
//
// Call C++ library initialisation
//
__libc_init_array();
#endif
#if defined (__REDLIB__)
// Call the Redlib library, which in turn calls main()
__main() ;
#else
main();
#endif
//
// main() shouldn't return, but if it does, we'll just enter an infinite loop
//
while (1) {
;
}
}
/* Set up and initialize hardware prior to call to main */
void SystemInit(void)
{
unsigned int *pSCB_VTOR = (unsigned int *) 0xE000ED08;
#if defined(__IAR_SYSTEMS_ICC__)
extern void *__vector_table;
*pSCB_VTOR = (unsigned int) &__vector_table;
#elif defined(__CODE_RED)
*pSCB_VTOR = (unsigned int) &g_pfnVectors;
#elif defined(__ARMCC_VERSION)
extern void *__Vectors;
*pSCB_VTOR = (unsigned int) &__Vectors;
#endif
#if defined(__FPU_PRESENT) && __FPU_PRESENT == 1
fpuInit();
#endif
#if defined(NO_BOARD_LIB)
/* Chip specific SystemInit */
Chip_SystemInit();
#else
/* Setup system clocking and muxing */
Board_SystemInit();
#endif
/* Update system core clock rate. */
SystemCoreClockUpdate();
}
//*****************************************************************************
// Default exception handlers. Override the ones here by defining your own
// handler routines in your application code.
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void NMI_Handler(void)
{ while(1) {}
}
/* The fault handler implementation calls a function called
prvGetRegistersFromStack(). */
__attribute__ ((section(".after_vectors")))
void HardFault_Handler(void)
{
/* Use assembly to pick up date, but feed to C Code. */
__asm( ".syntax divided\n"
"MOVS R0, #4 \n"
"MOV R1, LR \n"
"TST R0, R1 \n"
"BEQ _MSP \n"
"MRS R0, PSP \n"
"B HardFault_HandlerC \n"
"_MSP: \n"
"MRS R0, MSP \n"
"B HardFault_HandlerC \n"
".syntax divided\n") ;
__asm(".syntax unified");
}
__attribute__ ((section(".after_vectors")))
void HardFault_HandlerC(
unsigned long *args)
{
volatile unsigned long cm_r0;
volatile unsigned long cm_r1;
volatile unsigned long cm_r2;
volatile unsigned long cm_r3;
volatile unsigned long cm_r12;
volatile unsigned long cm_lr;
volatile unsigned long cm_pc;
volatile unsigned long cm_psr;
//if (((uint32_t) args < PH_RAM_MEM_END)&& ( (uint32_t)args > PH_RAM_MEM_START))
//0x10000000 -- 0x8000
//0x2007c000 -- 0x8000
{
cm_r0 = ((unsigned long)args[0]);
cm_r1 = ((unsigned long)args[1]);
cm_r2 = ((unsigned long)args[2]);
cm_r3 = ((unsigned long)args[3]);
cm_r12 = ((unsigned long)args[4]);
cm_lr = ((unsigned long)args[5]);
cm_pc = ((unsigned long)args[6]);
cm_psr = ((unsigned long)args[7]);
PH_UNUSED_VARIABLE(cm_r0);
PH_UNUSED_VARIABLE(cm_r1);
PH_UNUSED_VARIABLE(cm_r2);
PH_UNUSED_VARIABLE(cm_r3);
PH_UNUSED_VARIABLE(cm_r12);
PH_UNUSED_VARIABLE(cm_lr);
PH_UNUSED_VARIABLE(cm_pc);
PH_UNUSED_VARIABLE(cm_psr);
}
/* Break into the debugger */
__asm("BKPT #0\n");
while (1)
{
__asm("wfi\n");
}
}
__attribute__ ((section(".after_vectors")))
void MemManage_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void BusFault_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void UsageFault_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void SVC_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void DebugMon_Handler(void)
{ while(1) {}
}
__attribute__ ((section(".after_vectors")))
void PendSV_Handler(void)
{ while(1) {}
}
//*****************************************************************************
//
// Processor ends up here if an unexpected interrupt occurs or a specific
// handler is not present in the application code.
//
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void IntDefaultHandler(void)
{ while(1) {}
}

View File

@ -0,0 +1,238 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2016-2022 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Reference application file for ISO15693 interface of Simplified API
* $Author: NXP $
* $Revision: $ (v07.10.00)
* $Date: $
*
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
extern phNfcLib_Transmit_t phNfcLib_TransmitInput;
extern phNfcLib_PeerInfo_t PeerInfo;
extern uint8_t bMoreDataAvailable;
extern uint16_t wNumberofBytes;
extern uint8_t bDataBuffer[256];
/*
* This application is to demonstrate the usage of simplified API related to ISO15693
* The application reaches to this point only after the activation of a card with ISO 15693
* interface is done. Transmit api is used to perform any command exchange with the card and
* receive api is used to get back the out data.
* In case the user already knows the UID of the card he wants to talk to he can directly call these api
*/
uint32_t NfcLib_ISO15693_Reference_app()
{
uint32_t dwStatus;
uint8_t bData[16] = {0xA0, 0xA0, 0xA0, 0xA0,
0xA0, 0xA0, 0xA0, 0xA0,
0xA0, 0xA0, 0xA0, 0xA0,
0xA0, 0xA0, 0xA0, 0xA0};
/*
* Copying the UID of the card on which the user wish to perform the operation.
* For the reference purpose we will be talking to the card at index value 0
*/
memcpy(phNfcLib_TransmitInput.phNfcLib_ISO15693.bUid, PeerInfo.uTi.uInitiator.tIso15693.TagIndex[0].pUid, 8);
do
{
/*************************************************************************************************************************
****************************************READ SINGLE BLOCK ***************************************************************
*************************************************************************************************************************/
/* The parameters for Read Single Block are the option and the Block number user wants to read */
/* Option is kept #PH_OFF for refer purpose and the block number to Read is Block - 5 */
READ_SINGLEBLOCK(PH_OFF, 5)
/* Finally the command has to be sent, the command for 15693 will be send in addressed mode */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* This length paramter is used only when apart from the command, there is some data to be send*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Card does not support Read single block... \n");
break;
}
/* wNumberofBytes has to be reset before every receive */
wNumberofBytes = 256;
/*The data received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
/* wNumberofBytes will vary depending upon the card layout*/
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
/* The status should be success and the number of bytes received should be 4 for Most NXP cards
* The expectation of the number of bytes can be modified for different cards
*/
if((dwStatus != PH_NFCLIB_STATUS_SUCCESS) ||(wNumberofBytes != 4))
{
break;
}
DEBUG_PRINTF("\nRead Data from Block 5 is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
****************************************WRITE SINGLE BLOCK **************************************************************
*************************************************************************************************************************/
/* The parameters for Write Single Block are the option, the Block number user wants to write and the data */
/* Option is kept #PH_OFF for refer purpose and the block number to write is Block - 5 */
WRITE_SINGLEBLOCK(PH_OFF, 5, &bData[0])
/* Finally the command has to be sent, the command for 15693 will be send in addressed mode */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x04 /* While writing a block we will be writing 4 bytes of data*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Card does not support Write single block... \n");
break;
}
/*************************************************************************************************************************
****************************************READ MULTIPLE BLOCK **************************************************************
*************************************************************************************************************************/
/* The parameters for Read Multiple Block are the option, the starting Block number and the no of blocks to read*/
/* Option is kept #PH_OFF for refer purpose, the starting block number is 5 and the no of blocks is 4*/
READ_MULTIPLEBLOCK(PH_OFF, 5, 4)
/* Finally the command has to be sent, the command for 15693 will be send in addressed mode */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* This length paramter is used only when apart from the command, there is some data to be send*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Card does not support Read Multiple block... \n");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The data received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
/* wNumberofBytes will vary depending upon the card layout*/
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
/* The status should be success and the number of bytes received should be 4 * numofblocks for Most NXP cards
* The expectation of the number of bytes can be modified for different cards
*/
if((dwStatus != PH_NFCLIB_STATUS_SUCCESS) ||(wNumberofBytes != 16))
{
break;
}
DEBUG_PRINTF("\nRead Data from Block 5 to 8 is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
*****************************************GET SYSTEM INFORMATION *********************************************************
*************************************************************************************************************************/
/* Get System Information takes no parameter and returns back the System Information */
GET_SYSTEMINFORMATION()
/* Finally the command has to be sent, the command for 15693 will be send in addressed mode */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* This length parameter is used only when apart from the command, there is some data to be send*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Card does not support GET SYSTEM INFORMATION... \n");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The System Information received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
/* The status should be success */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
break;
}
DEBUG_PRINTF("\nSystem Information is ");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
************************************GET MULTIPLE BLOCK SECURITY STATUS **************************************************
*************************************************************************************************************************/
/* The parameters for Get Multiple Block security Status are the starting block nad the no of blocks whose status to read*/
/* Starting block is 9 which is already locked and no of blocks is 4 */
GET_MULTIPLEBLOCKSECURITYSTATUS(9, 4)
/* Finally the command has to be sent, the command for 15693 will be send in addressed mode */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* This length parameter is used only when apart from the command, there is some data to be send*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Card does not support GET MULTIPLE BLOCK SECURITY STATUS... \n");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The System Information received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
/* The status should be success */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
break;
}
DEBUG_PRINTF("\nSecurity status for block 9 to 12 is ");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
}while(0);
return dwStatus;
}

View File

@ -0,0 +1,189 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2016-2022 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Reference application file for ISO18000 interface of Simplified API
* $Author: NXP $
* $Revision: $ (v07.10.00)
* $Date: $
*
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
extern phNfcLib_Transmit_t phNfcLib_TransmitInput;
extern phNfcLib_PeerInfo_t PeerInfo;
extern uint8_t bMoreDataAvailable;
extern uint16_t wNumberofBytes;
extern uint8_t bDataBuffer[256];
#define NFCLIB_I18000P3M3_REQRN_USE_HANDLE 0x01U /**< Use given Handle for ReqRn command. */
#define NFCLIB_I18000P3M3_AC_NO_COVER_CODING 0x00U /**< Do not use cover coding, send plain passwords. */
#define NFCLIB_I18000P3M3_AC_USE_COVER_CODING 0x01U /**< Use cover coding to diversify passwords. */
uint32_t NfcLib_ISO18000p3m3_Reference_app()
{
uint32_t dwStatus;
uint8_t bWordPtr = 0x00;
uint8_t bData[8] = {0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A};
uint8_t bPassword[4] = {0x00, 0x00, 0x00, 0x00}; /* Default Paasword */
uint8_t bHandle[2] = {0x00, 0x00}; /* Invalid Handle */
phNfcLib_TransmitInput.phNfcLib_ISO18000.wUiiMaskLength = PeerInfo.uTi.uInitiator.tIso18000_3_3.TagIndex[0].wUiiLength;
phNfcLib_TransmitInput.phNfcLib_ISO18000.pUii = PeerInfo.uTi.uInitiator.tIso18000_3_3.TagIndex[0].pUii;
do
{
/*************************************************************************************************************************
********************************************************WRITE************************************************************
*************************************************************************************************************************/
/* Write is performed with Using cover coding on user membank(0x03) from the start of membank */
I18000_WRITE(NFCLIB_I18000P3M3_AC_USE_COVER_CODING, 0x03, &bWordPtr, 0x00, &bData[0])
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x2 /* A word is of 2 bytes*/
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Performing Write Operation to user Membank failed, Membank may be locked.. \n");
break;
}
/*************************************************************************************************************************
*******************************************************READ**************************************************************
*************************************************************************************************************************/
/* READ wants to perform Read on Membank 0x03 which is a user memory, from the start of the user memory thus ptr and ptr length
* as 0x00 and total no of words as 1
*/
I18000_READ(0x03, &bWordPtr, 0x00, 0x01)
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* This length paramter is used only when apart from the command, there is some data to be send*/
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Read Operation of User Membank failed, Membank may be locked... \n");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The data received over the above command can be retrieved by calling the receive will be same as above write */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
break;
}
DEBUG_PRINTF("\nData Read from the ISO File is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
******************************************************BLOCK WRITE*********************************************************
*************************************************************************************************************************/
/* Block write is a optional command please check the card's spec regarding support */
/* BLOCK_WRITE is being performed on User Membank(0x03), from the start of the Mmebank and for ICode ILT-M one block is 2 words */
I18000_BLOCKWRITE(0x03, &bWordPtr, 0x00, 2, &bData[0])
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x4 /* Since ICode ILT-M supports maximum 2 word block write*/
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF("\nCard Does not support Block Write");
break;
}
/*************************************************************************************************************************
********************************************************ACCESS************************************************************
*************************************************************************************************************************/
/* Access is performed with cover coding and default password */
I18000_ACCESS(PH_NFCLIB_18000P3M3_AC_USE_COVER_CODING, &bPassword[0])
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* No data to be send apart from command*/
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF("\nAccess Operation Failed, use factory default card");
break;
}
/*************************************************************************************************************************
******************************************************REQ RN*************************************************************
*************************************************************************************************************************/
/* REQRN can here be performed only with handle option */
I18000_REQRN(NFCLIB_I18000P3M3_REQRN_USE_HANDLE)
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* No data to be send apart from command*/
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF("\nReqRN failed");
break;
}
/*************************************************************************************************************************
**********************************************************ACK************************************************************
*************************************************************************************************************************/
/* ACK takes no parameter and sends the ack with the Handle */
I18000_ACK()
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* No data to be send */
);
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Performing Ack Operation failed... \n");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The data received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
DEBUG_PRINTF("\nUII Data Received is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
******************************************************SET HANDLE**********************************************************
*************************************************************************************************************************/
/* Set Handle is to provide the handle to the data params */
I18000_SETHANDLE(&bHandle[0])
/* Finally the command has to be sent */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* No data to be send apart from command*/
);
/**************************************************************************************************************************/
}while(0);
return dwStatus;
}

View File

@ -0,0 +1,93 @@
/*
* Copyright (c), NXP Semiconductors Bangalore / India
*
* (C)NXP Semiconductors
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
* particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Reference application file for Type A Layer 4 interface of Simplified API
* $Author: Ashish Pal (nxp79566) $
* $Revision: 5458 $ (v07.10.00)
* $Date: 2016-09-01 19:11:09 +0530 (Thu, 01 Sept 2016) $
*
* History:
*
*
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
extern phNfcLib_Transmit_t phNfcLib_TransmitInput;
extern phNfcLib_PeerInfo_t PeerInfo;
extern uint8_t bMoreDataAvailable;
extern uint16_t wNumberofBytes;
extern uint8_t bDataBuffer[256];
/*
* This application is to demonstrate the usage of simplified API related to Layer 4 Type A
* The application reaches to this point only after the activation of a card of Type B technology with
* or without ISO 14443-4 compatibilty is done. Transmit api is used to perform any command exchange with the card and
* receive api is used to get back the out data.
*/
uint32_t NfcLib_Layer4TypeA_Reference_app()
{
uint32_t dwStatus;
uint8_t bData[6] = {0};
do
{
/*************************************************************************************************************************
****************************************ISO 14443-4 EXCHANGE ************************************************************
*************************************************************************************************************************/
/*
* To perform ISO14443-4 layer exchange first form the command in bData
* this is get challenge command of ISO7816-4
*/
bData[0] = 0x00; /* INF1 */
bData[1] = 0x84; /* INF2 */
bData[2] = 0x00; /* INF3 */
bData[3] = 0x00; /* INF4 */
bData[4] = 0x08; /* INF4 */
phNfcLib_TransmitInput.phNfcLib_RawTransmit.pBuffer = &bData[0];
/* Finally the command has to be sent, the command for Type a with layer 4 compatibility will be send with ISO 7816 - 4*/
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x05 /* Length of this exchange is 5 bytes*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The data received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
/* wNumberofBytes will vary depending upon the card layout*/
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
DEBUG_PRINTF("\nReply to get challenge is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************/
}while(0);
return dwStatus;
}

View File

@ -0,0 +1,267 @@
/*
* Copyright (c), NXP Semiconductors Bangalore / India
*
* (C)NXP Semiconductors
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
* particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Reference application file for MFC interface of Simplified API
* $Author: Ashish Pal (nxp79566) $
* $Revision: 5458 $ (v07.10.00)
* $Date: 2016-09-01 19:11:09 +0530 (Thu, 01 Sept 2016) $
*
* History:
*
*
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
static uint8_t Message[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
extern phNfcLib_Transmit_t phNfcLib_TransmitInput;
extern phNfcLib_PeerInfo_t PeerInfo;
extern uint8_t bMoreDataAvailable;
extern uint16_t wNumberofBytes;
extern uint8_t bDataBuffer[256];
#define MFC_KEYA 0x0AU /**< MIFARE(R) Key A. */
#define MFC_KEYB 0x0BU /**< MIFARE(R) Key B. */
void framevalueblock(uint8_t* pValue, uint8_t bAddrData, uint8_t* pBlock);
/*
* This application is to demonstrate the usage of simplified API related to MIFARE Classic contactless IC 1K
* The application reaches to this point only after the activation of a Mifare Classic 1k card
* with Type A technology is done. Transmit api is used to perform any command exchange with the card and
* receive api is used to get back the out data.
*/
uint32_t NfcLib_MifareClassic_1k_Reference_app()
{
uint32_t dwStatus;
uint8_t pValue[4] = {0x10, 0x10, 0x10, 0x10};
uint8_t pBlock[16] = {0};
do
{
/*************************************************************************************************************************
*********************************************AUTHENTICATE ***************************************************************
*************************************************************************************************************************/
/* Authenticate takes the block number to authenticate which is 6 alng with the Key type as MFC_KEYA and key number as 1
* and key version as 0X00, Key no and Key version depends upon the keystore settings, authenticate is valid for one sector
*/
MFC_AUTHENTICATE(6, MFC_KEYA, 0x01, 0x00)
/* To Perform the Authentication of Block 6 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Authenticate Failed Please use the factory default card... \n");
break;
}
/*************************************************************************************************************************
***********************************************WRITE*********************************************************************
*************************************************************************************************************************/
/* Write takes the block number and data to write, the block number is 6 */
MFC_WRITE(6, &Message[0])
/* To perform the write operation of Block 6 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x10
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Write to the Mifare Classic Card Failed... \n");
break;
}
/*************************************************************************************************************************
***********************************************READ**********************************************************************
*************************************************************************************************************************/
/* Read takes the block number to Read */
MFC_READ(6)
/* To perform the read operation of Block 6 that was written above*/
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Read from the Mifare Classic Card Failed... \n");
break;
}
/* Has to be reset before every receive */
wNumberofBytes = 256;
/* To perform receive operation to get back the read data */
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
break;
}
DEBUG_PRINTF("\nRead Data from block 6 is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
*****************************************Creating Value Block************************************************************
*************************************************************************************************************************/
/* Api to frame the value block output pBlock is the value block */
framevalueblock(&pValue[0], 0x05, &pBlock[0]);
/* Making the Block 5 as the vALUE block */
MFC_WRITE(5, &pBlock[0])
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x10 /* 16 bytes of data to be written for value block */
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Creating Value block on Mifare Classic Failed... \n");
break;
}
/*************************************************************************************************************************
***********************************************INCREMENT*****************************************************************
*************************************************************************************************************************/
/* Now increment can be perfomed over this value block */
/* Value block to increment is 5 and then the data to be incremented */
MFC_INCREMENT(5, &pValue[0])
/* To perform the increment operation on block 5 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x4 /* the value block for increment just takes 4 byte */
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Increment to the value block failed... \n");
break;
}
/*************************************************************************************************************************
***********************************************TRANSFER******************************************************************
*************************************************************************************************************************/
/* Transfer takes the block number where the transfer buffer will be transmitted, this case it is 5 */
MFC_TRANSFER(5)
/* To perform the transfer operation to transfer data from transferred block to the block 5 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Increment Transfer Operation failed... \n");
break;
}
/*************************************************************************************************************************
***********************************************DECREMENT*****************************************************************
*************************************************************************************************************************/
/* Value block to decrement is 5 and then the data to be decremented */
MFC_DECREMENT(5, &pValue[0])
/* To perform the decrement operation on block 5 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x4 /* the value block for decrement just takes 4 byte */
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Decrement Operation failed... \n");
break;
}
/* Transfer takes the block number where the transfer buffer will be transmitted, this case it is 5 */
MFC_TRANSFER(5)
/* To perform the transfer operation to transfer data from transferred block to the block 5 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Decrement Transfer Operation failed... \n");
break;
}
/*************************************************************************************************************************
***********************************************RESTORE*****************************************************************
*************************************************************************************************************************/
/* Restore takes the block number from where the transfer buffer shalee be restored and is 5 here */
MFC_RESTORE(5)
/* To perform the restore operation */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Restore Operation failed... \n");
break;
}
/* Transfer takes the block number where the transfer buffer will be transmitted, this case it is 5 */
MFC_TRANSFER(5)
/* To perform the transfer operation to transfer data from transferred block to the block 5 */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Restore Transfer Operation failed... \n");
break;
}
}while(0);
return dwStatus;
}
/**
* API to generate value block
*/
void framevalueblock(uint8_t* pValue, uint8_t bAddrData, uint8_t* pBlock)
{
pBlock[0] = (uint8_t)pValue[0];
pBlock[1] = (uint8_t)pValue[1];
pBlock[2] = (uint8_t)pValue[2];
pBlock[3] = (uint8_t)pValue[3];
pBlock[4] = (uint8_t)~(uint8_t)pValue[0];
pBlock[5] = (uint8_t)~(uint8_t)pValue[1];
pBlock[6] = (uint8_t)~(uint8_t)pValue[2];
pBlock[7] = (uint8_t)~(uint8_t)pValue[3];
pBlock[8] = (uint8_t)pValue[0];
pBlock[9] = (uint8_t)pValue[1];
pBlock[10] = (uint8_t)pValue[2];
pBlock[11] = (uint8_t)pValue[3];
pBlock[12] = (uint8_t)bAddrData;
pBlock[13] = (uint8_t)~(uint8_t)bAddrData;
pBlock[14] = (uint8_t)bAddrData;
pBlock[15] = (uint8_t)~(uint8_t)bAddrData;
}

View File

@ -0,0 +1,129 @@
/*
* Copyright (c), NXP Semiconductors Bangalore / India
*
* (C)NXP Semiconductors
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
* particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Reference application file for MFUL interface of Simplified API
* $Author: Ashish Pal (nxp79566) $
* $Revision: 5458 $ (v07.10.00)
* $Date: 2016-09-01 19:11:09 +0530 (Thu, 01 Sept 2016) $
*
* History:
*
*
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
extern phNfcLib_Transmit_t phNfcLib_TransmitInput;
extern phNfcLib_PeerInfo_t PeerInfo;
extern uint8_t bMoreDataAvailable;
extern uint16_t wNumberofBytes;
extern uint8_t bDataBuffer[256];
/*
* This application is to demonstrate the usage of simplified API related to MIFARE Ultralight contactless IC
* The application reaches to this point only after the activation of a Mifare Ultralight card
* with Type A technology is done. Transmit api is used to perform any command exchange with the card and
* receive api is used to get back the out data.
*/
uint32_t NfcLib_MifareUltralight_Reference_app()
{
uint32_t dwStatus;
uint8_t bData[16] = {0xB0, 0xB0, 0xB0, 0xB0,
0xA0, 0xA0, 0xA0, 0xA0,
0xA0, 0xA0, 0xA0, 0xA0,
0xA0, 0xA0, 0xA0, 0xA0};
do
{
/*************************************************************************************************************************
*********************************************MFUL READ *****************************************************************
*************************************************************************************************************************/
/* MFUL read takes the page number to read, for refer purpose the page is page 5 */
MFUL_READ(5)
/* Transmit will execute the command the returned data can be read by Receive command */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x0 /* This length paramter is used only when apart from the command, there is some data to be send*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Read for Block 5 failed... \n");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/* To perform receive operation to get back the read data */
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
/* The status should be success and the number of bytes received should be 16 for MIFARE Ultralight cards */
if((dwStatus != PH_NFCLIB_STATUS_SUCCESS) ||(wNumberofBytes != 16))
{
break;
}
DEBUG_PRINTF("\nRead Data from block 5 is");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************
*********************************************MFUL WRITE******************************************************************
*************************************************************************************************************************/
/* MFUL write takes the page number and data to write, for refer purpose the page is page 5 */
MFUL_WRITE(5, &bData[0])
/* Transmit will execute the command */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x04 /* For Mifare Ultralight the size of a page to be written is 4 bytes */
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Write to Block 5 failed... \n");
break;
}
/*************************************************************************************************************************
*********************************************MFUL COMPATIBILITY WRITE ***************************************************
*************************************************************************************************************************/
/* MFUL Compatibilily write takes the page number and data to write, for refer purpose the page is page 6 */
/* the command is just to accomodate the Mifare PCD infrastructure */
MFUL_WRITE(6, &bData[0])
/* Transmit will execute the command */
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x10 /* But only 4 LSB will be actuallly written, 16 byte is only for compatibility purpose */
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF (" \n Compatibilty Write to Block 5 failed... \n");
break;
}
/*************************************************************************************************************************/
}while(0);
return dwStatus;
}

View File

@ -0,0 +1,95 @@
/*
* Copyright (c), NXP Semiconductors Bangalore / India
*
* (C)NXP Semiconductors
* All rights are reserved. Reproduction in whole or in part is
* prohibited without the written consent of the copyright owner.
* NXP reserves the right to make changes without notice at any time.
* NXP makes no warranty, expressed, implied or statutory, including but
* not limited to any implied warranty of merchantability or fitness for any
* particular purpose, or that the use will not infringe any third party patent,
* copyright or trademark. NXP must not be liable for any loss or damage
* arising from its use.
*/
/** \file
* Reference application file for Type B interface of Simplified API
* $Author: Ashish Pal (nxp79566) $
* $Revision: 5458 $ (v07.10.00)
* $Date: 2016-09-01 19:11:09 +0530 (Thu, 01 Sept 2016) $
*
* History:
*
*
*/
#include <Nfcrdlib_SimplifiedApi_ISO.h>
extern phNfcLib_Transmit_t phNfcLib_TransmitInput;
extern phNfcLib_PeerInfo_t PeerInfo;
extern uint8_t bMoreDataAvailable;
extern uint16_t wNumberofBytes;
extern uint8_t bDataBuffer[256];
/*
* This application is to demonstrate the usage of simplified API related to Type B
* The application reaches to this point only after the activation of a card of Type B technology with
* or without ISO 14443-4 compatibilty is done. Transmit api is used to perform any command exchange with the card and
* receive api is used to get back the out data.
*/
uint32_t NfcLib_TypeB_Reference_app()
{
uint32_t dwStatus;
uint8_t bData[6] = {0};
do
{
/*************************************************************************************************************************
****************************************ISO 14443-4 EXCHANGE ************************************************************
*************************************************************************************************************************/
/*
* To perform ISO14443-4 layer exchange first form the command in bData
* this is get challenge command of ISO7816-4
*/
bData[0] = 0x00; /* INF1 */
bData[1] = 0x84; /* INF2 */
bData[2] = 0x00; /* INF3 */
bData[3] = 0x00; /* INF4 */
bData[4] = 0x08; /* INF4 */
phNfcLib_TransmitInput.phNfcLib_RawTransmit.pBuffer = &bData[0];
/* Finally the command has to be sent, the command for Type B with layer 4 compatibility will be send with ISO 7816 - 4*/
dwStatus = phNfcLib_Transmit(&phNfcLib_TransmitInput,
0x05 /* Length of this exchange is 5 bytes*/
);
/* The status should be success, if not break from the application */
if(dwStatus != PH_NFCLIB_STATUS_SUCCESS)
{
DEBUG_PRINTF("\nGet Challenge failed");
break;
}
/* This parameter has to be reset before every receive */
wNumberofBytes = 256;
/*The data received over the above command can be retrieved by calling the receive */
/* wNumberofBytes first as input tells the max supported recieve size and then as out tells the actual number of data bytes received */
/* wNumberofBytes will vary depending upon the card layout*/
dwStatus = phNfcLib_Receive(&bDataBuffer[0],
&wNumberofBytes,
&bMoreDataAvailable
);
DEBUG_PRINTF("\nReply to get challenge is\n");
phApp_Print_Buff(&bDataBuffer[0], wNumberofBytes);
/*************************************************************************************************************************/
}while(0);
return dwStatus;
}

View File

@ -0,0 +1,375 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2020 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Example Source abstracting component data structure and code initialization and code specific to HW used in the examples
* This file shall be present in all examples. A customer does not need to touch/modify this file. This file
* purely depends on the phNxpBuild_Lpc.h or phNxpBuild_App.h
* The phAppInit.h externs the component data structures initialized here that is in turn included by the core examples.
* The core example shall not use any other variable defined here except the RdLib component data structures(as explained above)
* The RdLib component initialization requires some user defined data and function pointers.
* These are defined in the respective examples and externed here.
*
* Keystore and Crypto initialization needs to be handled by application.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#include "phApp_Init.h"
#include <phOsal.h>
/*******************************************************************************
** Function Declarations
*******************************************************************************/
/*******************************************************************************
** Function Definitions
*******************************************************************************/
/* Print technology being resolved */
void phApp_PrintTech(uint8_t TechType)
{
switch(TechType)
{
case PHAC_DISCLOOP_POS_BIT_MASK_A:
DEBUG_PRINTF ("\tResolving Type A... \n");
break;
case PHAC_DISCLOOP_POS_BIT_MASK_B:
DEBUG_PRINTF ("\tResolving Type B... \n");
break;
case PHAC_DISCLOOP_POS_BIT_MASK_F212:
DEBUG_PRINTF ("\tResolving Type F with baud rate 212... \n");
break;
case PHAC_DISCLOOP_POS_BIT_MASK_F424:
DEBUG_PRINTF ("\tResolving Type F with baud rate 424... \n");
break;
case PHAC_DISCLOOP_POS_BIT_MASK_V:
DEBUG_PRINTF ("\tResolving Type V... \n");
break;
default:
break;
}
}
/**
* This function will print buffer content
* \param *pBuff Buffer Reference
* \param num data size to be print
*/
void phApp_Print_Buff(uint8_t *pBuff, uint8_t num)
{
uint32_t i;
for(i = 0; i < num; i++)
{
DEBUG_PRINTF(" %02X",pBuff[i]);
}
}
/**
* This function will print Tag information
* \param pDataParams The discovery loop data parameters
* \param wNumberOfTags Total number of tags detected
* \param wTagsDetected Technology Detected
*/
void phApp_PrintTagInfo(phacDiscLoop_Sw_DataParams_t *pDataParams, uint16_t wNumberOfTags, uint16_t wTagsDetected)
{
#if defined(NXPBUILD__PHAC_DISCLOOP_TYPEA_TAGS) || \
defined(NXPBUILD__PHAC_DISCLOOP_TYPEA_P2P_ACTIVE) || \
defined(NXPBUILD__PHAC_DISCLOOP_TYPEB_TAGS) || \
defined(NXPBUILD__PHAC_DISCLOOP_TYPEF_TAGS) || \
defined(NXPBUILD__PHAC_DISCLOOP_TYPEV_TAGS) || \
defined(NXPBUILD__PHAC_DISCLOOP_I18000P3M3_TAGS)
uint8_t bIndex;
#endif
#if defined(NXPBUILD__PHAC_DISCLOOP_TYPEA_TAGS) || defined(NXPBUILD__PHAC_DISCLOOP_TYPEA_P2P_ACTIVE)
uint8_t bTagType;
#endif
#if defined(NXPBUILD__PHAC_DISCLOOP_TYPEA_TAGS) || defined(NXPBUILD__PHAC_DISCLOOP_TYPEA_P2P_ACTIVE)
if (PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_A))
{
if(pDataParams->sTypeATargetInfo.bT1TFlag)
{
DEBUG_PRINTF("\tTechnology : Type A");
DEBUG_PRINTF ("\n\t\tUID :");
phApp_Print_Buff( pDataParams->sTypeATargetInfo.aTypeA_I3P3[0].aUid,
pDataParams->sTypeATargetInfo.aTypeA_I3P3[0].bUidSize);
DEBUG_PRINTF ("\n\t\tSAK : 0x%02x",pDataParams->sTypeATargetInfo.aTypeA_I3P3[0].aSak);
DEBUG_PRINTF ("\n\t\tType: Type 1 Tag\n");
}
else
{
DEBUG_PRINTF("\tTechnology : Type A");
for(bIndex = 0; bIndex < wNumberOfTags; bIndex++)
{
DEBUG_PRINTF ("\n\t\tCard: %d",bIndex + 1);
DEBUG_PRINTF ("\n\t\tUID :");
phApp_Print_Buff( pDataParams->sTypeATargetInfo.aTypeA_I3P3[bIndex].aUid,
pDataParams->sTypeATargetInfo.aTypeA_I3P3[bIndex].bUidSize);
DEBUG_PRINTF ("\n\t\tSAK : 0x%02x",pDataParams->sTypeATargetInfo.aTypeA_I3P3[bIndex].aSak);
if ((pDataParams->sTypeATargetInfo.aTypeA_I3P3[bIndex].aSak & (uint8_t) ~0xFB) == 0)
{
/* Bit b3 is set to zero, [Digital] 4.8.2 */
/* Mask out all other bits except for b7 and b6 */
bTagType = (pDataParams->sTypeATargetInfo.aTypeA_I3P3[bIndex].aSak & 0x60);
bTagType = bTagType >> 5;
switch(bTagType)
{
case PHAC_DISCLOOP_TYPEA_TYPE2_TAG_CONFIG_MASK:
DEBUG_PRINTF ("\n\t\tType: Type 2 Tag\n");
break;
case PHAC_DISCLOOP_TYPEA_TYPE4A_TAG_CONFIG_MASK:
DEBUG_PRINTF ("\n\t\tType: Type 4A Tag\n");
break;
case PHAC_DISCLOOP_TYPEA_TYPE_NFC_DEP_TAG_CONFIG_MASK:
DEBUG_PRINTF ("\n\t\tType: P2P\n");
break;
case PHAC_DISCLOOP_TYPEA_TYPE_NFC_DEP_TYPE4A_TAG_CONFIG_MASK:
DEBUG_PRINTF ("\n\t\tType: Type NFC_DEP and 4A Tag\n");
break;
default:
break;
}
}
}
}
}
#endif
#ifdef NXPBUILD__PHAC_DISCLOOP_TYPEB_TAGS
if (PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_B))
{
DEBUG_PRINTF("\tTechnology : Type B");
/* Loop through all the Type B tags detected and print the Pupi */
for (bIndex = 0; bIndex < wNumberOfTags; bIndex++)
{
DEBUG_PRINTF ("\n\t\tCard: %d",bIndex + 1);
DEBUG_PRINTF ("\n\t\tUID :");
/* PUPI Length is always 4 bytes */
phApp_Print_Buff( pDataParams->sTypeBTargetInfo.aTypeB_I3P3[bIndex].aPupi, 0x04);
}
DEBUG_PRINTF("\n");
}
#endif /* NXPBUILD__PHAC_DISCLOOP_TYPEB_TAGS */
#ifdef NXPBUILD__PHAC_DISCLOOP_TYPEF_TAGS
if( PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_F212) ||
PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_F424))
{
DEBUG_PRINTF("\tTechnology : Type F");
/* Loop through all the type F tags and print the IDm */
for (bIndex = 0; bIndex < wNumberOfTags; bIndex++)
{
DEBUG_PRINTF ("\n\t\tCard: %d",bIndex + 1);
DEBUG_PRINTF ("\n\t\tUID :");
phApp_Print_Buff( pDataParams->sTypeFTargetInfo.aTypeFTag[bIndex].aIDmPMm,
PHAC_DISCLOOP_FELICA_IDM_LENGTH );
if ((pDataParams->sTypeFTargetInfo.aTypeFTag[bIndex].aIDmPMm[0] == 0x01) &&
(pDataParams->sTypeFTargetInfo.aTypeFTag[bIndex].aIDmPMm[1] == 0xFE))
{
/* This is Type F tag with P2P capabilities */
DEBUG_PRINTF ("\n\t\tType: P2P");
}
else
{
/* This is Type F T3T tag */
DEBUG_PRINTF ("\n\t\tType: Type 3 Tag");
}
if(pDataParams->sTypeFTargetInfo.aTypeFTag[bIndex].bBaud != PHAC_DISCLOOP_CON_BITR_212)
{
DEBUG_PRINTF ("\n\t\tBit Rate: 424\n");
}
else
{
DEBUG_PRINTF ("\n\t\tBit Rate: 212\n");
}
}
}
#endif /* NXPBUILD__PHAC_DISCLOOP_TYPEF_TAGS */
#ifdef NXPBUILD__PHAC_DISCLOOP_TYPEV_TAGS
if (PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_V))
{
DEBUG_PRINTF("\tTechnology : Type V / ISO 15693 / T5T");
/* Loop through all the Type V tags detected and print the UIDs */
for (bIndex = 0; bIndex < wNumberOfTags; bIndex++)
{
DEBUG_PRINTF ("\n\t\tCard: %d",bIndex + 1);
DEBUG_PRINTF ("\n\t\tUID :");
phApp_Print_Buff( pDataParams->sTypeVTargetInfo.aTypeV[bIndex].aUid, 0x08);
}
DEBUG_PRINTF("\n");
}
#endif /* NXPBUILD__PHAC_DISCLOOP_TYPEV_TAGS */
#ifdef NXPBUILD__PHAC_DISCLOOP_I18000P3M3_TAGS
if (PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_18000P3M3))
{
DEBUG_PRINTF("\tTechnology : ISO 18000p3m3 / EPC Gen2");
/* Loop through all the 18000p3m3 tags detected and print the UII */
for (bIndex = 0; bIndex < wNumberOfTags; bIndex++)
{
DEBUG_PRINTF("\n\t\tCard: %d",bIndex + 1);
DEBUG_PRINTF("\n\t\tUII :");
phApp_Print_Buff(
pDataParams->sI18000p3m3TargetInfo.aI18000p3m3[bIndex].aUii,
(pDataParams->sI18000p3m3TargetInfo.aI18000p3m3[bIndex].wUiiLength / 8));
}
DEBUG_PRINTF("\n");
}
#endif /* NXPBUILD__PHAC_DISCLOOP_I18000P3M3_TAGS */
}
/**
* This function will print Error information received from Reader Lib
* \param wStatus Error status
*/
void PrintErrorInfo(phStatus_t wStatus)
{
DEBUG_PRINTF("\n ErrorInfo Comp:");
switch(wStatus & 0xFF00)
{
case PH_COMP_BAL:
DEBUG_PRINTF("\t PH_COMP_BAL");
break;
case PH_COMP_HAL:
DEBUG_PRINTF("\t PH_COMP_HAL");
break;
case PH_COMP_PAL_ISO14443P3A:
DEBUG_PRINTF("\t PH_COMP_PAL_ISO14443P3A");
break;
case PH_COMP_PAL_ISO14443P3B:
DEBUG_PRINTF("\t PH_COMP_PAL_ISO14443P3B");
break;
case PH_COMP_PAL_ISO14443P4A:
DEBUG_PRINTF("\t PH_COMP_PAL_ISO14443P4A");
break;
case PH_COMP_PAL_ISO14443P4:
DEBUG_PRINTF("\t PH_COMP_PAL_ISO14443P4");
break;
case PH_COMP_PAL_FELICA:
DEBUG_PRINTF("\t PH_COMP_PAL_FELICA");
break;
case PH_COMP_PAL_EPCUID:
DEBUG_PRINTF("\t PH_COMP_PAL_EPCUID");
break;
case PH_COMP_PAL_SLI15693:
DEBUG_PRINTF("\t PH_COMP_PAL_SLI15693");
break;
case PH_COMP_PAL_I18000P3M3:
DEBUG_PRINTF("\t PH_COMP_PAL_I18000P3M3");
break;
case PH_COMP_PAL_I18092MPI:
DEBUG_PRINTF("\t PH_COMP_PAL_I18092MPI");
break;
case PH_COMP_PAL_I18092MT:
DEBUG_PRINTF("\t PH_COMP_PAL_I18092MT");
break;
case PH_COMP_PAL_I14443P4MC:
DEBUG_PRINTF("\t PH_COMP_PAL_I14443P4MC");
break;
case PH_COMP_AC_DISCLOOP:
DEBUG_PRINTF("\t PH_COMP_AC_DISCLOOP");
break;
case PH_COMP_OSAL:
DEBUG_PRINTF("\t PH_COMP_OSAL");
break;
default:
DEBUG_PRINTF("\t 0x%x",(wStatus & PH_COMPID_MASK));
break;
}
DEBUG_PRINTF("\t type:");
switch(wStatus & PH_ERR_MASK)
{
case PH_ERR_SUCCESS_INCOMPLETE_BYTE:
DEBUG_PRINTF("\t PH_ERR_SUCCESS_INCOMPLETE_BYTE");
break;
case PH_ERR_IO_TIMEOUT:
DEBUG_PRINTF("\t PH_ERR_IO_TIMEOUT");
break;
case PH_ERR_INTEGRITY_ERROR:
DEBUG_PRINTF("\t PH_ERR_INTEGRITY_ERROR");
break;
case PH_ERR_COLLISION_ERROR:
DEBUG_PRINTF("\t PH_ERR_COLLISION_ERROR");
break;
case PH_ERR_BUFFER_OVERFLOW:
DEBUG_PRINTF("\t PH_ERR_BUFFER_OVERFLOW");
break;
case PH_ERR_FRAMING_ERROR:
DEBUG_PRINTF("\t PH_ERR_FRAMING_ERROR");
break;
case PH_ERR_PROTOCOL_ERROR:
DEBUG_PRINTF("\t PH_ERR_PROTOCOL_ERROR");
break;
case PH_ERR_RF_ERROR:
DEBUG_PRINTF("\t PH_ERR_RF_ERROR");
break;
case PH_ERR_EXT_RF_ERROR:
DEBUG_PRINTF("\t PH_ERR_EXT_RF_ERROR");
break;
case PH_ERR_NOISE_ERROR:
DEBUG_PRINTF("\t PH_ERR_NOISE_ERROR");
break;
case PH_ERR_ABORTED:
DEBUG_PRINTF("\t PH_ERR_ABORTED");
break;
case PH_ERR_INTERNAL_ERROR:
DEBUG_PRINTF("\t PH_ERR_INTERNAL_ERROR");
break;
case PH_ERR_INVALID_DATA_PARAMS:
DEBUG_PRINTF("\t PH_ERR_INVALID_DATA_PARAMS");
break;
case PH_ERR_INVALID_PARAMETER:
DEBUG_PRINTF("\t PH_ERR_INVALID_PARAMETER");
break;
case PH_ERR_PARAMETER_OVERFLOW:
DEBUG_PRINTF("\t PH_ERR_PARAMETER_OVERFLOW");
break;
case PH_ERR_UNSUPPORTED_PARAMETER:
DEBUG_PRINTF("\t PH_ERR_UNSUPPORTED_PARAMETER");
break;
case PH_ERR_OSAL_ERROR:
DEBUG_PRINTF("\t PH_ERR_OSAL_ERROR");
break;
case PHAC_DISCLOOP_LPCD_NO_TECH_DETECTED:
DEBUG_PRINTF("\t PHAC_DISCLOOP_LPCD_NO_TECH_DETECTED");
break;
case PHAC_DISCLOOP_COLLISION_PENDING:
DEBUG_PRINTF("\t PHAC_DISCLOOP_COLLISION_PENDING");
break;
default:
DEBUG_PRINTF("\t 0x%x",(wStatus & PH_ERR_MASK));
break;
}
}
/******************************************************************************
** End Of File
******************************************************************************/

View File

@ -0,0 +1,343 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2016-2020,2022 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Example Source abstracting component data structure and code initialization and code specific to HW used in the examples
* This file shall be present in all examples. A customer does not need to touch/modify this file. This file
* purely depends on the phNxpBuild_Lpc.h or phNxpBuild_App.h
* The phAppInit.h externs the component data structures initialized here that is in turn included by the core examples.
* The core example shall not use any other variable defined here except the RdLib component data structures(as explained above)
* The RdLib component initialization requires some user defined data and function pointers.
* These are defined in the respective examples and externed here.
*
* Keystore and Crypto initialization needs to be handled by application.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
#include "phApp_Init.h"
#ifdef PH_PLATFORM_HAS_ICFRONTEND
#include "BoardSelection.h"
#endif /* PH_PLATFORM_HAS_ICFRONTEND */
/* HAL Header */
#include <phhalHw.h>
#ifdef PHDRIVER_KINETIS_K82
#include <fsl_port.h>
#include <fsl_pit.h>
#ifdef DEBUG
#include <fsl_clock.h>
#endif
#endif /* PHDRIVER_KINETIS_K82 */
#ifdef PHDRIVER_KINETIS_K82
#ifdef DEBUG
#define KINETIS_K82_DEBUG_UART_CLK_FREQ CLOCK_GetOsc0ErClkFreq()
#define KINETIS_K82_DEBUG_UART_BASEADDR (uint32_t)(LPUART4)
#define KINETIS_K82_DEBUG_UART_INSTANCE 4U
#define KINETIS_K82_DEBUG_UART_BAUDRATE 115200
#define KINETIS_K82_DEBUG_UART_TYPE DEBUG_CONSOLE_DEVICE_TYPE_LPUART
#endif /* DEBUG */
/*! @brief Clock configuration structure. */
typedef struct _clock_config
{
mcg_config_t mcgConfig; /*!< MCG configuration. */
sim_clock_config_t simConfig; /*!< SIM configuration. */
osc_config_t oscConfig; /*!< OSC configuration. */
uint32_t coreClock; /*!< core clock frequency. */
} clock_config_t;
#endif /* PHDRIVER_KINETIS_K82 */
#ifdef PH_OSAL_LINUX
# define PI_IRQ_POLLING_TASK_PRIO 0
# define PI_IRQ_POLLING_TASK_STACK 0x20000
phOsal_ThreadObj_t gphPiThreadObj;
#endif /* PH_OSAL_LINUX */
#if defined(PHDRIVER_LPC1769) && defined(__CC_ARM)
uint32_t SystemCoreClock;
#endif
/*******************************************************************************
** Global Variable Declaration
*******************************************************************************/
/*******************************************************************************
** Function Declarations
*******************************************************************************/
#ifdef PHDRIVER_KINETIS_K82
static void phApp_K82_Init(void);
#endif /* PHDRIVER_KINETIS_K82 */
#ifdef PH_OSAL_LINUX
static void phExample_IrqPolling(void* param);
#endif /* PH_OSAL_LINUX */
/*******************************************************************************
** Clock configuration of K82 Platform
*******************************************************************************/
#ifdef PHDRIVER_KINETIS_K82
/* Configuration for enter RUN mode. Core clock = 50MHz. */
const clock_config_t g_defaultClockConfigRun = {
.mcgConfig =
{
.mcgMode = kMCG_ModePEE, /* Work in PEE mode. */
.irclkEnableMode = kMCG_IrclkEnable, /* MCGIRCLK enable. */
.ircs = kMCG_IrcSlow, /* Select IRC32k. */
.fcrdiv = 0U, /* FCRDIV is 0. */
.frdiv = 4U,
.drs = kMCG_DrsLow, /* Low frequency range. */
.dmx32 = kMCG_Dmx32Default, /* DCO has a default range of 25%. */
.oscsel = kMCG_OscselOsc, /* Select OSC. */
.pll0Config =
{
.enableMode = 0U, .prdiv = 0x00U, .vdiv = 0x04U,
},
},
.simConfig =
{
.pllFllSel = 1U, /* PLLFLLSEL select PLL. */
.pllFllDiv = 0U, /* PLLFLLSEL clock divider divisor. */
.pllFllFrac = 0U, /* PLLFLLSEL clock divider fraction. */
.er32kSrc = 5U, /* ERCLK32K selection, use RTC. */
.clkdiv1 = 0x01140000U, /* SIM_CLKDIV1. */
},
.oscConfig = {.freq = CPU_XTAL_CLK_HZ,
.capLoad = 0,
.workMode = kOSC_ModeOscLowPower,
.oscerConfig =
{
.enableMode = kOSC_ErClkEnable,
#if (defined(FSL_FEATURE_OSC_HAS_EXT_REF_CLOCK_DIVIDER) && FSL_FEATURE_OSC_HAS_EXT_REF_CLOCK_DIVIDER)
.erclkDiv = 0U,
#endif
}},
};
#endif /* PHDRIVER_KINETIS_K82 */
/*******************************************************************************
** Function Definitions
*******************************************************************************/
#ifdef PHDRIVER_KINETIS_K82
static void phApp_K82_Init(void)
{
#ifdef DEBUG
uint32_t uartClkSrcFreq;
#endif /* DEBUG */
pit_config_t pitConfig; /* Structure of initialize PIT */
CLOCK_SetSimSafeDivs();
CLOCK_InitOsc0(&g_defaultClockConfigRun.oscConfig);
CLOCK_SetXtal0Freq(CPU_XTAL_CLK_HZ);
CLOCK_BootToPeeMode(g_defaultClockConfigRun.mcgConfig.oscsel, kMCG_PllClkSelPll0,
&g_defaultClockConfigRun.mcgConfig.pll0Config);
CLOCK_SetInternalRefClkConfig(g_defaultClockConfigRun.mcgConfig.irclkEnableMode,
g_defaultClockConfigRun.mcgConfig.ircs, g_defaultClockConfigRun.mcgConfig.fcrdiv);
CLOCK_SetSimConfig(&g_defaultClockConfigRun.simConfig);
SystemCoreClockUpdate();
/*
* pitConfig.enableRunInDebug = false;
*/
PIT_GetDefaultConfig(&pitConfig);
/* Init pit module */
PIT_Init(PIT, &pitConfig);
#ifdef DEBUG
/* Initialize LPUART4 pins below used to Print */
/* Ungate the port clock */
CLOCK_EnableClock(kCLOCK_PortC);
/* Affects PORTC_PCR14 register */
PORT_SetPinMux(PORTC, 14U, kPORT_MuxAlt3);
/* Affects PORTC_PCR15 register */
PORT_SetPinMux(PORTC, 15U, kPORT_MuxAlt3);
/* SIM_SOPT2[27:26]:
* 00: Clock Disabled
* 01: MCGFLLCLK, or MCGPLLCLK, or IRC48M
* 10: OSCERCLK
* 11: MCGIRCCLK
*/
CLOCK_SetLpuartClock(2);
uartClkSrcFreq = KINETIS_K82_DEBUG_UART_CLK_FREQ;
DbgConsole_Init(KINETIS_K82_DEBUG_UART_INSTANCE, KINETIS_K82_DEBUG_UART_BAUDRATE, KINETIS_K82_DEBUG_UART_TYPE, uartClkSrcFreq);
#endif /* DEBUG */
}
#endif /* PHDRIVER_KINETIS_K82 */
#ifdef PH_PLATFORM_HAS_ICFRONTEND
/**
* This function will initialize Host Controller interfaced with NXP Reader IC's.
* Any initialization which is not generic across Platforms, should be done here.
* Note: For NXP NFC Controllers HOST initialization is not required.
*/
void phApp_CPU_Init(void)
{
#if defined PHDRIVER_KINETIS_K82
phApp_K82_Init();
#elif defined(PHDRIVER_LPC1769) && defined(__CC_ARM)
SystemCoreClock = (( unsigned long ) 96000000);
#elif defined(PH_OSAL_LINUX) && defined(NXPBUILD__PHHAL_HW_PN5190)
phStatus_t status;
status = PiGpio_OpenIrq();
if ((status & PH_ERR_MASK) != PH_ERR_SUCCESS)
{
DEBUG_PRINTF("\n PiGpio_OpenIrq failed \n");
DEBUG_PRINTF("\n Couldn't open PN5190 Kernel IRQ Driver.\n Halting here!!FIX IT!!\n");
while(1);
}
#else
/* In case of LPC series, startup file takes care of initializing clock and ports.
* No initialization is required in Linux environment. */
#endif
}
#endif /* PH_PLATFORM_HAS_ICFRONTEND */
phStatus_t phApp_Configure_IRQ()
{
#ifdef PH_PLATFORM_HAS_ICFRONTEND
#if !(defined(PH_OSAL_LINUX) && defined(NXPBUILD__PHHAL_HW_PN5190))
phDriver_Pin_Config_t pinCfg;
pinCfg.bOutputLogic = PH_DRIVER_SET_LOW;
pinCfg.bPullSelect = PHDRIVER_PIN_IRQ_PULL_CFG;
pinCfg.eInterruptConfig = PIN_IRQ_TRIGGER_TYPE;
phDriver_PinConfig(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT, &pinCfg);
#endif
#ifdef PHDRIVER_LPC1769
NVIC_SetPriority(EINT_IRQn, EINT_PRIORITY);
/* Enable interrupt in the NVIC */
NVIC_ClearPendingIRQ(EINT_IRQn);
NVIC_EnableIRQ(EINT_IRQn);
#endif /* PHDRIVER_LPC1769 */
#ifdef PH_OSAL_LINUX
phStatus_t wStatus;
gphPiThreadObj.pTaskName = (uint8_t *) "IrqPolling";
gphPiThreadObj.pStackBuffer = NULL;
gphPiThreadObj.priority = PI_IRQ_POLLING_TASK_PRIO;
gphPiThreadObj.stackSizeInNum = PI_IRQ_POLLING_TASK_STACK;
PH_CHECK_SUCCESS_FCT(wStatus, phOsal_ThreadCreate(&gphPiThreadObj.ThreadHandle, &gphPiThreadObj,
&phExample_IrqPolling, NULL));
#endif /* PH_OSAL_LINUX */
#ifdef PHDRIVER_KINETIS_K82
NVIC_SetPriority(EINT_IRQn, EINT_PRIORITY);
NVIC_ClearPendingIRQ(EINT_IRQn);
EnableIRQ(EINT_IRQn);
#endif /* PHDRIVER_KINETIS_K82 */
#endif /* #ifdef PH_PLATFORM_HAS_ICFRONTEND */
return PH_ERR_SUCCESS;
}
#ifdef PH_OSAL_LINUX
/*
* \brief: The purpose of this Thread is to detect RF signal from an External Peer .
*/
static void phExample_IrqPolling(void* param)
{
uint8_t bgpioVal = 0;
uint8_t bhighOrLow = 0;
#if defined(NXPBUILD__PHHAL_HW_RC663) || defined(NXPBUILD__PHHAL_HW_PN5180)
if(PIN_IRQ_TRIGGER_TYPE == PH_DRIVER_INTERRUPT_RISINGEDGE)
{
bhighOrLow = 1;
}
while(PiGpio_read(PHDRIVER_PIN_IRQ, &bgpioVal) != PH_ERR_SUCCESS)
{
PiGpio_unexport(PHDRIVER_PIN_IRQ);
PiGpio_export(PHDRIVER_PIN_IRQ);
PiGpio_set_direction(PHDRIVER_PIN_IRQ, false);
if(PIN_IRQ_TRIGGER_TYPE == PH_DRIVER_INTERRUPT_RISINGEDGE)
{
PiGpio_set_edge(PHDRIVER_PIN_IRQ, true, false);
}
else
{
PiGpio_set_edge(PHDRIVER_PIN_IRQ, false, true);
}
}
/* Initial status: If pin is already Active, post an event. */
if(bgpioVal == bhighOrLow)
{
CLIF_IRQHandler();
}
#endif
while(1)
{
/* Block forever for Raising Edge in PHDRIVER_PIN_IRQ. */
#if defined(NXPBUILD__PHHAL_HW_RC663) || defined(NXPBUILD__PHHAL_HW_PN5180)
if(PiGpio_poll(PHDRIVER_PIN_IRQ, bhighOrLow, -1) == PH_ERR_SUCCESS)
#elif defined(NXPBUILD__PHHAL_HW_PN5190)
if(PiGpio_Irq() == PH_ERR_SUCCESS)
#endif
{
CLIF_IRQHandler();
}
else
{
PiGpio_unexport(PHDRIVER_PIN_IRQ);
PiGpio_export(PHDRIVER_PIN_IRQ);
PiGpio_set_direction(PHDRIVER_PIN_IRQ, false);
if(PIN_IRQ_TRIGGER_TYPE == PH_DRIVER_INTERRUPT_RISINGEDGE)
{
PiGpio_set_edge(PHDRIVER_PIN_IRQ, true, false);
}
else
{
PiGpio_set_edge(PHDRIVER_PIN_IRQ, false, true);
}
}
}
}
#endif /* PH_OSAL_LINUX */
/******************************************************************************
** End Of File
******************************************************************************/

View File

@ -0,0 +1,179 @@
/*----------------------------------------------------------------------------*/
/* Copyright 2020,2023 NXP */
/* */
/* NXP Confidential. This software is owned or controlled by NXP and may only */
/* be used strictly in accordance with the applicable license terms. */
/* By expressly accepting such terms or by downloading, installing, */
/* activating and/or otherwise using the software, you are agreeing that you */
/* have read, and that you agree to comply with and are bound by, such */
/* license terms. If you do not agree to be bound by the applicable license */
/* terms, then you may not retain, install, activate or otherwise use the */
/* software. */
/*----------------------------------------------------------------------------*/
/** \file
* Example Source abstracting component data structure and code initialization and code specific to HW used in the examples
* This file shall be present in all examples. A customer does not need to touch/modify this file. This file
* purely depends on the phNxpBuild_Lpc.h or phNxpBuild_App.h
* The phAppInit.h externs the component data structures initialized here that is in turn included by the core examples.
* The core example shall not use any other variable defined here except the RdLib component data structures(as explained above)
* The RdLib component initialization requires some user defined data and function pointers.
* These are defined in the respective examples and externed here.
*
* Keystore and Crypto initialization needs to be handled by application.
*
* $Author$
* $Revision$ (v07.10.00)
* $Date$
*
*/
/* Status header */
#include <ph_Status.h>
#include "phApp_Init.h"
#ifdef NXPBUILD__PHHAL_HW_PN5180
#include "BoardSelection.h"
/* HAL specific headers */
#include <phhalHw_Pn5180_Instr.h>
/*******************************************************************************
** Function Declarations
*******************************************************************************/
/*******************************************************************************
** Global Variable Declaration
*******************************************************************************/
phbalReg_Type_t sBalParams;
phhalHw_Pn5180_DataParams_t * pHal;
#ifdef NXPBUILD__PHHAL_HW_TARGET
/* Parameters for L3 activation during Autocoll */
extern uint8_t sens_res[2] ;
extern uint8_t nfc_id1[3] ;
extern uint8_t sel_res ;
extern uint8_t nfc_id3 ;
extern uint8_t poll_res[18] ;
#endif /* NXPBUILD__PHHAL_HW_TARGET */
/*******************************************************************************
** Function Definitions
*******************************************************************************/
/**
* This function will initialize Hal Target Config
*/
phStatus_t phApp_HALConfigAutoColl(void)
{
#ifdef NXPBUILD__PHHAL_HW_TARGET
phStatus_t wStatus;
uint8_t baDynamicUidConfig[1U] = { 1U };
uint8_t baReadEepromConfig[24U] = { 0U };
/* Read Set Listen Parameters data from EEPROM */
wStatus = phhalHw_Pn5180_Instr_ReadE2Prom(
(phhalHw_Pn5180_DataParams_t *) pHal,
PHHAL_HW_PN5180_SET_LISTEN_E2PROM_ADDR,
baReadEepromConfig,
24U
);
CHECK_SUCCESS(wStatus);
/* Verify EEPROM data and configure Set Listen Parameters if EEPROM data is not correct. */
if ((memcmp(&baReadEepromConfig[0U], sens_res, 2U) != 0x00) ||
(memcmp(&baReadEepromConfig[2U], nfc_id1, 3U) != 0x00) ||
(memcmp(&baReadEepromConfig[5U], &sel_res, 1U) != 0x00) ||
(memcmp(&baReadEepromConfig[6U], poll_res, 18U) != 0x00))
{
/* Configure Set Listen Parameters. */
wStatus = phhalHw_Pn5180_SetListenParameters(
pHal,
&sens_res[0],
&nfc_id1[0],
sel_res,
&poll_res[0],
nfc_id3
);
CHECK_SUCCESS(wStatus);
}
if (pHal->wFirmwareVer < 0x308U)
{
/* With Pn5180 FW version < 3.8, only static UID is supported. */
baDynamicUidConfig[0] = 0x00;
}
/* Read Dynamic UID configuration from EEPROM */
wStatus = phhalHw_Pn5180_Instr_ReadE2Prom(
(phhalHw_Pn5180_DataParams_t *) pHal,
PHHAL_HW_PN5180_DYN_UID_CFG_E2PROM_ADDR,
baReadEepromConfig,
1U
);
CHECK_SUCCESS(wStatus);
/* Verify EEPROM data and perform Dynamic UID configuration if EEPROM data is not correct. */
if (memcmp(baReadEepromConfig, baDynamicUidConfig, 1U) != 0x00)
{
/* Configure Dynamic UID */
wStatus = phhalHw_Pn5180_Instr_WriteE2Prom(
(phhalHw_Pn5180_DataParams_t *) pHal,
PHHAL_HW_PN5180_DYN_UID_CFG_E2PROM_ADDR,
baDynamicUidConfig,
1U
);
CHECK_SUCCESS(wStatus);
}
#endif /* NXPBUILD__PHHAL_HW_TARGET */
return PH_ERR_SUCCESS;
}
/* Configure LPCD (for PN5180) */
phStatus_t phApp_ConfigureLPCD(void)
{
/**
* PHHAL_HW_CONFIG_SET_LPCD_WAKEUPTIME_MS 0x0070U //< Used value for wakeup counter in msecs, i.e. after this amount of time IC will wakes up from standby.
* PHHAL_HW_CONFIG_LPCD_MODE 0x0071U //< Used to set options PHHAL_HW_PN5180_LPCD_MODE_DEFAULT or PHHAL_HW_PN5180_LPCD_MODE_POWERDOWN_GUARDED
* PHHAL_HW_CONFIG_LPCD_REF 0x0072U //< Used to set or get LPCD Ref
*/
phStatus_t status = PH_ERR_SUCCESS;
uint16_t wConfig = PHHAL_HW_CONFIG_LPCD_REF;
uint16_t wValue;
uint8_t bLPCD_Threshold_EEPROMAddress = 0x37;
uint8_t bLPCD_Threshold = 0x10;
wValue = PHHAL_HW_PN5180_LPCD_MODE_POWERDOWN;
wConfig = PHHAL_HW_CONFIG_LPCD_MODE;
//status = phhalHw_Pn5180_Int_LPCD_GetConfig(pHal, wConfig, &wValue);
status = phhalHw_Pn5180_Instr_WriteE2Prom(pHal,bLPCD_Threshold_EEPROMAddress, &bLPCD_Threshold, 1 );
CHECK_SUCCESS(status);
status = phhalHw_Pn5180_Int_LPCD_SetConfig(
pHal,
wConfig,
wValue
);
return status;
}
void CLIF_IRQHandler(void)
{
/* Read the interrupt status of external interrupt attached to the reader IC IRQ pin */
if (phDriver_PinRead(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT))
{
phDriver_PinClearIntStatus(PHDRIVER_PIN_IRQ);
/* Call application registered callback. */
if (pHal->pRFISRCallback != NULL)
{
pHal->pRFISRCallback(pHal);
}
}
}
#endif /* NXPBUILD__PHHAL_HW_PN5180 */
/******************************************************************************
** End Of File
******************************************************************************/