15d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
25d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Copyright (C) 2010 NXP Semiconductors
35d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
45d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Licensed under the Apache License, Version 2.0 (the "License");
55d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * you may not use this file except in compliance with the License.
65d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * You may obtain a copy of the License at
75d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
85d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *      http://www.apache.org/licenses/LICENSE-2.0
95d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Unless required by applicable law or agreed to in writing, software
115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * distributed under the License is distributed on an "AS IS" BASIS,
125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * See the License for the specific language governing permissions and
145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * limitations under the License.
155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*
185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \file  phNfcTypes.h
195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \brief Basic type definitions.
205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Project: NFC MW / HAL
225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $Date: Thu Jun 25 21:24:53 2009 $
245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $Author: ing04880 $
255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $Revision: 1.13 $
265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * $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 $
275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef PHNFCTYPES /* */
315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHNFCTYPES /* */
325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \name NFC Types
355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * File: \ref phNfcTypes.h
375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@{*/
405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHNFCTYPES_FILEREVISION "$Revision: 1.13 $" /**< \ingroup grp_file_attributes */
415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#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 */
425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef _WIN32
455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <stdint.h>
465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#else
475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <Windows.h>
485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#include <stdio.h>
495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define snprintf _snprintf
505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef linux
525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \name Basic Type Definitions
545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Constant-length-type definition ('C99).
565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@{*/
595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __int8_t_defined /* */
605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define __int8_t_defined /* */
615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef signed   char   int8_t;         /**<  \ingroup grp_nfc_common
625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                               8 bit signed integer */
635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __int16_t_defined /* */
665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define __int16_t_defined /* */
675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef signed   short  int16_t;        /**< \ingroup grp_nfc_common
685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                             16 bit signed integer */
695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __stdint_h
725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __int32_t_defined /* */
735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define __int32_t_defined /* */
745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef signed   long   int32_t;        /**< \ingroup grp_nfc_common
755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                             32 bit signed integer */
765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __uint8_t_defined /* */
805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define __uint8_t_defined /* */
815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef unsigned char   uint8_t;        /**<  \ingroup grp_nfc_common
825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              8 bit unsigned integer */
835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __uint16_t_defined /* */
865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define __uint16_t_defined /* */
875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef unsigned short  uint16_t;       /**< \ingroup grp_nfc_common
885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                             16 bit unsigned integer */
895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __stdint_h
925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef __uint32_t_defined /* */
935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define __uint32_t_defined /* */
945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef unsigned long   uint32_t;       /**< \ingroup grp_nfc_common
955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                             32 bit unsigned integer */
965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif /* linux */
1005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif /* _WIN32 */
1025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef TRUE
1045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define TRUE			(0x01)			  /**< \ingroup grp_nfc_common
1055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Logical True Value */
1065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
1075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef FALSE
1095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define FALSE			(0x00)			  /**< \ingroup grp_nfc_common
1105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Logical False Value */
1115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
1125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef uint8_t			utf8_t;			/**< \ingroup grp_nfc_common
1145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                             UTF8 Character String */
1155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef uint8_t			bool_t;			/**< \ingroup grp_nfc_common
1175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly												boolean data type */
1185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef uint16_t        NFCSTATUS;      /**< \ingroup grp_nfc_common
1205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                             NFC return values
1215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                         \ref phNfcStatus.h for different status
1225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                          values */
1235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifndef NULL
1255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NULL  ((void *)0)
1265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
1275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/* This Macro to be used to resolve Unused and unreference
1295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * compiler warnings.
1305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHNFC_UNUSED_VARIABLE(x) for((x)=(x);(x)!=(x);)
1335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
1355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
1375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \name HAL Overall Definitions
1395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Definitions applicable to a variety of purposes and functions/features.
1415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
1425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
1435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly /*@{*/
1445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_COMMON_MAX_STRING_LENGTH  0x40U     /**< \ingroup grp_hal_common
1465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     Maximum vendor name length in bytes. */
1475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_UNKNOWN_DEVICE_TYPE       0x00U   /**< \ingroup grp_hal_common
1485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     Unknown device type. */
1495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_SERIAL_DEVICE             0x01U  /**< \ingroup grp_hal_common
1505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     Serial device type.  */
1515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_USB_DEVICE                0x02U   /**< \ingroup grp_hal_common
1525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     USB device type. */
1535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_I2C_DEVICE                0x03U   /**< \ingroup grp_hal_common
1545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     I2C device type. */
1555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_SPI_DEVICE                0x04U   /**< \ingroup grp_hal_common
1565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     SPI device type. */
1575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_PARALLEL_DEVICE           0x05U   /**< \ingroup grp_hal_common
1585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     Parallel device type. */
1595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_NFCID_LENGTH              0x0AU  /**< \ingroup grp_hal_common
1605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     Maximum length of NFCID 1..3. */
1615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_MAX_DATASIZE              0xFBU       /* 256 * Maximum Data size sent
1635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     * by the HAL
1645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     */
1655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_ATQA_LENGTH               0x02U       /**< ATQA length */
1675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_MAX_UID_LENGTH            0x0AU       /**< Maximum UID length expected */
1685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_MAX_ATR_LENGTH            0x30U       /**< Maximum ATR_RES (General Bytes)
1695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     *   length expected */
1705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_ATQB_LENGTH               0x0BU       /**< ATQB length */
1725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_PUPI_LENGTH               0x04U       /**< PUPI length */
1745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_APP_DATA_B_LENGTH         0x04U       /**< Application Data length for Type B */
1755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_PROT_INFO_B_LENGTH        0x03U       /**< Protocol info length for Type B */
1765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_FEL_SYS_CODE_LEN          0x02U       /**< Felica System Code Length */
1775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_FEL_ID_LEN                0x08U       /**< Felica current ID Length */
1785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_FEL_PM_LEN                0x08U       /**< Felica current PM Length */
1795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PHHAL_15693_UID_LENGTH          0x08U       /**< Length of the Inventory bytes for
1805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                         ISO15693 Tag */
1815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define VENDOR_NAME_LEN                 0x14U
1835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MAX_TRANSFER_UNIT               0x21U
1845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define SESSIONID_SIZE                  0x08U
1855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MAX_AID_LEN                     0x10U
1865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MAX_UICC_PARAM_LEN              0xFFU
1875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MIFARE_BITMASK                  0x08U
1895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ISO_14443_BITMASK               0x20U
1905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define ISO_14443_DETECTED              0x20U
1915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCIP_BITMASK                   0x40U
1925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFCIP_DETECTED                  0x40U
1935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define MAX_TARGET_SUPPORTED            MAX_REMOTE_DEVICES
1955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NFC_HW_PN65N                    0x10U
1975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NXP_NFCIP_NFCID2_ID             0x01FEU
1995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define NXP_FULL_VERSION_LEN            0x0BU
2015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
2045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \name NFC specific Type Definitions
2085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@{*/
2115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Data Buffer Structure to hold the Data Buffer
2145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * This structure holds the Data in the Buffer of the specified
2165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * size.
2175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sData_t
2205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
2215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t             *buffer;
2225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t            length;
2235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sData_t;
2245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \brief Possible Hardware Configuration exposed to upper layer.
2275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Typically this should be at least the communication link (Ex:"COM1","COM2")
2285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * the controller is connected to.
2295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phLibNfc_sConfig_t
2315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
232b99be65c277b0cc65a00a33e784ed49461531737Martijn Coenen   /** Device node of the controller */
233b99be65c277b0cc65a00a33e784ed49461531737Martijn Coenen   const char*               deviceNode;
2345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly   /** The client ID (thread ID or message queue ID) */
235a5282496f1c25f5c8cfefd3b8bc4220ee2192881Colin Cross   intptr_t                  nClientId;
2365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phLibNfc_sConfig_t, *pphLibNfc_sConfig_t;
2375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*!
2405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * NFC Message structure contains message specific details like
2415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * message type, message specific data block details, etc.
2425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phLibNfc_Message_t
2445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
2455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t eMsgType;/**< Type of the message to be posted*/
2465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void   * pMsgData;/**< Pointer to message specific data block in case any*/
2475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t Size;/**< Size of the datablock*/
2485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phLibNfc_Message_t,*pphLibNfc_Message_t;
2495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#ifdef WIN32
2525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PH_LIBNFC_MESSAGE_BASE  (WM_USER+0x3FF)
2535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
2545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * Deferred message. This message type will be posted to the client application thread
2565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * to notify that a deferred call must be invoked.
2575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#define PH_LIBNFC_DEFERREDCALL_MSG			  (0x311)
2595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *\brief Deferred call declaration.
2625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * This type of API is called from ClientApplication ( main thread) to notify
2635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * specific callback.
2645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef  void (*pphLibNfc_DeferredCallback_t) (void*);
2665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *\brief Deferred parameter declaration.
2685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * This type of data is passed as parameter from ClientApplication (main thread) to the
2695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * callback.
2705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef  void *pphLibNfc_DeferredParameter_t;
2725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/**
2735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *\brief Deferred message specific info declaration.
2745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * This type of information is packed as message data when \ref PH_LIBNFC_DEFERREDCALL_MSG
2755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * type message is posted to message handler thread.
2765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phLibNfc_DeferredCall_t
2785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
2795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly		pphLibNfc_DeferredCallback_t  pCallback;/**< pointer to Deferred callback */
2805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly		pphLibNfc_DeferredParameter_t pParameter;/**< pointer to Deferred parameter */
2815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phLibNfc_DeferredCall_t;
2825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
2845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup  grp_hal_common
2855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \brief Protocol Support Information
2875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Supported Protocols Structure </em> holds all protocol supported by the current NFC
2895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  device.
2905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \note All members of this structure are output parameters [out].
2925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
2935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
2945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sSupProtocol_t
2955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
2965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int MifareUL    : 1;  /**< Protocol Mifare Ultra Light or
2975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                   any NFC Forum Type-2 tags */
2985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int MifareStd   : 1;  /**< Protocol Mifare Standard. */
2995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int ISO14443_4A : 1;  /**< Protocol ISO14443-4 Type A.  */
3005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int ISO14443_4B : 1;  /**< Protocol ISO14443-4 Type B.  */
3015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int ISO15693    : 1;  /**< Protocol ISO15693 HiTag.  */
3025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int Felica      : 1;  /**< Protocol Felica. */
3035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int NFC         : 1;  /**< Protocol NFC. */
3045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned int Jewel       : 1;  /**< Protocol Innovision Jewel Tag. */
3055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /*** TODO: Add SWP, ETSI HCI to this list **/
3065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sSupProtocol_t;
3075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
3105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \brief Information related to the NFC Device
3135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Device Information Structure </em> holds information
3155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  related to the NFC IC read during initialization time.
3165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  It allows the caller firware, hardware version, the model id,
3175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  HCI verison supported and vendor name. Refer to the NFC Device
3185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  User Manual on how to interpret each of the values. In addition
3195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  it also contains capabilities of the NFC Device such as the
3205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  protocols supported in Reader and emulation mode
3215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
3235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sDeviceCapabilities_t
3245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
3255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* */
3265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t                hal_version; /**< \ingroup grp_hal_common
3275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              HAL 4.0 Version Information. */
3285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t                fw_version; /**< \ingroup grp_hal_common
3295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Firmware Version Info. */
3305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t                hw_version; /**< \ingroup grp_hal_common
3315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Hardware Version Info. */
3325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                 model_id;   /**< \ingroup grp_hal_common
3335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              IC Variant . */
3345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                 hci_version; /**< \ingroup grp_hal_common
3355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              ETSI HCI Version Supported */
3365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    utf8_t                  vendor_name[VENDOR_NAME_LEN]; /**< \ingroup grp_hal_common
3375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Vendor name (Null terminated string)*/
3385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                 full_version[NXP_FULL_VERSION_LEN];
3395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sSupProtocol_t    ReaderSupProtocol; /**< Supported protocols
3415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                      (Bitmapped) in Reader mode. */
3425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sSupProtocol_t    EmulationSupProtocol;    /**< Supported protocols
3435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       (Bitmapped) in Emulation
3445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        mode. */
3455e97605ca8d83414b122bae72e65ea388b66718adaniel_Tomas    char                    firmware_update_info; /** */
3465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sDeviceCapabilities_t;
3475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
3505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
3535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \brief Enumerated MIFARE Commands
3555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Mifare Command List Enumerator </em> lists all available Mifare native commands.
3575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
3595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
3605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
3615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eMifareCmdList_t
3625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
3635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareRaw        = 0x00U,     /**< This command performs raw transcations .
3645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Format of the phLibNfc_sTransceiveInfo_t
3655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              content in this case shall be as below:
3665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �   cmd: filed shall set to  phHal_eMifareRaw .
3675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �   addr : doesn't carry any significance.
3685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �   sSendData : Shall contain formatted raw buffer
3695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                based on MIFARE commands type used.
3705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                Formatted buffer shall follow below
3715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                formating scheme.
3725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
3735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              CmdType+ Block No + CommandSpecific data + 2 byte CRC
3745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Ex: With  Write  4 byte command  on block 8  looks as
3755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              " 0xA2,0x08,0x01,0x02,0x03,0x04,CRC1,CRC2
3765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Note :  For MIFARE Std card we recommend use MIFARE
3775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                      commands directly.
3785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                           */
3795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareAuthentA   = 0x60U,     /**< Mifare Standard:\n
3805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              This command performs an authentication with KEY A for a sector.\n
3815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Format of the phLibNfc_sTransceiveInfo_t content in this case is :
3825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       cmd: field shall set to  phHal_eMifareAuthentA .
3835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       addr : indicates MIFARE block address.
3845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                           Ex: 0x08 indicates block 8 needs to be authenticated.
3855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       sSendData : Shall contain authentication key values.
3865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    sSendData ,buffer shall contain authentication
3875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    key values 01 02 03 04 05 06 authenticates
3885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    block 08 with the key 0x01[..]06. If this
3895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    command fails, then  user needs to reactivate
3905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    the remote Mifare card.
3915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                          */
3925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareAuthentB   = 0x61U,     /**< Mifare Standard:\n
3935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              This command performs an authentication with KEY B for a sector.\n
3945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Format of the phLibNfc_sTransceiveInfo_t content in this case is :
3955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       cmd: field shall set to  phHal_eMifareAuthentB .
3965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       addr : indicates MIFARE block address.
3975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                           Ex: 0x08 indicates block 8 needs to be authenticated.
3985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       sSendData : Shall contain authentication key values.
3995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    sSendData ,buffer shall contain authentication
4005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    key values 01 02 03 04 05 06 authenticates
4015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    block 08 with the key 0x01[..]06. If this
4025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    command fails, then  user needs to reactivate
4035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    the remote Mifare card.
4045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                          */
4055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareRead16     = 0x30U,     /**< Mifare Standard and Ultra Light:\n
4065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Read 16 Bytes from a Mifare Standard block or 4 Mifare Ultra Light pages.\n
4075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Format of the phLibNfc_sTransceiveInfo_t content in this case is :
4085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       cmd: field shall set to  phHal_eMifareRead16 .
4095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       addr : memory adress to read.
4105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       sRecvData : Shall contain buffer of size 16
4115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    to read the data into.
4125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              If this command fails, the user needs to reactivate the
4145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              the remote Mifare card
4155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                          */
4165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareRead       = 0x30U,
4175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareWrite16    = 0xA0U,     /**< Mifare Standard and Ultra Light:\n
4185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Write 16 Bytes to a Mifare Standard block or 4 Mifare Ultra Light pages.\n
4195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Format of the phLibNfc_sTransceiveInfo_t content in this case is :
4205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       cmd: field shall set to  phHal_eMifareWrite16 .
4215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       addr : starting memory adress to write from.
4225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       sSendData : Shall contain buffer of size 16 containing
4235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    the data bytes to be written.
4245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              If this command fails, the user needs to reactivate the
4265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              the remote Mifare card
4275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                           */
4285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareWrite4     = 0xA2U,     /**< Mifare Ultra Light:\n
4295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Write 4 bytes.\n
4305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              Format of the phLibNfc_sTransceiveInfo_t content in this case is :
4315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       cmd: field shall set to  phHal_eMifareWrite4 .
4325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       addr : starting memory adress to write from.
4335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                �       sSendData : Shall contain buffer of size 4 containing
4345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    the data bytes to be written.
4355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              If this command fails, the user needs to reactivate the
4375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                              the remote Mifare card
4385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                          */
4395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareInc        = 0xC1U,     /**< Increment. */
4405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareDec        = 0xC0U,     /**< Decrement. */
4415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareTransfer   = 0xB0U,     /**< Tranfer.   */
4425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareRestore    = 0xC2U,     /**< Restore.   */
4435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareReadSector = 0x38U,     /**< Read Sector.   */
4445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareWriteSector= 0xA8U,     /**< Write Sector.   */
4455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifareInvalidCmd = 0xFFU      /**< Invalid Command */
4465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eMifareCmdList_t;
4475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
4505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> T=Cl Command List Enumerator </em> lists all available T=Cl Commands.
4525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
4545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
4565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eIso14443_4_CmdList_t
4575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
4585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eIso14443_4_Raw             = 0x00U /**< ISO 14443-4 Exchange command:\n
4595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command sends the data buffer directly
4605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 to the remote device */
4615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eIso14443_4_CmdList_t;
4635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
4665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> NFCIP1 Command List Enumerator </em> lists all available NFCIP1 Commands.
4685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
4705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
4725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eNfcIP1CmdList_t
4735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
4745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly       phNfc_eNfcIP1_Raw             = 0x00U /**< NfcIP Exchange command:\n
4755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command sends the data buffer directly
4765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                  to the remote device */
4775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phNfc_eNfcIP1CmdList_t;
4785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
4805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
4815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> ISO15693 Command List Enumerator </em> lists all available ISO15693 Commands.
4835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
4855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
4865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
4875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eIso15693_CmdList_t
4885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
4895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#if 0
4905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eIso15693_Raw             = 0x00U, /**< ISO 15693 Exchange Raw command:\n
4915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command sends the data buffer directly
4925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 to the remote device */
4935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif
4945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eIso15693_Cmd             = 0x20U, /**< ISO 15693 Exchange command:\n
4955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command is used to access the card
4965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 to the remote device */
4975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eIso15693_Invalid         = 0xFFU      /**< Invalid Command */
4985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eIso15693_CmdList_t;
4995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
5025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
5035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Felica Command List Enumerator </em> lists all available Felica Commands.
5045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
5055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
5065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
5075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
5085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eFelicaCmdList_t
5095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
5105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eFelica_Raw             = 0xF0U, /**< Felica Raw command:\n
5115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command sends the data buffer directly
5125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 to the remote device */
5135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eFelica_Check           = 0x00, /**< Felica Check command:\n
5145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command checks the data from the Felica
5155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                  remote device */
5165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eFelica_Update          = 0x01, /**< Felica Update command:\n
5175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command updates the data onto the Felica
5185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                  remote device */
5195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eFelica_Invalid         = 0xFFU      /**< Invalid Command */
5205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eFelicaCmdList_t;
5215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
5245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
5255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Jewel Command List Enumerator </em> lists all available Jewel Commands.
5265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
5275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
5285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
5295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
5305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eJewelCmdList_t
5315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
5325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eJewel_Raw            = 0x00U, /**< Jewel command:\n
5335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 - This command sends the data buffer directly
5345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                 to the remote device */
5355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eJewel_Invalid        = 0xFFU  /**< Invalid jewel command */
5365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phNfc_eJewelCmdList_t;
5375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
5405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
5415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Reader A RF Gate Information Container
5425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
5435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Reader A structure </em> includes the available information
5445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  related to the discovered ISO14443A remote device. This information
5455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  is updated for every device discovery.
5465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
5475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
5485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
5495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sIso14443AInfo_t
5505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
5515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Uid[PHHAL_MAX_UID_LENGTH];      /**< UID information of the TYPE A
5525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       Tag Discovered */
5535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         UidLength;                      /**< UID information length, shall not be greater
5545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    than PHHAL_MAX_UID_LENGTH i.e., 10 */
5555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         AppData[PHHAL_MAX_ATR_LENGTH]; /**< Application data information of the
5565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        tag discovered (= Historical bytes for
5575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        type A) */
5585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         AppDataLength;                  /**< Application data length */
5595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Sak;                            /**< SAK informationof the TYPE A
5605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       Tag Discovered */
5615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         AtqA[PHHAL_ATQA_LENGTH];        /**< ATQA informationof the TYPE A
5625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       Tag Discovered */
5635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         MaxDataRate;                    /**< Maximum data rate supported by the TYPE A
5645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       Tag Discovered */
5655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Fwi_Sfgt;                       /**< Frame waiting time and start up frame guard
5665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    time as defined in ISO/IEC 14443-4[7] for
5675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    type A */
5685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sIso14443AInfo_t;
5695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
5715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
5725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
5735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Reader B RF Gate Information Container
5745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
5755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Reader B structure </em> includes the available information
5765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  related to the discovered ISO14443B remote device. This information
5775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  is updated for every device discovery.
5785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
5795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
5805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
5815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sIso14443BInfo_t
5825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
5835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    union phNfc_uAtqBInfo
5845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    {
5855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        struct phNfc_sAtqBInfo
5865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        {
5875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly            uint8_t         Pupi[PHHAL_PUPI_LENGTH];            /**< PUPI information  of the TYPE B
5885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    Tag Discovered */
5895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly            uint8_t         AppData[PHHAL_APP_DATA_B_LENGTH];   /**< Application Data  of the TYPE B
5905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    Tag Discovered */
5915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly            uint8_t         ProtInfo[PHHAL_PROT_INFO_B_LENGTH]; /**< Protocol Information  of the TYPE B
5925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                    Tag Discovered */
5935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        } AtqResInfo;
5945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        uint8_t         AtqRes[PHHAL_ATQB_LENGTH];          /**< ATQB Response Information of TYPE B
5955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                Tag Discovered */
5965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    } AtqB;
5975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         HiLayerResp[PHHAL_MAX_ATR_LENGTH];  /**< Higher Layer Response information
5985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                             in answer to ATRRIB Command for Type B */
5995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         HiLayerRespLength;                  /**< Higher Layer Response length */
6005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Afi;                                /**< Application Family Identifier of TYPE B
6015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                                Tag Discovered */
6025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         MaxDataRate;                        /**< Maximum data rate supported by the TYPE B
6035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                             Tag Discovered */
6045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sIso14443BInfo_t;
6055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
6085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Reader B prime RF Gate Information Container
6105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
6125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sIso14443BPrimeInfo_t
6135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
6145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* TODO: This will be updated later */
6155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    void *BPrimeCtxt;
6165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sIso14443BPrimeInfo_t;
6175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
6205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Jewel Reader RF Gate Information Container
6225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Jewel Reader structure </em> includes the available information
6245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  related to the discovered Jewel remote device. This information
6255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  is updated for every device discovery.
6265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
6275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
6295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sJewelInfo_t
6305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
6315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Uid[PHHAL_MAX_UID_LENGTH];      /**< UID information of the TYPE A
6325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                         Tag Discovered */
6335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         UidLength;                      /**< UID information length, shall not be greater
6345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    than PHHAL_MAX_UID_LENGTH i.e., 10 */
6355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         HeaderRom0; /**< Header Rom byte zero */
6365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         HeaderRom1; /**< Header Rom byte one */
6375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sJewelInfo_t;
6395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
6425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Felica Reader RF Gate Information Container
6445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Felica Reader structure </em> includes the available information
6465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  related to the discovered Felica remote device. This information
6475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  is updated for every device discovery.
6485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
6495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
6515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sFelicaInfo_t
6525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
6535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     IDm[(PHHAL_FEL_ID_LEN + 2)];              /**< Current ID of Felica tag */
6545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     IDmLength;                          /**< IDm length, shall not be greater
6555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    than PHHAL_FEL_ID_LEN i.e., 8 */
6565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     PMm[PHHAL_FEL_PM_LEN];              /**< Current PM of Felica tag */
6575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t     SystemCode[PHHAL_FEL_SYS_CODE_LEN]; /**< System code of Felica tag */
6585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sFelicaInfo_t;
6595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
6625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Reader 15693 RF Gate Information Container
6645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Reader A structure </em> includes the available information
6665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  related to the discovered ISO15693 remote device. This information
6675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  is updated for every device discovery.
6685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
6695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
6715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sIso15693Info_t
6735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
6745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Uid[PHHAL_15693_UID_LENGTH];      /**< UID information of the 15693
6755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       Tag Discovered */
6765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         UidLength;                      /**< UID information length, shall not be greater
6775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    than PHHAL_15693_UID_LENGTH i.e., 8 */
6785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Dsfid;                          /**< DSF information of the 15693
6795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                       Tag Discovered */
6805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Flags;                          /**< Information about the Flags
6815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        in the 15693 Tag Discovered */
6825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Afi;                            /**< Application Family Identifier of
6835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                          15693 Tag Discovered */
6845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sIso15693Info_t;
6855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
6885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief NFC Data Rate Supported between the Reader and the Target
6905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> \ref phHalNfc_eDataRate enum </em> lists all the Data Rate
6925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  values to be used to determine the rate at which the data is transmitted
6935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  to the target.
6945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
6955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
6965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
6975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
6995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
7005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief NFCIP1 Data rates
7025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
7045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eDataRate_t{
7055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_106    = 0x00U,
7065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_212,
7075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_424,
7085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* phNfc_eDataRate_848,
7095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_1696,
7105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_3392,
7115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_6784,*/
7125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_RFU
7135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eDataRate_t;
7145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
7175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief NFCIP1 Gate Information Container
7195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> NFCIP1 structure </em> includes the available information
7215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  related to the discovered NFCIP1 remote device. This information
7225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  is updated for every device discovery.
7235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
7245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
7265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sNfcIPInfo_t
7275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
7285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Contains the random NFCID3I conveyed with the ATR_REQ.
7295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        always 10 bytes length
7305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        or contains the random NFCID3T conveyed with the ATR_RES.
7315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        always 10 bytes length */
7325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         NFCID[PHHAL_MAX_UID_LENGTH];
7335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         NFCID_Length;
7345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* ATR_RES = General bytes length, Max length = 48 bytes */
7355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         ATRInfo[PHHAL_MAX_ATR_LENGTH];
7365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         ATRInfo_Length;
7375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /**< SAK information of the tag discovered */
7385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         SelRes;
7395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /**< ATQA information of the tag discovered */
7405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         SenseRes[PHHAL_ATQA_LENGTH];
7415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /**< Is Detection Mode of the NFCIP Target Active */
7425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         Nfcip_Active;
7435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /**< Maximum frame length supported by the NFCIP device */
7445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint16_t        MaxFrameLength;
7455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /**< Data rate supported by the NFCIP device */
7465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDataRate_t         Nfcip_Datarate;
7475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sNfcIPInfo_t;
7495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
7525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Specific Information Container
7545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Remote Device Information Union </em> includes the available Remote Device Information
7565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  structures. Following the device detected, the corresponding data structure is used.
7575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
7595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
7615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef union phNfc_uRemoteDevInfo_t
7625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
7635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sIso14443AInfo_t          Iso14443A_Info;
7645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sIso14443BInfo_t          Iso14443B_Info;
7655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sIso14443BPrimeInfo_t     Iso14443BPrime_Info;
7665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sNfcIPInfo_t              NfcIP_Info;
7675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sFelicaInfo_t             Felica_Info;
7685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sJewelInfo_t              Jewel_Info;
7695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sIso15693Info_t           Iso15693_Info;
7705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_uRemoteDevInfo_t;
7715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
7745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief RF Device Type Listing
7765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> RF Device Type List </em> is used to identify the type of
7785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  remote device that is discovered/connected. There seperate
7795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  types to identify a Remote Reader (denoted by _PCD) and
7805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  Remote Tag (denoted by _PICC)
7815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
7825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
7835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
7845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eRFDevType_t
7855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
7865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eUnknown_DevType        = 0x00U,
7875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Specific PCD Devices */
7895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_A_PCD,
7905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_B_PCD,
7915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_BPrime_PCD,
7925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eFelica_PCD,
7935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eJewel_PCD,
7945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO15693_PCD,
7955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Generic PCD Type */
7965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_ePCD_DevType,
7975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
7985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Generic PICC Type */
7995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_ePICC_DevType,
8005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Specific PICC Devices */
8015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_A_PICC,
8025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_4A_PICC,
8035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_3A_PICC,
8045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eMifare_PICC,
8055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_B_PICC,
8065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_4B_PICC,
8075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO14443_BPrime_PICC,
8085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eFelica_PICC,
8095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eJewel_PICC,
8105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eISO15693_PICC,
8115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* NFC-IP1 Device Types */
8135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eNfcIP1_Target,
8145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eNfcIP1_Initiator,
8155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* Other Sources */
8175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eInvalid_DevType
8185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eRFDevType_t;
8205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
8235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
8245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Remote Device Type Listing
8255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
8265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Remote Device Type List </em> is used to identify the type of
8275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  remote device that is discovered/connected
8285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note This is same as RF Device Type List.
8295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
8305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
8315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef phNfc_eRFDevType_t phNfc_eRemDevType_t;
8325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
8355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \brief Common Command Attribute
8385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Hal Command Union </em> includes each available type of Commands.
8405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly * \note None.
8425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
8445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef union phNfc_uCommand_t
8455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
8465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly  phNfc_eMifareCmdList_t         MfCmd;         /**< Mifare command structure.  */
8475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly  phNfc_eIso14443_4_CmdList_t    Iso144434Cmd;  /**< ISO 14443-4 command structure.  */
8485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly  phNfc_eFelicaCmdList_t         FelCmd;        /**< Felica command structure.  */
8495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly  phNfc_eJewelCmdList_t          JewelCmd;      /**< Jewel command structure.  */
8505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly  phNfc_eIso15693_CmdList_t      Iso15693Cmd;   /**< ISO 15693 command structure.  */
8515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly  phNfc_eNfcIP1CmdList_t         NfcIP1Cmd;     /**< ISO 18092 (NFCIP1) command structure */
8525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_uCmdList_t;
8535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
8565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \brief Remote Device Information Structure
8585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Remote Device Information Structure </em> holds information about one single Remote
8605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Device detected by the polling function .\n
8615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  It lists parameters common to all supported remote devices.
8625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \note
8645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \sa \ref phHal4Nfc_ConfigureDiscovery and \ref phHal4Nfc_Connect
8665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
8685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sRemoteDevInformation_t
8695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
8705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                    SessionOpened;       /**< [out] Boolean
8715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     *   Flag indicating the validity of
8725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     *   the handle of the remote device. */
8735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eRemDevType_t        RemDevType;          /**< [out] Remote device type which says that remote
8745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    is Reader A or Reader B or NFCIP or Felica or
8755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    Reader B Prime or Jewel*/
8765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_uRemoteDevInfo_t     RemoteDevInfo;       /**< Union of available Remote Device.
8775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                     *   \ref phNfc_uRemoteDevInfo_t Information.  */
8785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sRemoteDevInformation_t;
8795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
8825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*    TARGET STRUCTURES */
8835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
8855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup  grp_hal_common
8865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  \brief Transceive Information Data Structure for sending commands/response
8885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *         to the remote device
8895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  The <em> Transceive Information Data Structure </em> is used to pass the
8915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  Command, Address (only required for MIFARE) and the send and receive data
8925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *  data structure (buffer and length) for communication with remote device
8935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly *
8955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly */
8965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sTransceiveInfo_t
8975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
8985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_uCmdList_t                cmd;
8995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /** \internal Address Field required for only Mifare
9015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  Family Proprietary Cards.
9025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  The Address Size is Valid only upto 255 Blocks limit
9035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     *  i:e for Mifare 4K
9045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     */
9055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                         addr;
9065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sData_t                   sSendData;
9075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sData_t                   sRecvData;
9085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sTransceiveInfo_t;
9095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
9125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Poll Device Information for conifiguring the discovery wheel
9145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly          Reader and Card Emulation Phases
9155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> \ref phNfc_sPollDevInfo_t enum </em> is used to enable/disable
9175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  phases of the discovery wheel related to specific reader types and
9185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  card emulation phase
9195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note Enabling specific Reader technology when NFCIP1 speed is set in the
9205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*        phNfc_sADD_Cfg_t is implicitly done in HAL. Use this structure to only
9215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*        enable/disable Card Reader Functionality
9225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
9235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sPollDevInfo_t
9245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
9255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    EnableIso14443A : 1;      /**< Flag to enable
9265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        Reader A discovery */
9275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    EnableIso14443B : 1;      /**< Flag to enable
9285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        Reader B discovery */
9295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    EnableFelica212 : 1;   /**< Flag to enable
9305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        Felica 212 discovery */
9315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    EnableFelica424 : 1;   /**< Flag to enable
9325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        Felica 424 discovery */
9335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    EnableIso15693 : 1;     /**< Flag to enable
9345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        ISO 15693 discovery */
9355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    EnableNfcActive : 1; /**< Flag to enable
9365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        Active Mode of NFC-IP discovery.
9375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        This is updated internally
9385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        based on the NFC-IP speed.
9395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                        */
9405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    RFU : 1;                /**< Reserved for future use */
9415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    unsigned                    DisableCardEmulation : 1;    /**< Flag to
9425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                            disable the card emulation */
9435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sPollDevInfo_t;
9445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
9475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief P2P speed for the Initiator
9495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> \ref phNfc_eP2PMode_t enum </em> lists all the NFCIP1 speeds
9515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  to be used for configuring the NFCIP1 discovery
9525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
9545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
9555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eP2PMode_t
9565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
9575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eDefaultP2PMode  = 0x00U,
9585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_ePassive106 = 0x01U,
9594be773cac714184b24bc9d4191b778efefe16472Nick Pelly    phNfc_ePassive212 = 0x02U,
9604be773cac714184b24bc9d4191b778efefe16472Nick Pelly    phNfc_ePassive424 = 0x04U,
9614be773cac714184b24bc9d4191b778efefe16472Nick Pelly    phNfc_eActive106 = 0x08U,
9624be773cac714184b24bc9d4191b778efefe16472Nick Pelly    phNfc_eActive212 = 0x10U,
9634be773cac714184b24bc9d4191b778efefe16472Nick Pelly    phNfc_eActive424 = 0x20U,
9644be773cac714184b24bc9d4191b778efefe16472Nick Pelly    phNfc_eP2P_ALL   = 0x27U,  /* All Passive and 424 Active */
9655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_eInvalidP2PMode = 0xFFU
9665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eP2PMode_t;
9675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
9705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Identities the type of Notification
9725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  This enumeration is used to specify the type of notification notified
9745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  to the upper layer. This classifies the notification into two types
9755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  one for the discovery notifications and the other for all the remaining
9765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  event notifications
9775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
9785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
9795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eNotificationType_t
9805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
9815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    INVALID_NFC_NOTIFICATION    = 0x00U, /* Invalid Notification */
9825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_NOTIFICATION,         /* Remote Device Discovery Notification */
9835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_EVENT_NOTIFICATION              /* Event Notification from the other hosts */
9845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eNotificationType_t;
9855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
9875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
9885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief
9905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
9915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
9925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
9935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sUiccInfo_t
9945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
9955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* AID and Parameter Information is obtained if the
9965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     * eventType is NFC_EVT_TRANSACTION.
9975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly     */
9985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sData_t           aid;
9995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    phNfc_sData_t           param;
10005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10015d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sUiccInfo_t;
10025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_nfci
10055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief P2P Information for the Initiator
10075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> \ref phNfc_sNfcIPCfg_t </em> holds the P2P related information
10095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  use by the NFC Device during P2P Discovery and connection
10105d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10115d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
10125d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
10135d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sNfcIPCfg_t
10145d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
10155d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* ATR_RES = General bytes length, Max length = 48 bytes */
10165d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         generalBytesLength;
10175d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t         generalBytes[PHHAL_MAX_ATR_LENGTH];
10185d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10195d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    /* TODO: This will be updated later for any additional params*/
10205d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sNfcIPCfg_t;
10215d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10225d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10235d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
10245d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10255d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Discovery Configuration Mode
10265d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10275d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  This enumeration is used to choose the Discovery Configuration
10285d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  Mode :- Configure and Start, Stop or Start with last set
10295d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  configuration
10305d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
10315d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
10325d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eDiscoveryConfigMode_t
10335d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
10345d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_CONFIG  = 0x00U,/**< Configure discovery with values
10355d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                       in phNfc_sADD_Cfg_t and start
10365d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                       discovery */
10375d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_START,         /**< Start Discovery with previously set
10385d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                      configuration */
10395d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_STOP,          /**< Stop the Discovery */
10405d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_RESUME       /**< Resume the Discovery with previously
10415d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                   *  set configuration.
10425d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                   *  This is valid only when the Target
10435d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                   *  is not connected.
10445d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                   */
10455d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly}phNfc_eDiscoveryConfigMode_t;
10465d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10475d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup grp_hal_common
10485d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10495d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Target or Tag Release Mode
10505d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10515d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  This enumeration defines various modes of releasing an acquired target
10525d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  or tag.
10535d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note None.
10545d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
10555d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef enum phNfc_eReleaseType_t
10565d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
10575d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_INVALID_RELEASE_TYPE    =0x00U,/**<Invalid release type */
10585d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_RESTART,      /**< Release current target and
10595d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                     restart discovery within same technology*/
10605d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_DISCOVERY_CONTINUE,    /**< Release current target and continue
10615d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                    discovery with next technology in the wheel */
10625d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    NFC_SMARTMX_RELEASE    /**< Release SmartMX from wired mode to previous mode
10635d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                (Virtual or Off) */
10645d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_eReleaseType_t;
10655d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10665d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/** \ingroup  grp_hal_common
10675d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10685d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \brief Poll configuration structure
10695d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10705d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  The <em> Poll configuration structure </em> holds information about the
10715d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  enabling the the type of discovery required by the application. This
10725d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  structure is the input parameter for the discovery call
10735d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10745d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \note All members of this structure are input parameters [out].
10755d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10765d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*  \sa \ref phNfc_eP2PMode_t
10775d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*
10785d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly*/
10795d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pellytypedef struct phNfc_sADD_Cfg_t
10805d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly{
10815d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    union
10825d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    {
10835d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        phNfc_sPollDevInfo_t        PollCfgInfo;        /**<  Enable/Disable Specific
10845d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                              Reader Functionality and
10855d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                              Card Emulation */
10865d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly        unsigned                    PollEnabled;     /** Can be used to set polling 'Off'
10875d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                      by setting PollEnabled to zero */
10885d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
10895d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    } PollDevInfo;
10905d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint32_t                    Duration;           /**< Duration of virtual or idle
10915d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    period in microseconds in the step size
10925d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    of 48 microseconds.If duration is set less
10935d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    than  48 microseconds then default value is
10945d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    used.For more details please refer PN 544
10955d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    user manual*/
10965d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     NfcIP_Mode ;      /**< Select the P2P
10975d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    speeds using phNfc_eP2PMode_t type.
10985d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    This is used to enable NFC-IP Discovery
10995d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    The related Reader Type will be implicitly
11005d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                    selected */
110120b7bd5f6985dc890ac99d7d1e8154f965df02dbMartijn Coenen    uint8_t                     NfcIP_Target_Mode ;
11025d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly    uint8_t                     NfcIP_Tgt_Disable;   /**< Flag to
11035d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly                                                   disable the NFCIP1 TARGET */
11045d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly} phNfc_sADD_Cfg_t;
11055d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11065d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly/*@}*/
11075d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
11085d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly#endif /* PHNFCTYPES */
11095d9927ba30ba449badb9f6df0fbeb4d6aedc6e2aNick Pelly
1110