-/*
- * Copyright (C) 2010 NXP Semiconductors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/**
-* \file phNfcConfig.h
-* \brief HAL Configurations
-*
-*
-* \note This is the configuration header file of the HAL 4.0.All configurable parameters of the HAL 4.0
-* are provided in this file
-*
-* Project: NFC-FRI-1.1 / HAL4.0
-*
-* $Date: Thu Sep 9 14:56:35 2010 $
-* $Author: ing04880 $
-* $Revision: 1.39 $
-* $Aliases: $
-*
-*/
-
-
-/*@{*/
-#ifndef PHNFC_CONFIG_H
-#define PHNFC_CONFIG_H
-/*@}*/
-
-
-/**
-* \name Hal
-*
-* File: \ref phNfcConfig.h
-*
-*/
-
-/*@{*/
-#define PH_NFC_CONFIG_FILEREVISION "$Revision: 1.39 $" /**< \ingroup grp_file_attributes */
-#define PH_NFC_CONFIG_FILEALIASES "$Aliases: $" /**< \ingroup grp_file_attributes */
-/*@}*/
-
-
-/* -----------------Include files ---------------------------------------*/
-
-#ifdef NFC_CUSTOM_CONFIG_INCLUDE
-#include<nfc_custom_config.h>
-#endif
-
-/* ---------------- Macros ----------------------------------------------*/
-
-
-
-/*
- *****************************************************************
- ********************** DEFAULT MACROS **************************
- *****************************************************************
- */
-
-
-/**< External Clock Request Configuration for the NFC Device,
- 0x00U No Clock Request,
- 0x01U Clock Request through CLKREQ pin (GPIO pin 2),
- 0x02U Clock Request through NXP_EVT_CLK_REQUEST Event,
- */
-#ifndef NXP_DEFAULT_CLK_REQUEST
-#define NXP_DEFAULT_CLK_REQUEST 0x00U
-#endif
-
-/**< External Input Clock Setting for the NFC Device,
- 0x00U No Input Clock Required (Use the Xtal),
- 0x01U 13 MHZ,
- 0x02U 19.2 MHZ,
- 0x03U 26 MHZ,
- 0x04U 38.4 MHZ,
- 0x05U Custom (Set the Custome Clock Registry),
- */
-
-#ifndef NXP_DEFAULT_INPUT_CLK
-#define NXP_DEFAULT_INPUT_CLK 0x00U
-#endif
-
-/**< UICC Power Request configuration for the NFC Device,
- 0x00U No Power Request,
- 0x01U Power Request through CLKREQ pin (GPIO pin 2),
- 0x02U Power Request through PWR_REQUEST (GPIO Pin 3),
- */
-
-#ifndef NXP_UICC_PWR_REQUEST
-#define NXP_UICC_PWR_REQUEST 0x00U
-#endif
-
-/**< TX LDO Configuration
- 0x00 00b 3.0 V,
- 0x01 01b 3.0 V,
- 0x02 10b 2.7 V,
- 0x03 11b 3.3 V,
- */
-
-#ifndef NXP_DEFAULT_TX_LDO
-#define NXP_DEFAULT_TX_LDO 0x00U
-#endif
-
-/**< UICC Bit Rate Configuration
- 0x02 212Kbits/Sec
- 0x04 424Kbits/Sec
- 0x08 828Kbits/Sec
- */
-
-#ifndef NXP_UICC_BIT_RATE
-#define NXP_UICC_BIT_RATE 0x08U
-#endif
-
-
-/**< Indicates PN544 Power Modes Configuration for the NFC Device,
+/*\r
+ * Copyright (C) 2010 NXP Semiconductors\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+/**\r
+* \file phNfcConfig.h\r
+* \brief HAL Configurations\r
+*\r
+*\r
+* \note This is the configuration header file of the HAL 4.0.All configurable parameters of the HAL 4.0\r
+* are provided in this file\r
+*\r
+* Project: NFC-FRI-1.1 / HAL4.0\r
+*\r
+* $Date: Thu Sep 9 14:56:35 2010 $\r
+* $Author: ing04880 $\r
+* $Revision: 1.39 $\r
+* $Aliases: $\r
+*\r
+*/\r
+\r
+\r
+/*@{*/\r
+#ifndef PHNFC_CONFIG_H\r
+#define PHNFC_CONFIG_H\r
+/*@}*/\r
+\r
+\r
+/**\r
+* \name Hal\r
+*\r
+* File: \ref phNfcConfig.h\r
+*\r
+*/\r
+\r
+/*@{*/\r
+#define PH_NFC_CONFIG_FILEREVISION "$Revision: 1.39 $" /**< \ingroup grp_file_attributes */\r
+#define PH_NFC_CONFIG_FILEALIASES "$Aliases: $" /**< \ingroup grp_file_attributes */\r
+/*@}*/\r
+\r
+\r
+/* -----------------Include files ---------------------------------------*/\r
+\r
+#ifdef NFC_CUSTOM_CONFIG_INCLUDE\r
+#include<nfc_custom_config.h>\r
+#endif\r
+\r
+/* ---------------- Macros ----------------------------------------------*/\r
+\r
+\r
+\r
+/*\r
+ *****************************************************************\r
+ ********************** DEFAULT MACROS **************************\r
+ *****************************************************************\r
+ */\r
+\r
+\r
+/**< External Clock Request Configuration for the NFC Device,\r
+ 0x00U No Clock Request,\r
+ 0x01U Clock Request through CLKREQ pin (GPIO pin 2),\r
+ 0x02U Clock Request through NXP_EVT_CLK_REQUEST Event,\r
+ */\r
+#ifndef NXP_DEFAULT_CLK_REQUEST\r
+#define NXP_DEFAULT_CLK_REQUEST 0x00U\r
+#endif\r
+\r
+/**< External Input Clock Setting for the NFC Device,\r
+ 0x00U No Input Clock Required (Use the Xtal),\r
+ 0x01U 13 MHZ,\r
+ 0x02U 19.2 MHZ,\r
+ 0x03U 26 MHZ,\r
+ 0x04U 38.4 MHZ,\r
+ 0x05U Custom (Set the Custome Clock Registry),\r
+ */\r
+\r
+#ifndef NXP_DEFAULT_INPUT_CLK\r
+#define NXP_DEFAULT_INPUT_CLK 0x00U\r
+#endif\r
+\r
+/**< UICC Power Request configuration for the NFC Device,\r
+ 0x00U No Power Request,\r
+ 0x01U Power Request through CLKREQ pin (GPIO pin 2),\r
+ 0x02U Power Request through PWR_REQUEST (GPIO Pin 3),\r
+ */\r
+\r
+#ifndef NXP_UICC_PWR_REQUEST\r
+#define NXP_UICC_PWR_REQUEST 0x00U\r
+#endif\r
+\r
+/**< TX LDO Configuration\r
+ 0x00 00b 3.0 V,\r
+ 0x01 01b 3.0 V,\r
+ 0x02 10b 2.7 V,\r
+ 0x03 11b 3.3 V,\r
+ */\r
+\r
+#ifndef NXP_DEFAULT_TX_LDO\r
+#define NXP_DEFAULT_TX_LDO 0x00U\r
+#endif\r
+\r
+/**< UICC Bit Rate Configuration\r
+ 0x02 212Kbits/Sec\r
+ 0x04 424Kbits/Sec\r
+ 0x08 828Kbits/Sec\r
+ */\r
+\r
+#ifndef NXP_UICC_BIT_RATE\r
+#define NXP_UICC_BIT_RATE 0x08U\r
+#endif\r
+\r
+\r
+/**< Indicates PN544 Power Modes Configuration for the NFC Device,\r
0x00U -> PN544 stays in active bat mode \r
- (except when generating RF field)
+ (except when generating RF field)\r
0x01U -> PN544 goes in standby when possible otherwise \r
- stays in active bat mode
+ stays in active bat mode\r
0x02U -> PN544 goes in idle mode as soon as it can \r
- (otherwise it is in active bat except when generating RF field)
+ (otherwise it is in active bat except when generating RF field)\r
0x03U -> PN544 goes in standby when possible otherwise goes in idle mode \r
as soon as it can (otherwise it is in active bat except when \r
- generating RF field)
- */
-
-#ifndef NXP_SYSTEM_PWR_STATUS
-#define NXP_SYSTEM_PWR_STATUS 0x01U
-#endif
-
-/**< Default Session ID for Initialisation */
-#ifndef DEFAULT_SESSION
+ generating RF field)\r
+ */\r
+\r
+#ifndef NXP_SYSTEM_PWR_STATUS\r
+#define NXP_SYSTEM_PWR_STATUS 0x01U\r
+#endif\r
+\r
+/**< Default Session ID for Initialisation */\r
+#ifndef DEFAULT_SESSION\r
#define DEFAULT_SESSION "android8"\r
-#endif
-
-
-/* The Other Integration Configuration Values */
-
-/**< Max number of remote devices supported */
-
-#ifndef MAX_REMOTE_DEVICES
+#endif\r
+\r
+\r
+/* The Other Integration Configuration Values */\r
+\r
+/**< Max number of remote devices supported */\r
+\r
+#ifndef MAX_REMOTE_DEVICES\r
#define MAX_REMOTE_DEVICES 0x0A \r
-#endif
-
-/**< System Event Notification
- 0x01 Overcurrent
- 0x02 PMUVCC Switch
- 0x04 External RF Field
- 0x08 Memory Violation
- 0x10 Temperature Overheat
- */
-
-#ifndef NXP_SYSTEM_EVT_INFO
-#define NXP_SYSTEM_EVT_INFO 0x3DU
-#endif
-
-
-#ifndef NFC_DEV_HWCONF_DEFAULT
-#define NFC_DEV_HWCONF_DEFAULT 0xBCU
-#endif
-
-
-#ifndef NXP_ISO_XCHG_TIMEOUT
-#define NXP_ISO_XCHG_TIMEOUT 0x1AU
-#endif
-
-#ifndef NXP_MIFARE_XCHG_TIMEOUT
+#endif\r
+\r
+/**< System Event Notification\r
+ 0x01 Overcurrent\r
+ 0x02 PMUVCC Switch\r
+ 0x04 External RF Field\r
+ 0x08 Memory Violation\r
+ 0x10 Temperature Overheat\r
+ */\r
+\r
+#ifndef NXP_SYSTEM_EVT_INFO\r
+#define NXP_SYSTEM_EVT_INFO 0x3DU\r
+#endif\r
+\r
+\r
+#ifndef NFC_DEV_HWCONF_DEFAULT\r
+#define NFC_DEV_HWCONF_DEFAULT 0xBCU\r
+#endif\r
+\r
+\r
+#ifndef NXP_ISO_XCHG_TIMEOUT\r
+#define NXP_ISO_XCHG_TIMEOUT 0x1AU\r
+#endif\r
+\r
+#ifndef NXP_MIFARE_XCHG_TIMEOUT\r
#define NXP_MIFARE_XCHG_TIMEOUT 0x0BU\r
-#endif
-
-#ifndef NXP_FELICA_XCHG_TIMEOUT
-#define NXP_FELICA_XCHG_TIMEOUT 0xFFU
-#endif
-
-
-#ifndef NXP_NFCIP_PSL_BRS_DEFAULT
-#define NXP_NFCIP_PSL_BRS_DEFAULT 0x00U
-#endif
-
-
-
-/**< ID For Invalid Timer */
-#ifndef NXP_INVALID_TIMER_ID
-#define NXP_INVALID_TIMER_ID 0xFFFFFFFFU
-#endif
-
-/**< Presence check interval in milliseconds */
-#ifndef PRESENCE_CHECK_INTERVAL
-#define PRESENCE_CHECK_INTERVAL 500U
+#endif\r
+\r
+#ifndef NXP_FELICA_XCHG_TIMEOUT\r
+#define NXP_FELICA_XCHG_TIMEOUT 0xFFU\r
+#endif\r
+\r
+\r
+#ifndef NXP_NFCIP_PSL_BRS_DEFAULT\r
+#define NXP_NFCIP_PSL_BRS_DEFAULT 0x00U\r
+#endif\r
+\r
+\r
+\r
+/**< ID For Invalid Timer */\r
+#ifndef NXP_INVALID_TIMER_ID\r
+#define NXP_INVALID_TIMER_ID 0xFFFFFFFFU\r
+#endif\r
+\r
+/**< Presence check interval in milliseconds */\r
+#ifndef PRESENCE_CHECK_INTERVAL\r
+#define PRESENCE_CHECK_INTERVAL 500U\r
#endif \r
-
+\r
/** Resolution value for the timer, here the \r
- timer resolution is 500 milliseconds */
-#ifndef TIMER_RESOLUTION
-#define TIMER_RESOLUTION 500U
+ timer resolution is 500 milliseconds */\r
+#ifndef TIMER_RESOLUTION\r
+#define TIMER_RESOLUTION 500U\r
#endif \r
-
-/* Kindly note that the below Timeout values should be
- * in Multiples of the value provided to TIMER_RESOLUTION
- */
-
+\r
+/* Kindly note that the below Timeout values should be\r
+ * in Multiples of the value provided to TIMER_RESOLUTION\r
+ */\r
+\r
/**< Defines guard time out value for LLC timer, \r
- 1000 is in milliseconds */
-#ifndef LINK_GUARD_TIMEOUT
-#define LINK_GUARD_TIMEOUT 1000U
+ 1000 is in milliseconds */\r
+#ifndef LINK_GUARD_TIMEOUT\r
+#define LINK_GUARD_TIMEOUT 1000U\r
#endif \r
-
-
+\r
+\r
/**< Defines connection time out value for LLC timer, \r
- 1000 is in milliseconds */
-#ifndef LINK_CONNECTION_TIMEOUT
-#define LINK_CONNECTION_TIMEOUT 1000U
+ 1000 is in milliseconds */\r
+#ifndef LINK_CONNECTION_TIMEOUT\r
+#define LINK_CONNECTION_TIMEOUT 1000U\r
#endif \r
\r
/**< Defines ACK time out value for LLC timer,\r
150 is in milliseconds */\r
#ifndef LINK_ACK_TIMEOUT\r
#define LINK_ACK_TIMEOUT 1U\r
-#endif
-
-
-/**< Defines Firmware Download Completion Timeout value ,
- 120000 is in milliseconds */
-
-
-#ifndef NXP_DNLD_COMPLETE_TIMEOUT
+#endif\r
+\r
+\r
+/**< Defines Firmware Download Completion Timeout value ,\r
+ 120000 is in milliseconds */\r
+\r
+\r
+#ifndef NXP_DNLD_COMPLETE_TIMEOUT\r
#define NXP_DNLD_COMPLETE_TIMEOUT 60000U\r
-#endif
-
-
+#endif\r
+\r
+\r
/**< Define to configure the Active Mode Polling Guard Time-out \r
- */
-
-#ifndef DEV_MGMT_ACT_GRD_TO_DEFAULT
-#define DEV_MGMT_ACT_GRD_TO_DEFAULT 0x20U
-#endif
-
-/**< NFCIP Active Mode Default Configuration (when acting as Target)
- 0x01 106 kbps
- 0x02 212 kbps
- 0x04 424 kbps
- */
-
-#ifndef NXP_NFCIP_ACTIVE_DEFAULT
-#define NXP_NFCIP_ACTIVE_DEFAULT 0x01U
-#endif
-
-
-
-
-#ifndef NXP_NFC_HCI_TIMER
-#define NXP_NFC_HCI_TIMER 1
-#define NXP_NFC_HCI_TIMEOUT 6000
-#endif
-
-
-/*
- *****************************************************************
- DO NOT MODIFY THE BELOW MACROS UNLESS OTHERWISE MENTIONED
- *****************************************************************
- */
-
-
-
-#ifndef HOST_CE_A_SAK_DEFAULT
-#define HOST_CE_A_SAK_DEFAULT 0x20U
+ */\r
+\r
+#ifndef DEV_MGMT_ACT_GRD_TO_DEFAULT\r
+#define DEV_MGMT_ACT_GRD_TO_DEFAULT 0x20U\r
+#endif\r
+\r
+/**< NFCIP Active Mode Default Configuration (when acting as Target)\r
+ 0x01 106 kbps\r
+ 0x02 212 kbps\r
+ 0x04 424 kbps\r
+ */\r
+\r
+#ifndef NXP_NFCIP_ACTIVE_DEFAULT\r
+#define NXP_NFCIP_ACTIVE_DEFAULT 0x01U\r
+#endif\r
+\r
+\r
+\r
+\r
+#ifndef NXP_NFC_HCI_TIMER\r
+#define NXP_NFC_HCI_TIMER 1\r
+#define NXP_NFC_HCI_TIMEOUT 6000\r
+#endif\r
+\r
+\r
+/*\r
+ *****************************************************************\r
+ DO NOT MODIFY THE BELOW MACROS UNLESS OTHERWISE MENTIONED\r
+ *****************************************************************\r
+ */\r
+\r
+\r
+\r
+#ifndef HOST_CE_A_SAK_DEFAULT\r
+#define HOST_CE_A_SAK_DEFAULT 0x20U\r
#endif \r
-
-#ifndef NXP_CE_A_ATQA_HIGH
-#define NXP_CE_A_ATQA_HIGH 0x00U
-#endif
-
-#ifndef NXP_CE_A_ATQA_LOW
-#define NXP_CE_A_ATQA_LOW 0x04U
-#endif
-
-
-#ifndef NXP_UICC_CE_RIGHTS
-#define NXP_UICC_CE_RIGHTS 0x0FU
+\r
+#ifndef NXP_CE_A_ATQA_HIGH\r
+#define NXP_CE_A_ATQA_HIGH 0x00U\r
+#endif\r
+\r
+#ifndef NXP_CE_A_ATQA_LOW\r
+#define NXP_CE_A_ATQA_LOW 0x04U\r
+#endif\r
+\r
+\r
+#ifndef NXP_UICC_CE_RIGHTS\r
+#define NXP_UICC_CE_RIGHTS 0x0FU\r
#endif \r
-
-#ifndef NXP_UICC_RD_RIGHTS
-#define NXP_UICC_RD_RIGHTS 0x00U
+\r
+#ifndef NXP_UICC_RD_RIGHTS\r
+#define NXP_UICC_RD_RIGHTS 0x00U\r
#endif \r
-
-
-/*
- *****************************************************************
- DO NOT DISABLE/ENABLE BELOW MACROS UNLESS OTHERWISE MENTIONED
- *****************************************************************
- */
-
-#define ES_HW_VER 32
+\r
+\r
+/*\r
+ *****************************************************************\r
+ DO NOT DISABLE/ENABLE BELOW MACROS UNLESS OTHERWISE MENTIONED\r
+ *****************************************************************\r
+ */\r
+\r
+#define ES_HW_VER 32\r
\r
-/*
- *****************************************************************
- *************** FEATURE SPECIFIC MACROS *************************
- *****************************************************************
- */
-
-
-
-/**< Macro to Enable SMX Feature During
- * Initialisation */
-
-#if !defined(NXP_SMX)
+/*\r
+ *****************************************************************\r
+ *************** FEATURE SPECIFIC MACROS *************************\r
+ *****************************************************************\r
+ */\r
+\r
+\r
+\r
+/**< Macro to Enable SMX Feature During\r
+ * Initialisation */\r
+\r
+#if !defined(NXP_SMX)\r
#define NXP_SMX 1\r
-#endif
-
-#if (NXP_SMX == 1)
+#endif\r
+\r
+#if (NXP_SMX == 1)\r
#define NXP_HAL_ENABLE_SMX \r
-#endif
-
-/**< Macro to Enable the Host Session
- * Initialisation */
-#define ESTABLISH_SESSION
-
-/**< Macro to Enable the Peer to Peer Feature */
-#define ENABLE_P2P
-
+#endif\r
+\r
+/**< Macro to Enable the Host Session\r
+ * Initialisation */\r
+#define ESTABLISH_SESSION\r
+\r
+/**< Macro to Enable the Peer to Peer Feature */\r
+#define ENABLE_P2P\r
+\r
#define DEFAULT_NFCIP_INITIATOR_MODE_SUPPORT 0x3FU\r
#define DEFAULT_NFCIP_TARGET_MODE_SUPPORT 0x0FU\r
-
-/**< Macro to Enable the ISO14443-B Feature */
-#define TYPE_B
-
-/**< Macro to Enable the Felica Feature */
-#define TYPE_FELICA
-
-/**< Macro to Enable the JEWEL Feature */
-#define TYPE_JEWEL
-
-/**< Macro to Enable the ISO15693 Feature */
-#define TYPE_ISO15693
-
-/*< Macro to Verify the Poll Parameters Set */
-/* #define ENABLE_VERIFY_PARAM */
-
-/**< Macro to Enable ISO 18092 Protocol compliancy
- * SAK to be merged with the TYPE A Card RF Feature :3.1*/
-#define TGT_MERGE_SAK
-
-
-/**< Macro to Configure the default power status
- * to allow the PN544 to enter into the Standby */
-#define CFG_PWR_STATUS
-
-
-/**< Macro to Enable the SWP Protocol
- * to detect UICC During Initialisation */
-#define ENABLE_UICC
-
-/**< Macro to Enable the RAW Mode of Transaction
- * for the ISO-14443-3A Compliant Targets */
-#define ENABLE_MIFARE_RAW
-
-/**< Macro to Enable the HOST List
- * to allow the UICC Communication */
-#define HOST_WHITELIST
-
-/**< Support reconnecting to a different handle on the same tag */
-#define RECONNECT_SUPPORT
-
-/**< Macro to Enable the Card Emulation Feature */
-/* #define HOST_EMULATION */
-
-#define NXP_HAL_VERIFY_EEPROM_CRC 0x01U
-
-/**< Macro to Enable the Download Mode Feature */
-#define FW_DOWNLOAD
-
-/**< Macro to Enable the Firmware Download Timer */
-/* 0x01U to use overall timeout */
-/* 0x02U to use per frame timeout */
-#define FW_DOWNLOAD_TIMER 0x02U
-
-/**< Macro to Verify the Firmware Download */
-/* #define FW_DOWNLOAD_VERIFY */
-
-#ifndef FW_DOWNLOAD_VERIFY
-#define NXP_FW_INTEGRITY_CHK 1
-#endif
-
-/* To specify the Maximum TX/RX Len */
-#define NXP_FW_MAX_TX_RX_LEN 0x200
-
-#define UICC_CONNECTIVITY_PATCH
-
-/* Work around to Delay the initiator activation */
-/* #define NXP_NFCIP_ACTIVATE_DELAY */
-
-/* Work around to Release the Discovered Target */
-#define SW_RELEASE_TARGET
-
-/* Macro to Allow the HCI Release in any state */
-#define NXP_HCI_SHUTDOWN_OVERRIDE
-
-
-/* Macro to Enable The P2P Transaction Timers */
-#define P2P_TGT_TRANSACT_TIMER
-
-#if (ES_HW_VER == 32)
-/* Macro to Configure the Target Disable Register */
-#define NFCIP_TGT_DISABLE_CFG
-
-#endif
-
-/*< Macro to Disable the Felica Mapping */
-/* #define DISABLE_FELICA_MAPPING */
-
-/*< Macro to Disable the Felica Mapping */
-/* #define DISABLE_JEWEL_MAPPING */
-
-/**< Macro to enable LLC timer */
-#define LLC_TIMER_ENABLE
-
-/**< Macro to enable HCI Response timer */
+\r
+/**< Macro to Enable the ISO14443-B Feature */\r
+#define TYPE_B\r
+\r
+/**< Macro to Enable the Felica Feature */\r
+#define TYPE_FELICA\r
+\r
+/**< Macro to Enable the JEWEL Feature */\r
+#define TYPE_JEWEL\r
+\r
+/**< Macro to Enable the ISO15693 Feature */\r
+#define TYPE_ISO15693\r
+\r
+/*< Macro to Verify the Poll Parameters Set */\r
+/* #define ENABLE_VERIFY_PARAM */\r
+\r
+/**< Macro to Enable ISO 18092 Protocol compliancy\r
+ * SAK to be merged with the TYPE A Card RF Feature :3.1*/\r
+#define TGT_MERGE_SAK\r
+\r
+\r
+/**< Macro to Configure the default power status\r
+ * to allow the PN544 to enter into the Standby */\r
+#define CFG_PWR_STATUS\r
+\r
+\r
+/**< Macro to Enable the SWP Protocol\r
+ * to detect UICC During Initialisation */\r
+#define ENABLE_UICC\r
+\r
+/**< Macro to Enable the RAW Mode of Transaction\r
+ * for the ISO-14443-3A Compliant Targets */\r
+#define ENABLE_MIFARE_RAW\r
+\r
+/**< Macro to Enable the HOST List\r
+ * to allow the UICC Communication */\r
+#define HOST_WHITELIST\r
+\r
+/**< Support reconnecting to a different handle on the same tag */\r
+#define RECONNECT_SUPPORT\r
+\r
+/**< Macro to Enable the Card Emulation Feature */\r
+/* #define HOST_EMULATION */\r
+\r
+#define NXP_HAL_VERIFY_EEPROM_CRC 0x01U\r
+\r
+/**< Macro to Enable the Download Mode Feature */\r
+#define FW_DOWNLOAD\r
+\r
+/**< Macro to Enable the Firmware Download Timer */\r
+/* 0x01U to use overall timeout */\r
+/* 0x02U to use per frame timeout */\r
+#define FW_DOWNLOAD_TIMER 0x02U\r
+\r
+/**< Macro to Verify the Firmware Download */\r
+/* #define FW_DOWNLOAD_VERIFY */\r
+\r
+#ifndef FW_DOWNLOAD_VERIFY\r
+#define NXP_FW_INTEGRITY_CHK 1\r
+#endif\r
+\r
+/* To specify the Maximum TX/RX Len */\r
+#define NXP_FW_MAX_TX_RX_LEN 0x200\r
+\r
+#define UICC_CONNECTIVITY_PATCH\r
+\r
+/* Work around to Delay the initiator activation */\r
+/* #define NXP_NFCIP_ACTIVATE_DELAY */\r
+\r
+/* Work around to Release the Discovered Target */\r
+#define SW_RELEASE_TARGET\r
+\r
+/* Macro to Allow the HCI Release in any state */\r
+#define NXP_HCI_SHUTDOWN_OVERRIDE\r
+\r
+\r
+/* Macro to Enable The P2P Transaction Timers */\r
+#define P2P_TGT_TRANSACT_TIMER\r
+\r
+#if (ES_HW_VER == 32)\r
+/* Macro to Configure the Target Disable Register */\r
+#define NFCIP_TGT_DISABLE_CFG\r
+\r
+#endif\r
+\r
+/*< Macro to Disable the Felica Mapping */\r
+/* #define DISABLE_FELICA_MAPPING */\r
+\r
+/*< Macro to Disable the Felica Mapping */\r
+/* #define DISABLE_JEWEL_MAPPING */\r
+\r
+/**< Macro to enable LLC timer */\r
+#define LLC_TIMER_ENABLE\r
+\r
+/**< Macro to enable HCI Response timer */\r
#define NXP_NFC_HCI_TIMER 1\r
-
-/* A Workaround to Delay and obtain the UICC Status Information */
-/* #define UICC_STATUS_DELAY */
-
-#ifdef UICC_STATUS_DELAY
-#define UICC_STATUS_DELAY_COUNT 0x00100000
-#endif
-
-/**< Macro to delay the LLC RESET response callback,
- Value is in milli-seconds */
-#define LLC_RESET_DELAY 10
-
-/* Macro to Enable the workaround for Tuning of
- * RF for TYPE B and F
- */
-/* #define SW_TYPE_RF_TUNING_BF */
-
-/* Workaround to update the Active Guard Timeout */
-/* #define MAX_ACTIVATE_TIMEOUT */
-
-/* #define ONE_BYTE_LEN */
-
-#define NFC_RF_NOISE_SW
-
-/**< Define to configure the PMOS Modulation Index value
- */
-
-#ifndef NFC_DEV_PMOS_MOD_DEFAULT
-/* 0x3F -> 6%, 0x3A -> 10%, 0x3C -> 10%, 0x35 -> 15.8%, 0x28 -> 25.8% */
-#define NFC_DEV_PMOS_MOD_DEFAULT 0x3CU
-#endif
-
-
-#ifndef SW_TYPE_RF_TUNING_BF
-#define SW_TYPE_RF_TUNING_BF 0x80U
-#endif
-
-
-/* Reset the Default values of Host Link Timers */
-/* Macro to Enable the Host Side Link Timeout Configuration
- * 0x00 ----> Default Pre-defined Configuration;
- * 0x01 ----> Update only the Host Link Guard Timeout Configuration;
- * 0x03 ----> Update Both the Host Link Guard Timeout
- and ACK Timeout Configuration;
- */
-
-#ifndef HOST_LINK_TIMEOUT
-#define HOST_LINK_TIMEOUT 0x00U
-#endif
-
-
-#ifndef NXP_NFC_LINK_GRD_CFG_DEFAULT
-#define NXP_NFC_LINK_GRD_CFG_DEFAULT 0x0032U
-#endif
-
-#ifndef NXP_NFC_LINK_ACK_CFG_DEFAULT
-#define NXP_NFC_LINK_ACK_CFG_DEFAULT 0x0005U
-#endif
-
-/* Macro to Enable the Interface Character Timeout Configuration
- * 0x00 ----> Default Pre-defined Configuration;
- * 0x01 ----> Update the IFC Timeout Default Configuration;
- */
-
-#ifndef NXP_NFC_IFC_TIMEOUT
-#define NXP_NFC_IFC_TIMEOUT 0x00
-#endif
-
-
-#ifndef NXP_NFC_IFC_CONFIG_DEFAULT
-#define NXP_NFC_IFC_CONFIG_DEFAULT 0x203AU
-#endif
-
-#ifndef NFC_ISO_15693_MULTIPLE_TAGS_SUPPORT
-#define NFC_ISO_15693_MULTIPLE_TAGS_SUPPORT 0x00
-#endif
-
-/*
- *****************************************************************
- *********** MACROS ENABLE EEPROM REGISTER WRITE ****************
- *****************************************************************
- */
-
-
-/* Enable this to Disable the WI Notification */
-/* #define DISABLE_WI_NOTIFICATION */
-
-/* Macro to Enable the Configuration of Initiator
- * speed during Discovery configuration
- */
-#define INITIATOR_SPEED
-
-
-/**/
-/* #define UICC_SESSION_RESET */
-
-/* Macro to Enable the Configuration of UICC
- * Timer and Bitrate during Initialisation
- */
-
-
-
-
-/* -----------------Structures and Enumerations -------------------------*/
-
-
-
-
-/* -----------------Exported Functions----------------------------------*/
-
-
-#endif /*PHNFC_CONFIG_H*/
-
+\r
+/* A Workaround to Delay and obtain the UICC Status Information */\r
+/* #define UICC_STATUS_DELAY */\r
+\r
+#ifdef UICC_STATUS_DELAY\r
+#define UICC_STATUS_DELAY_COUNT 0x00100000\r
+#endif\r
+\r
+/**< Macro to delay the LLC RESET response callback,\r
+ Value is in milli-seconds */\r
+#define LLC_RESET_DELAY 10\r
+\r
+/* Macro to Enable the workaround for Tuning of\r
+ * RF for TYPE B and F\r
+ */\r
+/* #define SW_TYPE_RF_TUNING_BF */\r
+\r
+/* Workaround to update the Active Guard Timeout */\r
+/* #define MAX_ACTIVATE_TIMEOUT */\r
+\r
+/* #define ONE_BYTE_LEN */\r
+\r
+#define NFC_RF_NOISE_SW\r
+\r
+/**< Define to configure the PMOS Modulation Index value\r
+ */\r
+\r
+#ifndef NFC_DEV_PMOS_MOD_DEFAULT\r
+/* 0x3F -> 6%, 0x3A -> 10%, 0x3C -> 10%, 0x35 -> 15.8%, 0x28 -> 25.8% */\r
+#define NFC_DEV_PMOS_MOD_DEFAULT 0x3CU\r
+#endif\r
+\r
+\r
+#ifndef SW_TYPE_RF_TUNING_BF\r
+#define SW_TYPE_RF_TUNING_BF 0x80U\r
+#endif\r
+\r
+\r
+/* Reset the Default values of Host Link Timers */\r
+/* Macro to Enable the Host Side Link Timeout Configuration\r
+ * 0x00 ----> Default Pre-defined Configuration;\r
+ * 0x01 ----> Update only the Host Link Guard Timeout Configuration;\r
+ * 0x03 ----> Update Both the Host Link Guard Timeout\r
+ and ACK Timeout Configuration;\r
+ */\r
+\r
+#ifndef HOST_LINK_TIMEOUT\r
+#define HOST_LINK_TIMEOUT 0x00U\r
+#endif\r
+\r
+\r
+#ifndef NXP_NFC_LINK_GRD_CFG_DEFAULT\r
+#define NXP_NFC_LINK_GRD_CFG_DEFAULT 0x0032U\r
+#endif\r
+\r
+#ifndef NXP_NFC_LINK_ACK_CFG_DEFAULT\r
+#define NXP_NFC_LINK_ACK_CFG_DEFAULT 0x0005U\r
+#endif\r
+\r
+/* Macro to Enable the Interface Character Timeout Configuration\r
+ * 0x00 ----> Default Pre-defined Configuration;\r
+ * 0x01 ----> Update the IFC Timeout Default Configuration;\r
+ */\r
+\r
+#ifndef NXP_NFC_IFC_TIMEOUT\r
+#define NXP_NFC_IFC_TIMEOUT 0x00\r
+#endif\r
+\r
+\r
+#ifndef NXP_NFC_IFC_CONFIG_DEFAULT\r
+#define NXP_NFC_IFC_CONFIG_DEFAULT 0x203AU\r
+#endif\r
+\r
+#ifndef NFC_ISO_15693_MULTIPLE_TAGS_SUPPORT\r
+#define NFC_ISO_15693_MULTIPLE_TAGS_SUPPORT 0x00\r
+#endif\r
+\r
+/*\r
+ *****************************************************************\r
+ *********** MACROS ENABLE EEPROM REGISTER WRITE ****************\r
+ *****************************************************************\r
+ */\r
+\r
+\r
+/* Enable this to Disable the WI Notification */\r
+/* #define DISABLE_WI_NOTIFICATION */\r
+\r
+/* Macro to Enable the Configuration of Initiator\r
+ * speed during Discovery configuration\r
+ */\r
+#define INITIATOR_SPEED\r
+\r
+\r
+/**/\r
+/* #define UICC_SESSION_RESET */\r
+\r
+/* Macro to Enable the Configuration of UICC\r
+ * Timer and Bitrate during Initialisation\r
+ */\r
+\r
+\r
+\r
+\r
+/* -----------------Structures and Enumerations -------------------------*/\r
+\r
+\r
+\r
+\r
+/* -----------------Exported Functions----------------------------------*/\r
+\r
+\r
+#endif /*PHNFC_CONFIG_H*/\r
+\r
-/*
- * Copyright (C) 2010 NXP Semiconductors
- * Copyright (C) 2012 Samsung Elevtronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * \file phNfcTypes.h
- * \brief Basic type definitions.
- *
- * Project: NFC MW / HAL
- *
- * $Date: Thu Jun 25 21:24:53 2009 $
- * $Author: ing04880 $
- * $Revision: 1.13 $
- * $Aliases: NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $
- *
- */
-
-#ifndef PHNFCTYPES /* */
-#define PHNFCTYPES /* */
-
-/**
- * \name NFC Types
- *
- * File: \ref phNfcTypes.h
- *
- */
-/*@{*/
-#define PHNFCTYPES_FILEREVISION "$Revision: 1.13 $" /**< \ingroup grp_file_attributes */
-#define PHNFCTYPES_FILEALIASES "$Aliases: NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $" /**< \ingroup grp_file_attributes */
-/*@}*/
-
-#ifndef _WIN32
-#include <stdint.h>
-#else
-#include <Windows.h>
-#include <stdio.h>
-#define snprintf _snprintf
-
-#ifndef linux
-/**
- * \name Basic Type Definitions
- *
- * Constant-length-type definition ('C99).
- *
- */
-/*@{*/
-#ifndef __int8_t_defined /* */
-#define __int8_t_defined /* */
-typedef signed char int8_t; /**< \ingroup grp_nfc_common
- 8 bit signed integer */
-#endif
-
-#ifndef __int16_t_defined /* */
-#define __int16_t_defined /* */
-typedef signed short int16_t; /**< \ingroup grp_nfc_common
- 16 bit signed integer */
-#endif
-
-#ifndef __stdint_h
-#ifndef __int32_t_defined /* */
-#define __int32_t_defined /* */
-typedef signed long int32_t; /**< \ingroup grp_nfc_common
- 32 bit signed integer */
-#endif
-#endif
-
-#ifndef __uint8_t_defined /* */
-#define __uint8_t_defined /* */
-typedef unsigned char uint8_t; /**< \ingroup grp_nfc_common
- 8 bit unsigned integer */
-#endif
-
-#ifndef __uint16_t_defined /* */
-#define __uint16_t_defined /* */
-typedef unsigned short uint16_t; /**< \ingroup grp_nfc_common
- 16 bit unsigned integer */
-#endif
-
-#ifndef __stdint_h
-#ifndef __uint32_t_defined /* */
-#define __uint32_t_defined /* */
-typedef unsigned long uint32_t; /**< \ingroup grp_nfc_common
- 32 bit unsigned integer */
-#endif
-#endif
-
-#endif /* linux */
-
-#endif /* _WIN32 */
-
-#ifndef TRUE
-#define TRUE (0x01) /**< \ingroup grp_nfc_common
- Logical True Value */
-#endif
-
-#ifndef FALSE
-#define FALSE (0x00) /**< \ingroup grp_nfc_common
- Logical False Value */
-#endif
-
-typedef uint8_t utf8_t; /**< \ingroup grp_nfc_common
- UTF8 Character String */
-
-typedef uint8_t bool_t; /**< \ingroup grp_nfc_common
- boolean data type */
-
-typedef uint16_t NFCSTATUS; /**< \ingroup grp_nfc_common
+/*\r
+ * Copyright (C) 2010 NXP Semiconductors\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/*\r
+ * \file phNfcTypes.h\r
+ * \brief Basic type definitions.\r
+ *\r
+ * Project: NFC MW / HAL\r
+ *\r
+ * $Date: Thu Jun 25 21:24:53 2009 $\r
+ * $Author: ing04880 $\r
+ * $Revision: 1.13 $\r
+ * $Aliases: NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $\r
+ *\r
+ */\r
+\r
+#ifndef PHNFCTYPES /* */\r
+#define PHNFCTYPES /* */\r
+\r
+/**\r
+ * \name NFC Types\r
+ *\r
+ * File: \ref phNfcTypes.h\r
+ *\r
+ */\r
+/*@{*/\r
+#define PHNFCTYPES_FILEREVISION "$Revision: 1.13 $" /**< \ingroup grp_file_attributes */\r
+#define PHNFCTYPES_FILEALIASES "$Aliases: NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $" /**< \ingroup grp_file_attributes */\r
+/*@}*/\r
+\r
+#ifndef _WIN32\r
+#include <stdint.h>\r
+#else\r
+#include <Windows.h>\r
+#include <stdio.h>\r
+#define snprintf _snprintf\r
+\r
+#ifndef linux\r
+/**\r
+ * \name Basic Type Definitions\r
+ *\r
+ * Constant-length-type definition ('C99).\r
+ *\r
+ */\r
+/*@{*/\r
+#ifndef __int8_t_defined /* */\r
+#define __int8_t_defined /* */\r
+typedef signed char int8_t; /**< \ingroup grp_nfc_common\r
+ 8 bit signed integer */\r
+#endif\r
+\r
+#ifndef __int16_t_defined /* */\r
+#define __int16_t_defined /* */\r
+typedef signed short int16_t; /**< \ingroup grp_nfc_common\r
+ 16 bit signed integer */\r
+#endif\r
+\r
+#ifndef __stdint_h\r
+#ifndef __int32_t_defined /* */\r
+#define __int32_t_defined /* */\r
+typedef signed long int32_t; /**< \ingroup grp_nfc_common\r
+ 32 bit signed integer */\r
+#endif\r
+#endif\r
+\r
+#ifndef __uint8_t_defined /* */\r
+#define __uint8_t_defined /* */\r
+typedef unsigned char uint8_t; /**< \ingroup grp_nfc_common\r
+ 8 bit unsigned integer */\r
+#endif\r
+\r
+#ifndef __uint16_t_defined /* */\r
+#define __uint16_t_defined /* */\r
+typedef unsigned short uint16_t; /**< \ingroup grp_nfc_common\r
+ 16 bit unsigned integer */\r
+#endif\r
+\r
+#ifndef __stdint_h\r
+#ifndef __uint32_t_defined /* */\r
+#define __uint32_t_defined /* */\r
+typedef unsigned long uint32_t; /**< \ingroup grp_nfc_common\r
+ 32 bit unsigned integer */\r
+#endif\r
+#endif\r
+\r
+#endif /* linux */\r
+\r
+#endif /* _WIN32 */\r
+\r
+#ifndef TRUE\r
+#define TRUE (0x01) /**< \ingroup grp_nfc_common\r
+ Logical True Value */\r
+#endif\r
+\r
+#ifndef FALSE\r
+#define FALSE (0x00) /**< \ingroup grp_nfc_common\r
+ Logical False Value */\r
+#endif\r
+\r
+typedef uint8_t utf8_t; /**< \ingroup grp_nfc_common\r
+ UTF8 Character String */\r
+\r
+typedef uint8_t bool_t; /**< \ingroup grp_nfc_common\r
+ boolean data type */\r
+\r
+typedef uint16_t NFCSTATUS; /**< \ingroup grp_nfc_common\r
NFC return values \r
- \ref phNfcStatus.h for different status
- values */
-
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
-/* This Macro to be used to resolve Unused and unreference
+ \ref phNfcStatus.h for different status\r
+ values */\r
+\r
+#ifndef NULL\r
+#define NULL ((void *)0)\r
+#endif\r
+\r
+/* This Macro to be used to resolve Unused and unreference\r
* compiler warnings. \r
- */
-
-#define PHNFC_UNUSED_VARIABLE(x) for((x)=(x);(x)!=(x);)
-
-/*@}*/
-
-/**
- *
- * \name HAL Overall Definitions
- *
- * Definitions applicable to a variety of purposes and functions/features.
- *
- */
- /*@{*/
-
-#define PHHAL_COMMON_MAX_STRING_LENGTH 0x40U /**< \ingroup grp_hal_common
- Maximum vendor name length in bytes. */
-#define PHHAL_UNKNOWN_DEVICE_TYPE 0x00U /**< \ingroup grp_hal_common
- Unknown device type. */
-#define PHHAL_SERIAL_DEVICE 0x01U /**< \ingroup grp_hal_common
- Serial device type. */
-#define PHHAL_USB_DEVICE 0x02U /**< \ingroup grp_hal_common
- USB device type. */
-#define PHHAL_I2C_DEVICE 0x03U /**< \ingroup grp_hal_common
- I2C device type. */
-#define PHHAL_SPI_DEVICE 0x04U /**< \ingroup grp_hal_common
- SPI device type. */
-#define PHHAL_PARALLEL_DEVICE 0x05U /**< \ingroup grp_hal_common
- Parallel device type. */
-#define PHHAL_NFCID_LENGTH 0x0AU /**< \ingroup grp_hal_common
- Maximum length of NFCID 1..3. */
-
-#define PHHAL_MAX_DATASIZE 0xFBU /* 256 * Maximum Data size sent
- * by the HAL
- */
-
-#define PHHAL_ATQA_LENGTH 0x02U /**< ATQA length */
-#define PHHAL_MAX_UID_LENGTH 0x0AU /**< Maximum UID length expected */
+ */\r
+\r
+#define PHNFC_UNUSED_VARIABLE(x) for((x)=(x);(x)!=(x);)\r
+\r
+/*@}*/\r
+\r
+/**\r
+ *\r
+ * \name HAL Overall Definitions\r
+ *\r
+ * Definitions applicable to a variety of purposes and functions/features.\r
+ *\r
+ */\r
+ /*@{*/\r
+\r
+#define PHHAL_COMMON_MAX_STRING_LENGTH 0x40U /**< \ingroup grp_hal_common\r
+ Maximum vendor name length in bytes. */\r
+#define PHHAL_UNKNOWN_DEVICE_TYPE 0x00U /**< \ingroup grp_hal_common\r
+ Unknown device type. */\r
+#define PHHAL_SERIAL_DEVICE 0x01U /**< \ingroup grp_hal_common\r
+ Serial device type. */\r
+#define PHHAL_USB_DEVICE 0x02U /**< \ingroup grp_hal_common\r
+ USB device type. */\r
+#define PHHAL_I2C_DEVICE 0x03U /**< \ingroup grp_hal_common\r
+ I2C device type. */\r
+#define PHHAL_SPI_DEVICE 0x04U /**< \ingroup grp_hal_common\r
+ SPI device type. */\r
+#define PHHAL_PARALLEL_DEVICE 0x05U /**< \ingroup grp_hal_common\r
+ Parallel device type. */\r
+#define PHHAL_NFCID_LENGTH 0x0AU /**< \ingroup grp_hal_common\r
+ Maximum length of NFCID 1..3. */\r
+\r
+#define PHHAL_MAX_DATASIZE 0xFBU /* 256 * Maximum Data size sent\r
+ * by the HAL\r
+ */\r
+\r
+#define PHHAL_ATQA_LENGTH 0x02U /**< ATQA length */\r
+#define PHHAL_MAX_UID_LENGTH 0x0AU /**< Maximum UID length expected */\r
#define PHHAL_MAX_ATR_LENGTH 0x30U /**< Maximum ATR_RES (General Bytes) \r
- * length expected */
-
-#define PHHAL_ATQB_LENGTH 0x0BU /**< ATQB length */
-
-#define PHHAL_PUPI_LENGTH 0x04U /**< PUPI length */
-#define PHHAL_APP_DATA_B_LENGTH 0x04U /**< Application Data length for Type B */
-#define PHHAL_PROT_INFO_B_LENGTH 0x03U /**< Protocol info length for Type B */
-#define PHHAL_FEL_SYS_CODE_LEN 0x02U /**< Felica System Code Length */
-#define PHHAL_FEL_ID_LEN 0x08U /**< Felica current ID Length */
-#define PHHAL_FEL_PM_LEN 0x08U /**< Felica current PM Length */
-#define PHHAL_15693_UID_LENGTH 0x08U /**< Length of the Inventory bytes for
- ISO15693 Tag */
-
-#define VENDOR_NAME_LEN 0x14U
+ * length expected */\r
+\r
+#define PHHAL_ATQB_LENGTH 0x0BU /**< ATQB length */\r
+\r
+#define PHHAL_PUPI_LENGTH 0x04U /**< PUPI length */\r
+#define PHHAL_APP_DATA_B_LENGTH 0x04U /**< Application Data length for Type B */\r
+#define PHHAL_PROT_INFO_B_LENGTH 0x03U /**< Protocol info length for Type B */\r
+#define PHHAL_FEL_SYS_CODE_LEN 0x02U /**< Felica System Code Length */\r
+#define PHHAL_FEL_ID_LEN 0x08U /**< Felica current ID Length */\r
+#define PHHAL_FEL_PM_LEN 0x08U /**< Felica current PM Length */\r
+#define PHHAL_15693_UID_LENGTH 0x08U /**< Length of the Inventory bytes for\r
+ ISO15693 Tag */\r
+\r
+#define VENDOR_NAME_LEN 0x14U\r
#define MAX_TRANSFER_UNIT 0x21U \r
-#define SESSIONID_SIZE 0x08U
-#define MAX_AID_LEN 0x10U
-#define MAX_UICC_PARAM_LEN 0xFFU
-
-#define MIFARE_BITMASK 0x08U
-#define ISO_14443_BITMASK 0x20U
-#define ISO_14443_DETECTED 0x20U
-#define NFCIP_BITMASK 0x40U
-#define NFCIP_DETECTED 0x40U
-
-#define MAX_TARGET_SUPPORTED MAX_REMOTE_DEVICES
-
-#define NFC_HW_PN65N 0x10U
-
-#define NXP_NFCIP_NFCID2_ID 0x01FEU
-
-#define NXP_FULL_VERSION_LEN 0x0BU
-
-
-/*@}*/
-
-
-/**
- * \name NFC specific Type Definitions
- *
- */
-/*@{*/
-
-/**
- * Data Buffer Structure to hold the Data Buffer
- *
+#define SESSIONID_SIZE 0x08U\r
+#define MAX_AID_LEN 0x10U\r
+#define MAX_UICC_PARAM_LEN 0xFFU\r
+\r
+#define MIFARE_BITMASK 0x08U\r
+#define ISO_14443_BITMASK 0x20U\r
+#define ISO_14443_DETECTED 0x20U\r
+#define NFCIP_BITMASK 0x40U\r
+#define NFCIP_DETECTED 0x40U\r
+\r
+#define MAX_TARGET_SUPPORTED MAX_REMOTE_DEVICES\r
+\r
+#define NFC_HW_PN65N 0x10U\r
+\r
+#define NXP_NFCIP_NFCID2_ID 0x01FEU\r
+\r
+#define NXP_FULL_VERSION_LEN 0x0BU\r
+\r
+\r
+/*@}*/\r
+\r
+\r
+/**\r
+ * \name NFC specific Type Definitions\r
+ *\r
+ */\r
+/*@{*/\r
+\r
+/**\r
+ * Data Buffer Structure to hold the Data Buffer\r
+ *\r
* This structure holds the Data in the Buffer of the specified \r
- * size.
+ * size.\r
* \r
- */
-typedef struct phNfc_sData_t
-{
- uint8_t *buffer;
- uint32_t length;
-} phNfc_sData_t;
-
-
-/**
- *\brief Possible Hardware Configuration exposed to upper layer.
- * Typically this should be port name (Ex:"COM1","COM2") to which PN544 is connected.
- */
-typedef enum
-{
- ENUM_LINK_TYPE_UART,
- ENUM_LINK_TYPE_I2C,
- ENUM_LINK_TYPE_USB,
- ENUM_LINK_TYPE_TCP,
-
- ENUM_LINK_TYPE_NB,
-} phLibNfc_eConfigLinkType;
-
-/**
- * \brief Possible Hardware Configuration exposed to upper layer.
- * Typically this should be at least the communication link (Ex:"COM1","COM2")
- * the controller is connected to.
+ */\r
+typedef struct phNfc_sData_t\r
+{\r
+ uint8_t *buffer;\r
+ uint32_t length;\r
+} phNfc_sData_t;\r
+\r
+/**\r
+ * \brief Possible Hardware Configuration exposed to upper layer.\r
+ * Typically this should be at least the communication link (Ex:"COM1","COM2")\r
+ * the controller is connected to.\r
*/ \r
-typedef struct phLibNfc_sConfig_t
-{
- /** Device node of the controller */
- const char* deviceNode;
- /** The client ID (thread ID or message queue ID) */
- unsigned int nClientId;
-} phLibNfc_sConfig_t, *pphLibNfc_sConfig_t;
-
-
-/*!
- * NFC Message structure contains message specific details like
- * message type, message specific data block details, etc.
- */
-typedef struct phLibNfc_Message_t
-{
- uint32_t eMsgType;/**< Type of the message to be posted*/
- void * pMsgData;/**< Pointer to message specific data block in case any*/
- uint32_t Size;/**< Size of the datablock*/
-} phLibNfc_Message_t,*pphLibNfc_Message_t;
-
-
-#ifdef WIN32
-#define PH_LIBNFC_MESSAGE_BASE (WM_USER+0x3FF)
-#endif
-/**
- * Deferred message. This message type will be posted to the client application thread
- * to notify that a deferred call must be invoked.
- */
-#define PH_LIBNFC_DEFERREDCALL_MSG (0x311)
-
-/**
- *\brief Deferred call declaration.
+typedef struct phLibNfc_sConfig_t\r
+{\r
+ /** Device node of the controller */\r
+ const char* deviceNode;\r
+ /** The client ID (thread ID or message queue ID) */\r
+ unsigned int nClientId;\r
+} phLibNfc_sConfig_t, *pphLibNfc_sConfig_t;\r
+\r
+\r
+/*!\r
+ * NFC Message structure contains message specific details like\r
+ * message type, message specific data block details, etc.\r
+ */\r
+typedef struct phLibNfc_Message_t\r
+{\r
+ uint32_t eMsgType;/**< Type of the message to be posted*/\r
+ void * pMsgData;/**< Pointer to message specific data block in case any*/\r
+ uint32_t Size;/**< Size of the datablock*/\r
+} phLibNfc_Message_t,*pphLibNfc_Message_t;\r
+\r
+\r
+#ifdef WIN32\r
+#define PH_LIBNFC_MESSAGE_BASE (WM_USER+0x3FF)\r
+#endif\r
+/**\r
+ * Deferred message. This message type will be posted to the client application thread\r
+ * to notify that a deferred call must be invoked.\r
+ */\r
+#define PH_LIBNFC_DEFERREDCALL_MSG (0x311)\r
+\r
+/**\r
+ *\brief Deferred call declaration.\r
* This type of API is called from ClientApplication ( main thread) to notify \r
- * specific callback.
- */
-typedef void (*pphLibNfc_DeferredCallback_t) (void*);
-/**
- *\brief Deferred parameter declaration.
+ * specific callback.\r
+ */\r
+typedef void (*pphLibNfc_DeferredCallback_t) (void*);\r
+/**\r
+ *\brief Deferred parameter declaration.\r
* This type of data is passed as parameter from ClientApplication (main thread) to the \r
- * callback.
- */
-typedef void *pphLibNfc_DeferredParameter_t;
-/**
- *\brief Deferred message specific info declaration.
+ * callback.\r
+ */\r
+typedef void *pphLibNfc_DeferredParameter_t;\r
+/**\r
+ *\brief Deferred message specific info declaration.\r
* This type of information is packed as message data when \ref PH_LIBNFC_DEFERREDCALL_MSG \r
- * type message is posted to message handler thread.
+ * type message is posted to message handler thread.\r
*/ \r
-typedef struct phLibNfc_DeferredCall_t
-{
- pphLibNfc_DeferredCallback_t pCallback;/**< pointer to Deferred callback */
- pphLibNfc_DeferredParameter_t pParameter;/**< pointer to Deferred parameter */
-} phLibNfc_DeferredCall_t;
-
-
-/** \ingroup grp_hal_common
- *
- * \brief Protocol Support Information
- *
- * The <em> Supported Protocols Structure </em> holds all protocol supported by the current NFC
- * device.
- *
- * \note All members of this structure are output parameters [out].
- *
- */
-typedef struct phNfc_sSupProtocol_t
-{
+typedef struct phLibNfc_DeferredCall_t\r
+{\r
+ pphLibNfc_DeferredCallback_t pCallback;/**< pointer to Deferred callback */\r
+ pphLibNfc_DeferredParameter_t pParameter;/**< pointer to Deferred parameter */\r
+} phLibNfc_DeferredCall_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * \brief Protocol Support Information\r
+ *\r
+ * The <em> Supported Protocols Structure </em> holds all protocol supported by the current NFC\r
+ * device.\r
+ *\r
+ * \note All members of this structure are output parameters [out].\r
+ *\r
+ */\r
+typedef struct phNfc_sSupProtocol_t\r
+{\r
unsigned int MifareUL : 1; /**< Protocol Mifare Ultra Light or \r
- any NFC Forum Type-2 tags */
- unsigned int MifareStd : 1; /**< Protocol Mifare Standard. */
- unsigned int ISO14443_4A : 1; /**< Protocol ISO14443-4 Type A. */
- unsigned int ISO14443_4B : 1; /**< Protocol ISO14443-4 Type B. */
- unsigned int ISO15693 : 1; /**< Protocol ISO15693 HiTag. */
- unsigned int Felica : 1; /**< Protocol Felica. */
- unsigned int NFC : 1; /**< Protocol NFC. */
- unsigned int Jewel : 1; /**< Protocol Innovision Jewel Tag. */
- /*** TODO: Add SWP, ETSI HCI to this list **/
-} phNfc_sSupProtocol_t;
-
-
-/** \ingroup grp_hal_common
- *
- *
- * \brief Information related to the NFC Device
- *
- * The <em> Device Information Structure </em> holds information
+ any NFC Forum Type-2 tags */\r
+ unsigned int MifareStd : 1; /**< Protocol Mifare Standard. */\r
+ unsigned int ISO14443_4A : 1; /**< Protocol ISO14443-4 Type A. */\r
+ unsigned int ISO14443_4B : 1; /**< Protocol ISO14443-4 Type B. */\r
+ unsigned int ISO15693 : 1; /**< Protocol ISO15693 HiTag. */\r
+ unsigned int Felica : 1; /**< Protocol Felica. */\r
+ unsigned int NFC : 1; /**< Protocol NFC. */\r
+ unsigned int Jewel : 1; /**< Protocol Innovision Jewel Tag. */\r
+ /*** TODO: Add SWP, ETSI HCI to this list **/\r
+} phNfc_sSupProtocol_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ *\r
+ * \brief Information related to the NFC Device\r
+ *\r
+ * The <em> Device Information Structure </em> holds information\r
* related to the NFC IC read during initialization time. \r
- * It allows the caller firware, hardware version, the model id,
+ * It allows the caller firware, hardware version, the model id,\r
* HCI verison supported and vendor name. Refer to the NFC Device \r
- * User Manual on how to interpret each of the values. In addition
+ * User Manual on how to interpret each of the values. In addition\r
* it also contains capabilities of the NFC Device such as the \r
- * protocols supported in Reader and emulation mode
- *
- */
-typedef struct phNfc_sDeviceCapabilities_t
-{
- /* */
- uint32_t hal_version; /**< \ingroup grp_hal_common
- HAL 4.0 Version Information. */
- uint32_t fw_version; /**< \ingroup grp_hal_common
- Firmware Version Info. */
- uint32_t hw_version; /**< \ingroup grp_hal_common
- Hardware Version Info. */
- uint8_t model_id; /**< \ingroup grp_hal_common
- IC Variant . */
- uint8_t hci_version; /**< \ingroup grp_hal_common
- ETSI HCI Version Supported */
- utf8_t vendor_name[VENDOR_NAME_LEN]; /**< \ingroup grp_hal_common
- Vendor name (Null terminated string)*/
- uint8_t full_version[NXP_FULL_VERSION_LEN];
-
+ * protocols supported in Reader and emulation mode\r
+ *\r
+ */\r
+typedef struct phNfc_sDeviceCapabilities_t\r
+{\r
+ /* */\r
+ uint32_t hal_version; /**< \ingroup grp_hal_common\r
+ HAL 4.0 Version Information. */\r
+ uint32_t fw_version; /**< \ingroup grp_hal_common\r
+ Firmware Version Info. */\r
+ uint32_t hw_version; /**< \ingroup grp_hal_common\r
+ Hardware Version Info. */\r
+ uint8_t model_id; /**< \ingroup grp_hal_common\r
+ IC Variant . */\r
+ uint8_t hci_version; /**< \ingroup grp_hal_common\r
+ ETSI HCI Version Supported */\r
+ utf8_t vendor_name[VENDOR_NAME_LEN]; /**< \ingroup grp_hal_common\r
+ Vendor name (Null terminated string)*/\r
+ uint8_t full_version[NXP_FULL_VERSION_LEN];\r
+\r
phNfc_sSupProtocol_t ReaderSupProtocol; /**< Supported protocols \r
- (Bitmapped) in Reader mode. */
- phNfc_sSupProtocol_t EmulationSupProtocol; /**< Supported protocols
+ (Bitmapped) in Reader mode. */\r
+ phNfc_sSupProtocol_t EmulationSupProtocol; /**< Supported protocols\r
(Bitmapped) in Emulation \r
- mode. */
- char firmware_update_info; /** */
-} phNfc_sDeviceCapabilities_t;
-
-
-/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-
-
-/** \ingroup grp_hal_common
- *
- * \brief Enumerated MIFARE Commands
- *
- * The <em> Mifare Command List Enumerator </em> lists all available Mifare native commands.
- *
- * \note None.
- *
- */
-typedef enum phNfc_eMifareCmdList_t
-{
- phNfc_eMifareRaw = 0x00U, /**< This command performs raw transcations .
+ mode. */\r
+ char firmware_update_info; /** */\r
+} phNfc_sDeviceCapabilities_t;\r
+\r
+\r
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * \brief Enumerated MIFARE Commands\r
+ *\r
+ * The <em> Mifare Command List Enumerator </em> lists all available Mifare native commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef enum phNfc_eMifareCmdList_t\r
+{\r
+ phNfc_eMifareRaw = 0x00U, /**< This command performs raw transcations .\r
Format of the phLibNfc_sTransceiveInfo_t \r
content in this case shall be as below: \r
- Â\95 cmd: filed shall set to phHal_eMifareRaw . \r
- Â\95 addr : doesn't carry any significance.\r
- Â\95 sSendData : Shall contain formatted raw buffer \r
+ \95 cmd: filed shall set to phHal_eMifareRaw . \r
+ \95 addr : doesn't carry any significance.\r
+ \95 sSendData : Shall contain formatted raw buffer \r
based on MIFARE commands type used. \r
Formatted buffer shall follow below \r
- formating scheme.
+ formating scheme.\r
\r
- CmdType+ Block No + CommandSpecific data + 2 byte CRC
+ CmdType+ Block No + CommandSpecific data + 2 byte CRC\r
Ex: With Write 4 byte command on block 8 looks as \r
" 0xA2,0x08,0x01,0x02,0x03,0x04,CRC1,CRC2 \r
Note : For MIFARE Std card we recommend use MIFARE \r
- commands directly.
- */
- phNfc_eMifareAuthentA = 0x60U, /**< Mifare Standard:\n
- This command performs an authentication with KEY A for a sector.\n
+ commands directly.\r
+ */\r
+ phNfc_eMifareAuthentA = 0x60U, /**< Mifare Standard:\n\r
+ This command performs an authentication with KEY A for a sector.\n\r
Format of the phLibNfc_sTransceiveInfo_t content in this case is : \r
- Â\95 cmd: field shall set to phHal_eMifareAuthentA . \r
- Â\95 addr : indicates MIFARE block address. \r
- Ex: 0x08 indicates block 8 needs to be authenticated.
- Â\95 sSendData : Shall contain authentication key values. \r
+ \95 cmd: field shall set to phHal_eMifareAuthentA . \r
+ \95 addr : indicates MIFARE block address. \r
+ Ex: 0x08 indicates block 8 needs to be authenticated.\r
+ \95 sSendData : Shall contain authentication key values. \r
sSendData ,buffer shall contain authentication \r
key values 01 02 03 04 05 06 authenticates \r
block 08 with the key 0x01[..]06. If this \r
command fails, then user needs to reactivate \r
the remote Mifare card. \r
- */
- phNfc_eMifareAuthentB = 0x61U, /**< Mifare Standard:\n
- This command performs an authentication with KEY B for a sector.\n
+ */\r
+ phNfc_eMifareAuthentB = 0x61U, /**< Mifare Standard:\n\r
+ This command performs an authentication with KEY B for a sector.\n\r
Format of the phLibNfc_sTransceiveInfo_t content in this case is : \r
- Â\95 cmd: field shall set to phHal_eMifareAuthentB . \r
- Â\95 addr : indicates MIFARE block address. \r
- Ex: 0x08 indicates block 8 needs to be authenticated.
- Â\95 sSendData : Shall contain authentication key values. \r
+ \95 cmd: field shall set to phHal_eMifareAuthentB . \r
+ \95 addr : indicates MIFARE block address. \r
+ Ex: 0x08 indicates block 8 needs to be authenticated.\r
+ \95 sSendData : Shall contain authentication key values. \r
sSendData ,buffer shall contain authentication \r
key values 01 02 03 04 05 06 authenticates \r
block 08 with the key 0x01[..]06. If this \r
command fails, then user needs to reactivate \r
the remote Mifare card. \r
- */
- phNfc_eMifareRead16 = 0x30U, /**< Mifare Standard and Ultra Light:\n
- Read 16 Bytes from a Mifare Standard block or 4 Mifare Ultra Light pages.\n
+ */\r
+ phNfc_eMifareRead16 = 0x30U, /**< Mifare Standard and Ultra Light:\n\r
+ Read 16 Bytes from a Mifare Standard block or 4 Mifare Ultra Light pages.\n\r
Format of the phLibNfc_sTransceiveInfo_t content in this case is : \r
- Â\95 cmd: field shall set to phHal_eMifareRead16 . \r
- Â\95 addr : memory adress to read. \r
- Â\95 sRecvData : Shall contain buffer of size 16 \r
+ \95 cmd: field shall set to phHal_eMifareRead16 . \r
+ \95 addr : memory adress to read. \r
+ \95 sRecvData : Shall contain buffer of size 16 \r
to read the data into. \r
-
+\r
If this command fails, the user needs to reactivate the \r
- the remote Mifare card
- */
- phNfc_eMifareRead = 0x30U,
- phNfc_eMifareWrite16 = 0xA0U, /**< Mifare Standard and Ultra Light:\n
- Write 16 Bytes to a Mifare Standard block or 4 Mifare Ultra Light pages.\n
+ the remote Mifare card\r
+ */\r
+ phNfc_eMifareRead = 0x30U,\r
+ phNfc_eMifareWrite16 = 0xA0U, /**< Mifare Standard and Ultra Light:\n\r
+ Write 16 Bytes to a Mifare Standard block or 4 Mifare Ultra Light pages.\n\r
Format of the phLibNfc_sTransceiveInfo_t content in this case is : \r
- Â\95 cmd: field shall set to phHal_eMifareWrite16 . \r
- Â\95 addr : starting memory adress to write from. \r
- Â\95 sSendData : Shall contain buffer of size 16 containing\r
+ \95 cmd: field shall set to phHal_eMifareWrite16 . \r
+ \95 addr : starting memory adress to write from. \r
+ \95 sSendData : Shall contain buffer of size 16 containing\r
the data bytes to be written. \r
\r
If this command fails, the user needs to reactivate the \r
- the remote Mifare card
- */
- phNfc_eMifareWrite4 = 0xA2U, /**< Mifare Ultra Light:\n
- Write 4 bytes.\n
+ the remote Mifare card\r
+ */\r
+ phNfc_eMifareWrite4 = 0xA2U, /**< Mifare Ultra Light:\n\r
+ Write 4 bytes.\n\r
Format of the phLibNfc_sTransceiveInfo_t content in this case is : \r
- Â\95 cmd: field shall set to phHal_eMifareWrite4 . \r
- Â\95 addr : starting memory adress to write from. \r
- Â\95 sSendData : Shall contain buffer of size 4 containing\r
+ \95 cmd: field shall set to phHal_eMifareWrite4 . \r
+ \95 addr : starting memory adress to write from. \r
+ \95 sSendData : Shall contain buffer of size 4 containing\r
the data bytes to be written. \r
-
+\r
If this command fails, the user needs to reactivate the \r
- the remote Mifare card
- */
- phNfc_eMifareInc = 0xC1U, /**< Increment. */
- phNfc_eMifareDec = 0xC0U, /**< Decrement. */
- phNfc_eMifareTransfer = 0xB0U, /**< Tranfer. */
- phNfc_eMifareRestore = 0xC2U, /**< Restore. */
- phNfc_eMifareReadSector = 0x38U, /**< Read Sector. */
- phNfc_eMifareWriteSector= 0xA8U, /**< Write Sector. */
- phNfc_eMifareInvalidCmd = 0xFFU /**< Invalid Command */
-} phNfc_eMifareCmdList_t;
-
-
-/** \ingroup grp_hal_common
- *
- * The <em> T=Cl Command List Enumerator </em> lists all available T=Cl Commands.
- *
- * \note None.
- *
- */
-typedef enum phNfc_eIso14443_4_CmdList_t
-{
- phNfc_eIso14443_4_Raw = 0x00U /**< ISO 14443-4 Exchange command:\n
+ the remote Mifare card\r
+ */\r
+ phNfc_eMifareInc = 0xC1U, /**< Increment. */\r
+ phNfc_eMifareDec = 0xC0U, /**< Decrement. */\r
+ phNfc_eMifareTransfer = 0xB0U, /**< Tranfer. */\r
+ phNfc_eMifareRestore = 0xC2U, /**< Restore. */\r
+ phNfc_eMifareReadSector = 0x38U, /**< Read Sector. */\r
+ phNfc_eMifareWriteSector= 0xA8U, /**< Write Sector. */\r
+ phNfc_eMifareInvalidCmd = 0xFFU /**< Invalid Command */\r
+} phNfc_eMifareCmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * The <em> T=Cl Command List Enumerator </em> lists all available T=Cl Commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef enum phNfc_eIso14443_4_CmdList_t\r
+{\r
+ phNfc_eIso14443_4_Raw = 0x00U /**< ISO 14443-4 Exchange command:\n\r
- This command sends the data buffer directly \r
- to the remote device */
-
-} phNfc_eIso14443_4_CmdList_t;
-
-
-/** \ingroup grp_hal_common
- *
- * The <em> NFCIP1 Command List Enumerator </em> lists all available NFCIP1 Commands.
- *
- * \note None.
- *
- */
-typedef enum phNfc_eNfcIP1CmdList_t
-{
- phNfc_eNfcIP1_Raw = 0x00U /**< NfcIP Exchange command:\n
+ to the remote device */\r
+\r
+} phNfc_eIso14443_4_CmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * The <em> NFCIP1 Command List Enumerator </em> lists all available NFCIP1 Commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef enum phNfc_eNfcIP1CmdList_t\r
+{\r
+ phNfc_eNfcIP1_Raw = 0x00U /**< NfcIP Exchange command:\n\r
- This command sends the data buffer directly \r
- to the remote device */
-}phNfc_eNfcIP1CmdList_t;
-
-
-/** \ingroup grp_hal_common
- *
- * The <em> ISO15693 Command List Enumerator </em> lists all available ISO15693 Commands.
- *
- * \note None.
- *
- */
-typedef enum phNfc_eIso15693_CmdList_t
-{
-#if 0
- phNfc_eIso15693_Raw = 0x00U, /**< ISO 15693 Exchange Raw command:\n
+ to the remote device */\r
+}phNfc_eNfcIP1CmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * The <em> ISO15693 Command List Enumerator </em> lists all available ISO15693 Commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef enum phNfc_eIso15693_CmdList_t\r
+{\r
+#if 0\r
+ phNfc_eIso15693_Raw = 0x00U, /**< ISO 15693 Exchange Raw command:\n\r
- This command sends the data buffer directly \r
- to the remote device */
-#endif
- phNfc_eIso15693_Cmd = 0x20U, /**< ISO 15693 Exchange command:\n
+ to the remote device */\r
+#endif\r
+ phNfc_eIso15693_Cmd = 0x20U, /**< ISO 15693 Exchange command:\n\r
- This command is used to access the card \r
- to the remote device */
- phNfc_eIso15693_Invalid = 0xFFU /**< Invalid Command */
-} phNfc_eIso15693_CmdList_t;
-
-
-/** \ingroup grp_hal_common
- *
- * The <em> Felica Command List Enumerator </em> lists all available Felica Commands.
- *
- * \note None.
- *
- */
-typedef enum phNfc_eFelicaCmdList_t
-{
- phNfc_eFelica_Raw = 0xF0U, /**< Felica Raw command:\n
+ to the remote device */\r
+ phNfc_eIso15693_Invalid = 0xFFU /**< Invalid Command */\r
+} phNfc_eIso15693_CmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * The <em> Felica Command List Enumerator </em> lists all available Felica Commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef enum phNfc_eFelicaCmdList_t\r
+{\r
+ phNfc_eFelica_Raw = 0xF0U, /**< Felica Raw command:\n\r
- This command sends the data buffer directly \r
- to the remote device */
- phNfc_eFelica_Check = 0x00, /**< Felica Check command:\n
- - This command checks the data from the Felica
- remote device */
- phNfc_eFelica_Update = 0x01, /**< Felica Update command:\n
- - This command updates the data onto the Felica
- remote device */
- phNfc_eFelica_Invalid = 0xFFU /**< Invalid Command */
-} phNfc_eFelicaCmdList_t;
-
-
-/** \ingroup grp_hal_common
- *
- * The <em> Jewel Command List Enumerator </em> lists all available Jewel Commands.
- *
- * \note None.
- *
- */
-typedef enum phNfc_eJewelCmdList_t
-{
- phNfc_eJewel_Raw = 0x00U, /**< Jewel command:\n
+ to the remote device */\r
+ phNfc_eFelica_Check = 0x00, /**< Felica Check command:\n\r
+ - This command checks the data from the Felica\r
+ remote device */\r
+ phNfc_eFelica_Update = 0x01, /**< Felica Update command:\n\r
+ - This command updates the data onto the Felica\r
+ remote device */\r
+ phNfc_eFelica_Invalid = 0xFFU /**< Invalid Command */\r
+} phNfc_eFelicaCmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ * The <em> Jewel Command List Enumerator </em> lists all available Jewel Commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef enum phNfc_eJewelCmdList_t\r
+{\r
+ phNfc_eJewel_Raw = 0x00U, /**< Jewel command:\n\r
- This command sends the data buffer directly \r
- to the remote device */
- phNfc_eJewel_Invalid = 0xFFU /**< Invalid jewel command */
-}phNfc_eJewelCmdList_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+ to the remote device */\r
+ phNfc_eJewel_Invalid = 0xFFU /**< Invalid jewel command */\r
+}phNfc_eJewelCmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief Remote Device Reader A RF Gate Information Container \r
-*
-* The <em> Reader A structure </em> includes the available information
+*\r
+* The <em> Reader A structure </em> includes the available information\r
* related to the discovered ISO14443A remote device. This information \r
-* is updated for every device discovery.
-* \note None.
-*
-*/
-typedef struct phNfc_sIso14443AInfo_t
-{
- uint8_t Uid[PHHAL_MAX_UID_LENGTH]; /**< UID information of the TYPE A
- Tag Discovered */
+* is updated for every device discovery.\r
+* \note None.\r
+*\r
+*/\r
+typedef struct phNfc_sIso14443AInfo_t\r
+{\r
+ uint8_t Uid[PHHAL_MAX_UID_LENGTH]; /**< UID information of the TYPE A\r
+ Tag Discovered */\r
uint8_t UidLength; /**< UID information length, shall not be greater \r
- than PHHAL_MAX_UID_LENGTH i.e., 10 */
+ than PHHAL_MAX_UID_LENGTH i.e., 10 */\r
uint8_t AppData[PHHAL_MAX_ATR_LENGTH]; /**< Application data information of the \r
tag discovered (= Historical bytes for \r
type A) */ \r
- uint8_t AppDataLength; /**< Application data length */
- uint8_t Sak; /**< SAK informationof the TYPE A
- Tag Discovered */
- uint8_t AtqA[PHHAL_ATQA_LENGTH]; /**< ATQA informationof the TYPE A
- Tag Discovered */
- uint8_t MaxDataRate; /**< Maximum data rate supported by the TYPE A
- Tag Discovered */
+ uint8_t AppDataLength; /**< Application data length */\r
+ uint8_t Sak; /**< SAK informationof the TYPE A\r
+ Tag Discovered */\r
+ uint8_t AtqA[PHHAL_ATQA_LENGTH]; /**< ATQA informationof the TYPE A\r
+ Tag Discovered */\r
+ uint8_t MaxDataRate; /**< Maximum data rate supported by the TYPE A\r
+ Tag Discovered */\r
uint8_t Fwi_Sfgt; /**< Frame waiting time and start up frame guard \r
time as defined in ISO/IEC 14443-4[7] for \r
- type A */
-} phNfc_sIso14443AInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+ type A */\r
+} phNfc_sIso14443AInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief Remote Device Reader B RF Gate Information Container \r
-*
-* The <em> Reader B structure </em> includes the available information
+*\r
+* The <em> Reader B structure </em> includes the available information\r
* related to the discovered ISO14443B remote device. This information \r
-* is updated for every device discovery.
-* \note None.
-*
-*/
+* is updated for every device discovery.\r
+* \note None.\r
+*\r
+*/\r
typedef struct phNfc_sIso14443BInfo_t \r
-{
- union phNfc_uAtqBInfo
- {
- struct phNfc_sAtqBInfo
- {
- uint8_t Pupi[PHHAL_PUPI_LENGTH]; /**< PUPI information of the TYPE B
- Tag Discovered */
- uint8_t AppData[PHHAL_APP_DATA_B_LENGTH]; /**< Application Data of the TYPE B
- Tag Discovered */
- uint8_t ProtInfo[PHHAL_PROT_INFO_B_LENGTH]; /**< Protocol Information of the TYPE B
- Tag Discovered */
- } AtqResInfo;
- uint8_t AtqRes[PHHAL_ATQB_LENGTH]; /**< ATQB Response Information of TYPE B
- Tag Discovered */
- } AtqB;
+{\r
+ union phNfc_uAtqBInfo\r
+ {\r
+ struct phNfc_sAtqBInfo\r
+ {\r
+ uint8_t Pupi[PHHAL_PUPI_LENGTH]; /**< PUPI information of the TYPE B\r
+ Tag Discovered */\r
+ uint8_t AppData[PHHAL_APP_DATA_B_LENGTH]; /**< Application Data of the TYPE B\r
+ Tag Discovered */\r
+ uint8_t ProtInfo[PHHAL_PROT_INFO_B_LENGTH]; /**< Protocol Information of the TYPE B\r
+ Tag Discovered */\r
+ } AtqResInfo;\r
+ uint8_t AtqRes[PHHAL_ATQB_LENGTH]; /**< ATQB Response Information of TYPE B\r
+ Tag Discovered */\r
+ } AtqB;\r
uint8_t HiLayerResp[PHHAL_MAX_ATR_LENGTH]; /**< Higher Layer Response information \r
in answer to ATRRIB Command for Type B */ \r
- uint8_t HiLayerRespLength; /**< Higher Layer Response length */
- uint8_t Afi; /**< Application Family Identifier of TYPE B
- Tag Discovered */
- uint8_t MaxDataRate; /**< Maximum data rate supported by the TYPE B
- Tag Discovered */
-} phNfc_sIso14443BInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+ uint8_t HiLayerRespLength; /**< Higher Layer Response length */\r
+ uint8_t Afi; /**< Application Family Identifier of TYPE B\r
+ Tag Discovered */\r
+ uint8_t MaxDataRate; /**< Maximum data rate supported by the TYPE B\r
+ Tag Discovered */\r
+} phNfc_sIso14443BInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief Remote Device Reader B prime RF Gate Information Container \r
-*
-*/
+*\r
+*/\r
typedef struct phNfc_sIso14443BPrimeInfo_t \r
-{
- /* TODO: This will be updated later */
- void *BPrimeCtxt;
-} phNfc_sIso14443BPrimeInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+{\r
+ /* TODO: This will be updated later */\r
+ void *BPrimeCtxt;\r
+} phNfc_sIso14443BPrimeInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief Remote Device Jewel Reader RF Gate Information Container \r
-*
-* The <em> Jewel Reader structure </em> includes the available information
+*\r
+* The <em> Jewel Reader structure </em> includes the available information\r
* related to the discovered Jewel remote device. This information \r
-* is updated for every device discovery.
-* \note None.
-*
-*/
+* is updated for every device discovery.\r
+* \note None.\r
+*\r
+*/\r
typedef struct phNfc_sJewelInfo_t \r
-{
- uint8_t Uid[PHHAL_MAX_UID_LENGTH]; /**< UID information of the TYPE A
- Tag Discovered */
+{\r
+ uint8_t Uid[PHHAL_MAX_UID_LENGTH]; /**< UID information of the TYPE A\r
+ Tag Discovered */\r
uint8_t UidLength; /**< UID information length, shall not be greater \r
- than PHHAL_MAX_UID_LENGTH i.e., 10 */
- uint8_t HeaderRom0; /**< Header Rom byte zero */
- uint8_t HeaderRom1; /**< Header Rom byte one */
-
-} phNfc_sJewelInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+ than PHHAL_MAX_UID_LENGTH i.e., 10 */\r
+ uint8_t HeaderRom0; /**< Header Rom byte zero */\r
+ uint8_t HeaderRom1; /**< Header Rom byte one */\r
+\r
+} phNfc_sJewelInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief Remote Device Felica Reader RF Gate Information Container \r
-*
-* The <em> Felica Reader structure </em> includes the available information
+*\r
+* The <em> Felica Reader structure </em> includes the available information\r
* related to the discovered Felica remote device. This information \r
-* is updated for every device discovery.
-* \note None.
-*
-*/
-typedef struct phNfc_sFelicaInfo_t
-{
- uint8_t IDm[(PHHAL_FEL_ID_LEN + 2)]; /**< Current ID of Felica tag */
+* is updated for every device discovery.\r
+* \note None.\r
+*\r
+*/\r
+typedef struct phNfc_sFelicaInfo_t\r
+{\r
+ uint8_t IDm[(PHHAL_FEL_ID_LEN + 2)]; /**< Current ID of Felica tag */\r
uint8_t IDmLength; /**< IDm length, shall not be greater \r
- than PHHAL_FEL_ID_LEN i.e., 8 */
- uint8_t PMm[PHHAL_FEL_PM_LEN]; /**< Current PM of Felica tag */
- uint8_t SystemCode[PHHAL_FEL_SYS_CODE_LEN]; /**< System code of Felica tag */
-} phNfc_sFelicaInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+ than PHHAL_FEL_ID_LEN i.e., 8 */\r
+ uint8_t PMm[PHHAL_FEL_PM_LEN]; /**< Current PM of Felica tag */\r
+ uint8_t SystemCode[PHHAL_FEL_SYS_CODE_LEN]; /**< System code of Felica tag */\r
+} phNfc_sFelicaInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief Remote Device Reader 15693 RF Gate Information Container \r
-*
-* The <em> Reader A structure </em> includes the available information
+*\r
+* The <em> Reader A structure </em> includes the available information\r
* related to the discovered ISO15693 remote device. This information \r
-* is updated for every device discovery.
-* \note None.
-*
-*/
-
-typedef struct phNfc_sIso15693Info_t
-{
- uint8_t Uid[PHHAL_15693_UID_LENGTH]; /**< UID information of the 15693
- Tag Discovered */
+* is updated for every device discovery.\r
+* \note None.\r
+*\r
+*/\r
+\r
+typedef struct phNfc_sIso15693Info_t\r
+{\r
+ uint8_t Uid[PHHAL_15693_UID_LENGTH]; /**< UID information of the 15693\r
+ Tag Discovered */\r
uint8_t UidLength; /**< UID information length, shall not be greater \r
- than PHHAL_15693_UID_LENGTH i.e., 8 */
- uint8_t Dsfid; /**< DSF information of the 15693
- Tag Discovered */
- uint8_t Flags; /**< Information about the Flags
- in the 15693 Tag Discovered */
- uint8_t Afi; /**< Application Family Identifier of
- 15693 Tag Discovered */
-} phNfc_sIso15693Info_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief NFC Data Rate Supported between the Reader and the Target
-*
+ than PHHAL_15693_UID_LENGTH i.e., 8 */\r
+ uint8_t Dsfid; /**< DSF information of the 15693\r
+ Tag Discovered */\r
+ uint8_t Flags; /**< Information about the Flags\r
+ in the 15693 Tag Discovered */\r
+ uint8_t Afi; /**< Application Family Identifier of\r
+ 15693 Tag Discovered */\r
+} phNfc_sIso15693Info_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief NFC Data Rate Supported between the Reader and the Target\r
+*\r
* The <em> \ref phHalNfc_eDataRate enum </em> lists all the Data Rate \r
-* values to be used to determine the rate at which the data is transmitted
-* to the target.
-*
-* \note None.
-*/
-
-
-/** \ingroup grp_hal_nfci
-*
+* values to be used to determine the rate at which the data is transmitted\r
+* to the target.\r
+*\r
+* \note None.\r
+*/\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief NFCIP1 Data rates \r
-*
-*/
-typedef enum phNfc_eDataRate_t{
+*\r
+*/\r
+typedef enum phNfc_eDataRate_t{\r
phNfc_eDataRate_106 = 0x00U, \r
phNfc_eDataRate_212, \r
phNfc_eDataRate_424, \r
/* phNfc_eDataRate_848, \r
phNfc_eDataRate_1696, \r
phNfc_eDataRate_3392, \r
- phNfc_eDataRate_6784,*/
+ phNfc_eDataRate_6784,*/\r
phNfc_eDataRate_RFU \r
-} phNfc_eDataRate_t;
-
-
-/** \ingroup grp_hal_nfci
-*
+} phNfc_eDataRate_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
* \brief NFCIP1 Gate Information Container \r
-*
-* The <em> NFCIP1 structure </em> includes the available information
+*\r
+* The <em> NFCIP1 structure </em> includes the available information\r
* related to the discovered NFCIP1 remote device. This information \r
-* is updated for every device discovery.
-* \note None.
-*
-*/
+* is updated for every device discovery.\r
+* \note None.\r
+*\r
+*/\r
typedef struct phNfc_sNfcIPInfo_t \r
-{
+{\r
/* Contains the random NFCID3I conveyed with the ATR_REQ. \r
always 10 bytes length \r
- or contains the random NFCID3T conveyed with the ATR_RES.
- always 10 bytes length */
+ or contains the random NFCID3T conveyed with the ATR_RES.\r
+ always 10 bytes length */\r
uint8_t NFCID[PHHAL_MAX_UID_LENGTH]; \r
- uint8_t NFCID_Length;
- /* ATR_RES = General bytes length, Max length = 48 bytes */
+ uint8_t NFCID_Length;\r
+ /* ATR_RES = General bytes length, Max length = 48 bytes */\r
uint8_t ATRInfo[PHHAL_MAX_ATR_LENGTH]; \r
- uint8_t ATRInfo_Length;
- /**< SAK information of the tag discovered */
- uint8_t SelRes;
- /**< ATQA information of the tag discovered */
- uint8_t SenseRes[PHHAL_ATQA_LENGTH];
- /**< Is Detection Mode of the NFCIP Target Active */
- uint8_t Nfcip_Active;
+ uint8_t ATRInfo_Length;\r
+ /**< SAK information of the tag discovered */\r
+ uint8_t SelRes;\r
+ /**< ATQA information of the tag discovered */\r
+ uint8_t SenseRes[PHHAL_ATQA_LENGTH];\r
+ /**< Is Detection Mode of the NFCIP Target Active */\r
+ uint8_t Nfcip_Active;\r
/**< Maximum frame length supported by the NFCIP device */ \r
- uint16_t MaxFrameLength;
- /**< Data rate supported by the NFCIP device */
- phNfc_eDataRate_t Nfcip_Datarate;
-
-} phNfc_sNfcIPInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief Remote Device Specific Information Container
-*
-* The <em> Remote Device Information Union </em> includes the available Remote Device Information
-* structures. Following the device detected, the corresponding data structure is used.
-*
-* \note None.
-*
-*/
-typedef union phNfc_uRemoteDevInfo_t
-{
- phNfc_sIso14443AInfo_t Iso14443A_Info;
- phNfc_sIso14443BInfo_t Iso14443B_Info;
- phNfc_sIso14443BPrimeInfo_t Iso14443BPrime_Info;
- phNfc_sNfcIPInfo_t NfcIP_Info;
- phNfc_sFelicaInfo_t Felica_Info;
- phNfc_sJewelInfo_t Jewel_Info;
- phNfc_sIso15693Info_t Iso15693_Info;
-} phNfc_uRemoteDevInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief RF Device Type Listing
-*
-* The <em> RF Device Type List </em> is used to identify the type of
-* remote device that is discovered/connected. There seperate
+ uint16_t MaxFrameLength;\r
+ /**< Data rate supported by the NFCIP device */\r
+ phNfc_eDataRate_t Nfcip_Datarate;\r
+\r
+} phNfc_sNfcIPInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief Remote Device Specific Information Container\r
+*\r
+* The <em> Remote Device Information Union </em> includes the available Remote Device Information\r
+* structures. Following the device detected, the corresponding data structure is used.\r
+*\r
+* \note None.\r
+*\r
+*/\r
+typedef union phNfc_uRemoteDevInfo_t\r
+{\r
+ phNfc_sIso14443AInfo_t Iso14443A_Info;\r
+ phNfc_sIso14443BInfo_t Iso14443B_Info;\r
+ phNfc_sIso14443BPrimeInfo_t Iso14443BPrime_Info;\r
+ phNfc_sNfcIPInfo_t NfcIP_Info;\r
+ phNfc_sFelicaInfo_t Felica_Info;\r
+ phNfc_sJewelInfo_t Jewel_Info;\r
+ phNfc_sIso15693Info_t Iso15693_Info;\r
+} phNfc_uRemoteDevInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief RF Device Type Listing\r
+*\r
+* The <em> RF Device Type List </em> is used to identify the type of\r
+* remote device that is discovered/connected. There seperate\r
* types to identify a Remote Reader (denoted by _PCD) and \r
-* Remote Tag (denoted by _PICC)
-* \note None.
-*
-*/
-typedef enum phNfc_eRFDevType_t
-{
- phNfc_eUnknown_DevType = 0x00U,
-
- /* Specific PCD Devices */
- phNfc_eISO14443_A_PCD,
- phNfc_eISO14443_B_PCD,
- phNfc_eISO14443_BPrime_PCD,
- phNfc_eFelica_PCD,
- phNfc_eJewel_PCD,
- phNfc_eISO15693_PCD,
- /* Generic PCD Type */
- phNfc_ePCD_DevType,
-
- /* Generic PICC Type */
- phNfc_ePICC_DevType,
- /* Specific PICC Devices */
- phNfc_eISO14443_A_PICC,
- phNfc_eISO14443_4A_PICC,
- phNfc_eISO14443_3A_PICC,
- phNfc_eMifare_PICC,
- phNfc_eISO14443_B_PICC,
- phNfc_eISO14443_4B_PICC,
- phNfc_eISO14443_BPrime_PICC,
- phNfc_eFelica_PICC,
- phNfc_eJewel_PICC,
- phNfc_eISO15693_PICC,
-
- /* NFC-IP1 Device Types */
+* Remote Tag (denoted by _PICC)\r
+* \note None.\r
+*\r
+*/\r
+typedef enum phNfc_eRFDevType_t\r
+{\r
+ phNfc_eUnknown_DevType = 0x00U,\r
+\r
+ /* Specific PCD Devices */\r
+ phNfc_eISO14443_A_PCD,\r
+ phNfc_eISO14443_B_PCD,\r
+ phNfc_eISO14443_BPrime_PCD,\r
+ phNfc_eFelica_PCD,\r
+ phNfc_eJewel_PCD,\r
+ phNfc_eISO15693_PCD,\r
+ /* Generic PCD Type */\r
+ phNfc_ePCD_DevType,\r
+\r
+ /* Generic PICC Type */\r
+ phNfc_ePICC_DevType,\r
+ /* Specific PICC Devices */\r
+ phNfc_eISO14443_A_PICC,\r
+ phNfc_eISO14443_4A_PICC,\r
+ phNfc_eISO14443_3A_PICC,\r
+ phNfc_eMifare_PICC,\r
+ phNfc_eISO14443_B_PICC,\r
+ phNfc_eISO14443_4B_PICC,\r
+ phNfc_eISO14443_BPrime_PICC,\r
+ phNfc_eFelica_PICC,\r
+ phNfc_eJewel_PICC,\r
+ phNfc_eISO15693_PICC,\r
+\r
+ /* NFC-IP1 Device Types */\r
phNfc_eNfcIP1_Target, \r
phNfc_eNfcIP1_Initiator, \r
-
- /* Other Sources */
- phNfc_eInvalid_DevType
-
-} phNfc_eRFDevType_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief Remote Device Type Listing
-*
-* The <em> Remote Device Type List </em> is used to identify the type of
-* remote device that is discovered/connected
-* \note This is same as RF Device Type List.
-*
-*/
-typedef phNfc_eRFDevType_t phNfc_eRemDevType_t;
-
-
-/** \ingroup grp_hal_common
- *
- *
- * \brief Common Command Attribute
- *
- * The <em> Hal Command Union </em> includes each available type of Commands.
- *
- * \note None.
- *
- */
-typedef union phNfc_uCommand_t
-{
- phNfc_eMifareCmdList_t MfCmd; /**< Mifare command structure. */
- phNfc_eIso14443_4_CmdList_t Iso144434Cmd; /**< ISO 14443-4 command structure. */
- phNfc_eFelicaCmdList_t FelCmd; /**< Felica command structure. */
- phNfc_eJewelCmdList_t JewelCmd; /**< Jewel command structure. */
- phNfc_eIso15693_CmdList_t Iso15693Cmd; /**< ISO 15693 command structure. */
- phNfc_eNfcIP1CmdList_t NfcIP1Cmd; /**< ISO 18092 (NFCIP1) command structure */
-} phNfc_uCmdList_t;
-
-
-/** \ingroup grp_hal_nfci
- *
- * \brief Remote Device Information Structure
- *
- * The <em> Remote Device Information Structure </em> holds information about one single Remote
- * Device detected by the polling function .\n
- * It lists parameters common to all supported remote devices.
- *
+\r
+ /* Other Sources */\r
+ phNfc_eInvalid_DevType\r
+\r
+} phNfc_eRFDevType_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief Remote Device Type Listing\r
+*\r
+* The <em> Remote Device Type List </em> is used to identify the type of\r
+* remote device that is discovered/connected\r
+* \note This is same as RF Device Type List.\r
+*\r
+*/\r
+typedef phNfc_eRFDevType_t phNfc_eRemDevType_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
+ *\r
+ * \brief Common Command Attribute\r
+ *\r
+ * The <em> Hal Command Union </em> includes each available type of Commands.\r
+ *\r
+ * \note None.\r
+ *\r
+ */\r
+typedef union phNfc_uCommand_t\r
+{\r
+ phNfc_eMifareCmdList_t MfCmd; /**< Mifare command structure. */\r
+ phNfc_eIso14443_4_CmdList_t Iso144434Cmd; /**< ISO 14443-4 command structure. */\r
+ phNfc_eFelicaCmdList_t FelCmd; /**< Felica command structure. */\r
+ phNfc_eJewelCmdList_t JewelCmd; /**< Jewel command structure. */\r
+ phNfc_eIso15693_CmdList_t Iso15693Cmd; /**< ISO 15693 command structure. */\r
+ phNfc_eNfcIP1CmdList_t NfcIP1Cmd; /**< ISO 18092 (NFCIP1) command structure */\r
+} phNfc_uCmdList_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+ *\r
+ * \brief Remote Device Information Structure\r
+ *\r
+ * The <em> Remote Device Information Structure </em> holds information about one single Remote\r
+ * Device detected by the polling function .\n\r
+ * It lists parameters common to all supported remote devices.\r
+ *\r
* \note \r
- *
- * \sa \ref phHal4Nfc_ConfigureDiscovery and \ref phHal4Nfc_Connect
- *
- */
-typedef struct phNfc_sRemoteDevInformation_t
-{
+ *\r
+ * \sa \ref phHal4Nfc_ConfigureDiscovery and \ref phHal4Nfc_Connect\r
+ *\r
+ */\r
+typedef struct phNfc_sRemoteDevInformation_t\r
+{\r
uint8_t SessionOpened; /**< [out] Boolean \r
- * Flag indicating the validity of
- * the handle of the remote device. */
+ * Flag indicating the validity of\r
+ * the handle of the remote device. */\r
phNfc_eRemDevType_t RemDevType; /**< [out] Remote device type which says that remote \r
is Reader A or Reader B or NFCIP or Felica or \r
- Reader B Prime or Jewel*/
- phNfc_uRemoteDevInfo_t RemoteDevInfo; /**< Union of available Remote Device.
- * \ref phNfc_uRemoteDevInfo_t Information. */
-} phNfc_sRemoteDevInformation_t;
-
-
-/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-/* TARGET STRUCTURES */
-
-
-/** \ingroup grp_hal_common
- *
+ Reader B Prime or Jewel*/\r
+ phNfc_uRemoteDevInfo_t RemoteDevInfo; /**< Union of available Remote Device.\r
+ * \ref phNfc_uRemoteDevInfo_t Information. */\r
+} phNfc_sRemoteDevInformation_t;\r
+\r
+\r
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
+/* TARGET STRUCTURES */\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+ *\r
* \brief Transceive Information Data Structure for sending commands/response \r
- * to the remote device
- *
+ * to the remote device\r
+ *\r
* The <em> Transceive Information Data Structure </em> is used to pass the \r
- * Command, Address (only required for MIFARE) and the send and receive data
- * data structure (buffer and length) for communication with remote device
- *
- *
- */
-typedef struct phNfc_sTransceiveInfo_t
-{
- phNfc_uCmdList_t cmd;
-
- /** \internal Address Field required for only Mifare
- * Family Proprietary Cards.
- * The Address Size is Valid only upto 255 Blocks limit
- * i:e for Mifare 4K
- */
- uint8_t addr;
- phNfc_sData_t sSendData;
- phNfc_sData_t sRecvData;
-} phNfc_sTransceiveInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief Poll Device Information for conifiguring the discovery wheel
- Reader and Card Emulation Phases
-*
+ * Command, Address (only required for MIFARE) and the send and receive data\r
+ * data structure (buffer and length) for communication with remote device\r
+ *\r
+ *\r
+ */\r
+typedef struct phNfc_sTransceiveInfo_t\r
+{\r
+ phNfc_uCmdList_t cmd;\r
+\r
+ /** \internal Address Field required for only Mifare\r
+ * Family Proprietary Cards.\r
+ * The Address Size is Valid only upto 255 Blocks limit\r
+ * i:e for Mifare 4K\r
+ */\r
+ uint8_t addr;\r
+ phNfc_sData_t sSendData;\r
+ phNfc_sData_t sRecvData;\r
+} phNfc_sTransceiveInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief Poll Device Information for conifiguring the discovery wheel\r
+ Reader and Card Emulation Phases\r
+*\r
* The <em> \ref phNfc_sPollDevInfo_t enum </em> is used to enable/disable \r
* phases of the discovery wheel related to specific reader types and \r
-* card emulation phase
-* \note Enabling specific Reader technology when NFCIP1 speed is set in the
-* phNfc_sADD_Cfg_t is implicitly done in HAL. Use this structure to only
-* enable/disable Card Reader Functionality
-*/
-typedef struct phNfc_sPollDevInfo_t
-{
+* card emulation phase\r
+* \note Enabling specific Reader technology when NFCIP1 speed is set in the\r
+* phNfc_sADD_Cfg_t is implicitly done in HAL. Use this structure to only\r
+* enable/disable Card Reader Functionality\r
+*/\r
+typedef struct phNfc_sPollDevInfo_t\r
+{\r
unsigned EnableIso14443A : 1; /**< Flag to enable \r
- Reader A discovery */
+ Reader A discovery */\r
unsigned EnableIso14443B : 1; /**< Flag to enable \r
- Reader B discovery */
- unsigned EnableFelica212 : 1; /**< Flag to enable
- Felica 212 discovery */
- unsigned EnableFelica424 : 1; /**< Flag to enable
- Felica 424 discovery */
+ Reader B discovery */\r
+ unsigned EnableFelica212 : 1; /**< Flag to enable\r
+ Felica 212 discovery */\r
+ unsigned EnableFelica424 : 1; /**< Flag to enable\r
+ Felica 424 discovery */\r
unsigned EnableIso15693 : 1; /**< Flag to enable \r
- ISO 15693 discovery */
+ ISO 15693 discovery */\r
unsigned EnableNfcActive : 1; /**< Flag to enable \r
Active Mode of NFC-IP discovery. \r
This is updated internally \r
- based on the NFC-IP speed.
- */
- unsigned RFU : 1; /**< Reserved for future use */
+ based on the NFC-IP speed.\r
+ */\r
+ unsigned RFU : 1; /**< Reserved for future use */\r
unsigned DisableCardEmulation : 1; /**< Flag to \r
- disable the card emulation */
-} phNfc_sPollDevInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief P2P speed for the Initiator
-*
+ disable the card emulation */\r
+} phNfc_sPollDevInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief P2P speed for the Initiator\r
+*\r
* The <em> \ref phNfc_eP2PMode_t enum </em> lists all the NFCIP1 speeds \r
-* to be used for configuring the NFCIP1 discovery
-*
-* \note None.
-*/
-typedef enum phNfc_eP2PMode_t
-{
- phNfc_eDefaultP2PMode = 0x00U,
- phNfc_ePassive106 = 0x01U,
- phNfc_ePassive212 = 0x02U,
- phNfc_ePassive424 = 0x04U,
- phNfc_eActive106 = 0x08U,
- phNfc_eActive212 = 0x10U,
- phNfc_eActive424 = 0x20U,
- phNfc_eP2P_ALL = 0x27U, /* All Passive and 424 Active */
- phNfc_eInvalidP2PMode = 0xFFU
-} phNfc_eP2PMode_t;
-
-
-/** \ingroup grp_hal_common
-*
-* \brief Identities the type of Notification
-*
-* This enumeration is used to specify the type of notification notified
-* to the upper layer. This classifies the notification into two types
-* one for the discovery notifications and the other for all the remaining
-* event notifications
-* \note None.
-*/
-typedef enum phNfc_eNotificationType_t
-{
- INVALID_NFC_NOTIFICATION = 0x00U, /* Invalid Notification */
- NFC_DISCOVERY_NOTIFICATION, /* Remote Device Discovery Notification */
- NFC_EVENT_NOTIFICATION /* Event Notification from the other hosts */
-} phNfc_eNotificationType_t;
-
-
-/** \ingroup grp_hal_common
-*
+* to be used for configuring the NFCIP1 discovery\r
+*\r
+* \note None.\r
+*/\r
+typedef enum phNfc_eP2PMode_t\r
+{\r
+ phNfc_eDefaultP2PMode = 0x00U,\r
+ phNfc_ePassive106 = 0x01U,\r
+ phNfc_ePassive212 = 0x02U,\r
+ phNfc_ePassive424 = 0x04U,\r
+ phNfc_eActive106 = 0x08U,\r
+ phNfc_eActive212 = 0x10U,\r
+ phNfc_eActive424 = 0x20U,\r
+ phNfc_eP2P_ALL = 0x27U, /* All Passive and 424 Active */\r
+ phNfc_eInvalidP2PMode = 0xFFU\r
+} phNfc_eP2PMode_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+*\r
+* \brief Identities the type of Notification\r
+*\r
+* This enumeration is used to specify the type of notification notified\r
+* to the upper layer. This classifies the notification into two types\r
+* one for the discovery notifications and the other for all the remaining\r
+* event notifications\r
+* \note None.\r
+*/\r
+typedef enum phNfc_eNotificationType_t\r
+{\r
+ INVALID_NFC_NOTIFICATION = 0x00U, /* Invalid Notification */\r
+ NFC_DISCOVERY_NOTIFICATION, /* Remote Device Discovery Notification */\r
+ NFC_EVENT_NOTIFICATION /* Event Notification from the other hosts */\r
+} phNfc_eNotificationType_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+*\r
* \brief \r
-*
-* \note None.
-*/
-typedef struct phNfc_sUiccInfo_t
-{
- /* AID and Parameter Information is obtained if the
- * eventType is NFC_EVT_TRANSACTION.
- */
- phNfc_sData_t aid;
- phNfc_sData_t param;
-
-} phNfc_sUiccInfo_t;
-
-
-/** \ingroup grp_hal_nfci
-*
-* \brief P2P Information for the Initiator
-*
-* The <em> \ref phNfc_sNfcIPCfg_t </em> holds the P2P related information
-* use by the NFC Device during P2P Discovery and connection
-*
-* \note None.
-*/
+*\r
+* \note None.\r
+*/\r
+typedef struct phNfc_sUiccInfo_t\r
+{\r
+ /* AID and Parameter Information is obtained if the\r
+ * eventType is NFC_EVT_TRANSACTION.\r
+ */\r
+ phNfc_sData_t aid;\r
+ phNfc_sData_t param;\r
+\r
+} phNfc_sUiccInfo_t;\r
+\r
+\r
+/** \ingroup grp_hal_nfci\r
+*\r
+* \brief P2P Information for the Initiator\r
+*\r
+* The <em> \ref phNfc_sNfcIPCfg_t </em> holds the P2P related information\r
+* use by the NFC Device during P2P Discovery and connection\r
+*\r
+* \note None.\r
+*/\r
typedef struct phNfc_sNfcIPCfg_t \r
-{
- /* ATR_RES = General bytes length, Max length = 48 bytes */
- uint8_t generalBytesLength;
+{\r
+ /* ATR_RES = General bytes length, Max length = 48 bytes */\r
+ uint8_t generalBytesLength;\r
uint8_t generalBytes[PHHAL_MAX_ATR_LENGTH]; \r
-
- /* TODO: This will be updated later for any additional params*/
-} phNfc_sNfcIPCfg_t;
-
-
-/** \ingroup grp_hal_common
-*
-* \brief Discovery Configuration Mode
-*
-* This enumeration is used to choose the Discovery Configuration
+\r
+ /* TODO: This will be updated later for any additional params*/\r
+} phNfc_sNfcIPCfg_t;\r
+\r
+\r
+/** \ingroup grp_hal_common\r
+*\r
+* \brief Discovery Configuration Mode\r
+*\r
+* This enumeration is used to choose the Discovery Configuration\r
* Mode :- Configure and Start, Stop or Start with last set \r
-* configuration
-* \note None.
-*/
-typedef enum phNfc_eDiscoveryConfigMode_t
-{
+* configuration\r
+* \note None.\r
+*/\r
+typedef enum phNfc_eDiscoveryConfigMode_t\r
+{\r
NFC_DISCOVERY_CONFIG = 0x00U,/**< Configure discovery with values \r
in phNfc_sADD_Cfg_t and start \r
- discovery */
- NFC_DISCOVERY_START, /**< Start Discovery with previously set
- configuration */
- NFC_DISCOVERY_STOP, /**< Stop the Discovery */
+ discovery */\r
+ NFC_DISCOVERY_START, /**< Start Discovery with previously set\r
+ configuration */\r
+ NFC_DISCOVERY_STOP, /**< Stop the Discovery */\r
NFC_DISCOVERY_RESUME /**< Resume the Discovery with previously \r
- * set configuration.
- * This is valid only when the Target
- * is not connected.
- */
-}phNfc_eDiscoveryConfigMode_t;
-
-/** \ingroup grp_hal_common
-*
-* \brief Target or Tag Release Mode
-*
+ * set configuration.\r
+ * This is valid only when the Target\r
+ * is not connected.\r
+ */\r
+}phNfc_eDiscoveryConfigMode_t;\r
+\r
+/** \ingroup grp_hal_common\r
+*\r
+* \brief Target or Tag Release Mode\r
+*\r
* This enumeration defines various modes of releasing an acquired target \r
-* or tag.
-* \note None.
-*/
-typedef enum phNfc_eReleaseType_t
-{
- NFC_INVALID_RELEASE_TYPE =0x00U,/**<Invalid release type */
+* or tag.\r
+* \note None.\r
+*/\r
+typedef enum phNfc_eReleaseType_t\r
+{\r
+ NFC_INVALID_RELEASE_TYPE =0x00U,/**<Invalid release type */\r
NFC_DISCOVERY_RESTART, /**< Release current target and \r
- restart discovery within same technology*/
- NFC_DISCOVERY_CONTINUE, /**< Release current target and continue
- discovery with next technology in the wheel */
- NFC_SMARTMX_RELEASE /**< Release SmartMX from wired mode to previous mode
- (Virtual or Off) */
-} phNfc_eReleaseType_t;
-
-/** \ingroup grp_hal_common
-*
-* \brief Poll configuration structure
-*
+ restart discovery within same technology*/\r
+ NFC_DISCOVERY_CONTINUE, /**< Release current target and continue\r
+ discovery with next technology in the wheel */\r
+ NFC_SMARTMX_RELEASE /**< Release SmartMX from wired mode to previous mode\r
+ (Virtual or Off) */\r
+} phNfc_eReleaseType_t;\r
+\r
+/** \ingroup grp_hal_common\r
+*\r
+* \brief Poll configuration structure\r
+*\r
* The <em> Poll configuration structure </em> holds information about the \r
* enabling the the type of discovery required by the application. This \r
-* structure is the input parameter for the discovery call
-*
-* \note All members of this structure are input parameters [out].
-*
-* \sa \ref phNfc_eP2PMode_t
-*
-*/
-typedef struct phNfc_sADD_Cfg_t
-{
+* structure is the input parameter for the discovery call\r
+*\r
+* \note All members of this structure are input parameters [out].\r
+*\r
+* \sa \ref phNfc_eP2PMode_t\r
+*\r
+*/\r
+typedef struct phNfc_sADD_Cfg_t\r
+{\r
union \r
- {
+ {\r
phNfc_sPollDevInfo_t PollCfgInfo; /**< Enable/Disable Specific \r
Reader Functionality and \r
Card Emulation */ \r
- unsigned PollEnabled; /** Can be used to set polling 'Off'
- by setting PollEnabled to zero */
-
- } PollDevInfo;
+ unsigned PollEnabled; /** Can be used to set polling 'Off'\r
+ by setting PollEnabled to zero */\r
+\r
+ } PollDevInfo;\r
uint32_t Duration; /**< Duration of virtual or idle \r
- period in microseconds in the step size
- of 48 microseconds.If duration is set less
- than 48 microseconds then default value is
+ period in microseconds in the step size\r
+ of 48 microseconds.If duration is set less\r
+ than 48 microseconds then default value is\r
used.For more details please refer PN 544 \r
- user manual*/
- uint8_t NfcIP_Mode ; /**< Select the P2P
- speeds using phNfc_eP2PMode_t type.
+ user manual*/\r
+ uint8_t NfcIP_Mode ; /**< Select the P2P\r
+ speeds using phNfc_eP2PMode_t type.\r
This is used to enable NFC-IP Discovery \r
- The related Reader Type will be implicitly
- selected */
+ The related Reader Type will be implicitly\r
+ selected */\r
uint8_t NfcIP_Tgt_Disable; /**< Flag to \r
- disable the NFCIP1 TARGET */
-} phNfc_sADD_Cfg_t;
-
-/*@}*/
-
-#endif /* PHNFCTYPES */
-
+ disable the NFCIP1 TARGET */\r
+} phNfc_sADD_Cfg_t;\r
+\r
+/*@}*/\r
+\r
+#endif /* PHNFCTYPES */\r
+\r