code update
[adaptation/devices/nfc-plugin-nxp.git] / inc / phNfcHalTypes.h
1 /*\r
2  * Copyright (C) 2010 NXP Semiconductors\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 /**\r
18  * \file  phNfcHalTypes.h\r
19  * \brief Structure declarations/type definitions belonging to the HAL subsystem.\r
20  *\r
21  * Project: NFC MW / HAL\r
22  *\r
23  * $Date: Thu Apr  8 17:11:39 2010 $\r
24  * $Author: ing04880 $\r
25  * $Revision: 1.106 $\r
26  * $Aliases: NFC_FRI1.1_WK1007_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $\r
27  *\r
28  */\r
29 \r
30 \r
31 #ifndef PHNFCHALTYPES_H /* */\r
32 #define PHNFCHALTYPES_H /* */\r
33 \r
34 /**\r
35  *  \name HAL Types\r
36  *\r
37  * File: \ref phNfcHalTypes.h\r
38  *\r
39  */\r
40 \r
41 /*@{*/\r
42 #define PHNFCHALTYPES_FILEREVISION "$Revision: 1.106 $" /**< \ingroup grp_file_attributes */\r
43 #define PHNFCHALTYPES_FILEALIASES  "$Aliases: NFC_FRI1.1_WK1007_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $"     /**< \ingroup grp_file_attributes */\r
44 /*@}*/\r
45 \r
46 #include <phNfcTypes.h>\r
47 #include <phNfcCompId.h>\r
48 #include <phNfcConfig.h>\r
49 \r
50 #ifndef NXP_HAL_MEM_INFO_SIZE\r
51 #define NXP_HAL_MEM_INFO_SIZE           0x01U\r
52 #endif\r
53 \r
54 #if (NXP_HAL_MEM_INFO_SIZE > 0x01)\r
55 #define NXP_FW_UPLOAD_PROGRESS          0x965AU\r
56 #define NXP_FW_UPLOAD_SUCCESS           0x0000U\r
57 #else\r
58 #define NXP_FW_UPLOAD_PROGRESS          0x5AU\r
59 #define NXP_FW_UPLOAD_SUCCESS           0x00U\r
60 #endif\r
61 \r
62 \r
63 typedef struct phHal_sMemInfo\r
64 {\r
65     uint16_t            fw_magic;\r
66     uint16_t            fw_rfu;\r
67     uint32_t            hal_version;\r
68 }phHal_sMemInfo_t;\r
69 \r
70 \r
71 /** \ingroup  grp_hal_common\r
72  *\r
73  * \if hal\r
74  *  \brief Protocol Support Information\r
75  * \else\r
76  *  \brief HAL-Specific\r
77  * \endif\r
78  *\r
79  *  The <em> Supported Protocols Structure </em> holds all protocol supported by the current NFC\r
80  *  device.\r
81  *\r
82  *  \note All members of this structure are output parameters [out].\r
83  *\r
84  */\r
85 typedef phNfc_sSupProtocol_t phHal_sSupProtocol_t;\r
86 \r
87 \r
88 /** \ingroup grp_hal_common\r
89  *\r
90  *\r
91  * \if hal\r
92  *  \brief Information related to the NFC Device\r
93  * \else\r
94  *  \brief HAL-Specific\r
95  * \endif\r
96  *\r
97  *  The <em> Device Information Structure </em> holds information\r
98  *  related to the NFC IC read during initialization time. \r
99  *  It allows the caller firware, hardware version, the model id,\r
100  *  HCI verison supported and vendor name. Refer to the NFC Device \r
101  *  User Manual on how to interpret each of the values. In addition\r
102  *  it also contains capabilities of the NFC Device such as the \r
103  *  protocols supported in Reader and emulation mode\r
104  *\r
105  */\r
106 \r
107 typedef phNfc_sDeviceCapabilities_t phHal_sDeviceCapabilities_t;\r
108 \r
109 \r
110 /**\r
111  * \ingroup grp_hal_common\r
112  *\r
113  * \if hal\r
114  *  \brief Hardware Reference - The Peripheral Representation\r
115  * \else\r
116  *  \brief HAL-Specific\r
117  * \endif\r
118  *\r
119  *  The Hardware Reference structure is filled as part of the open function and\r
120  *  contains information regarding connected peripheral NFC device. It also\r
121  *  stores the refernce to the communication driver passed by the HAL client\r
122  *  for usage during communication with the NFC Device \r
123  *\r
124  * \note The caller can consider this structure atomic, no interpretation is required \r
125  *       for HAL operation.\r
126  * \r
127  * \sa phHal4Nfc_Open .\r
128  * \r
129  */\r
130 \r
131 /**\r
132  * \ingroup grp_hal_common\r
133  *\r
134  *  \brief Hardware Reference - The Peripheral Representation\r
135  *\r
136  *  The Hardware Reference structure is filled as part of the open function and\r
137  *  contains information regarding connected peripheral NFC device. It also\r
138  *  stores the refernce to the communication driver passed by the HAL client\r
139  *  for usage during communication with the NFC Device \r
140  *\r
141  * \note The caller can consider this structure atomic, no interpretation is required \r
142  *       for HAL operation.\r
143  * \r
144  */\r
145 typedef struct phHal_sHwReference\r
146 {\r
147     /**<  Will be usable/valid after the Open function. */\r
148     void                            *p_board_driver;\r
149     /**<  Session Identifier for the established session */\r
150     uint8_t                         session_id[SESSIONID_SIZE];\r
151     /**<  SMX  Connected TRUE/FALSE */\r
152     uint8_t                         smx_connected; \r
153     /**<  UICC  Connected TRUE/FALSE */\r
154     uint8_t                         uicc_connected;\r
155     /**<  UICC  Reader Mode is Active TRUE/FALSE */\r
156     uint8_t                         uicc_rdr_active;\r
157     /**<  Device information. */\r
158     phNfc_sDeviceCapabilities_t     device_info;\r
159     /**<  Context of the HAL Layer */\r
160     void                            *hal_context;\r
161     /**<  Context of the DAL Layer */\r
162     void                            *dal_context;\r
163 } phHal_sHwReference_t;\r
164 \r
165 \r
166 /** \ingroup grp_hal_common\r
167  *\r
168  * \if hal\r
169  * \brief Hardware configuration - Configuration Parameters for the NFC Device\r
170  * \else\r
171  * \brief HAL-Specific\r
172  * \endif\r
173  *\r
174  *  The parameters used to configure the device during the initialisation.\r
175  *  This structure is used internally by the HAL implementation and is filled\r
176  *  up based on various configuration parameters from the config file\r
177  * \note None.\r
178  *\r
179  */\r
180 \r
181 typedef struct phHal_sHwConfig\r
182 {\r
183     \r
184     uint8_t             session_id[SESSIONID_SIZE]; /**<  Session Identifier for \r
185                                                      the established session */\r
186 \r
187     uint8_t             clk_req; /**<  Clock Request Setting */\r
188 \r
189     uint8_t             input_clk; /**<  Input Clock Setting */\r
190 \r
191 } phHal_sHwConfig_t;\r
192 \r
193 \r
194 \r
195 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
196 \r
197 /* This data structure is not used anymore and will be removed in subsequent\r
198    release */\r
199 typedef struct phHal_sDepFlags\r
200 {\r
201    unsigned int MetaChaining : 1;    \r
202    unsigned int NADPresent   : 1;    \r
203 } phHal_sDepFlags_t;\r
204 \r
205 /* This data structure is not used anymore and will be removed in subsequent\r
206    release */\r
207 \r
208 typedef struct phHal_sDepAdditionalInfo\r
209 {\r
210     phHal_sDepFlags_t DepFlags;   \r
211     uint8_t NAD;                  \r
212 } phHal_sDepAdditionalInfo_t;\r
213 \r
214 \r
215 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
216 \r
217 \r
218 \r
219 /** \ingroup grp_hal_common\r
220  *\r
221  * \if hal\r
222  *  \brief Enumerated MIFARE Commands\r
223  * \else\r
224  *  \brief HAL-Specific\r
225  * \endif\r
226  *\r
227  *  The <em> Mifare Command List Enumerator </em> lists all available Mifare native commands.\r
228  *\r
229  * \note None.\r
230  *\r
231  */\r
232 \r
233 typedef phNfc_eMifareCmdList_t phHal_eMifareCmdList_t;\r
234 \r
235 #define    phHal_eMifareRaw        phNfc_eMifareRaw\r
236 #define    phHal_eMifareAuthentA   phNfc_eMifareAuthentA\r
237 #define    phHal_eMifareAuthentB   phNfc_eMifareAuthentB\r
238 #define    phHal_eMifareRead16     phNfc_eMifareRead16\r
239 #define    phHal_eMifareRead       phNfc_eMifareRead\r
240 #define    phHal_eMifareWrite16    phNfc_eMifareWrite16\r
241 #define    phHal_eMifareWrite4     phNfc_eMifareWrite4\r
242 #define    phHal_eMifareInc        phNfc_eMifareInc\r
243 #define    phHal_eMifareDec        phNfc_eMifareDec\r
244 #define    phHal_eMifareTransfer   phNfc_eMifareTransfer\r
245 #define    phHal_eMifareRestore    phNfc_eMifareRestore\r
246 #define    phHal_eMifareReadSector phNfc_eMifareReadSector\r
247 #define    phHal_eMifareWriteSector phNfc_eMifareWriteSector\r
248 #define    phHal_eMifareInvalidCmd phNfc_eMifareInvalidCmd\r
249 \r
250 \r
251 /** \ingroup grp_hal_common\r
252  *\r
253  *  The <em> T=Cl Command List Enumerator </em> lists all available T=Cl Commands.\r
254  *\r
255  * \note None.\r
256  *\r
257  */\r
258 typedef phNfc_eIso14443_4_CmdList_t phHal_eIso14443_4_CmdList_t;\r
259 \r
260 #define    phHal_eIso14443_4_Raw    phNfc_eIso14443_4_Raw\r
261 \r
262 \r
263 /** \ingroup grp_hal_common\r
264  *\r
265  *  The <em> NFCIP1 Command List Enumerator </em> lists all available NFCIP1 Commands.\r
266  *\r
267  * \note None.\r
268  *\r
269  */\r
270 typedef phNfc_eNfcIP1CmdList_t phHal_eNfcIP1CmdList_t;\r
271 \r
272 #define       phHal_eNfcIP1_Raw             phNfc_eNfcIP1_Raw\r
273 \r
274 \r
275 /** \ingroup grp_hal_common\r
276  *\r
277  *  The <em> ISO15693 Command List Enumerator </em> lists all available ISO15693 Commands.\r
278  *\r
279  * \note None.\r
280  *\r
281  */\r
282 \r
283 typedef phNfc_eIso15693_CmdList_t phHal_eIso15693_CmdList_t;\r
284 \r
285 #if 0\r
286 #define    phHal_eIso15693_Raw             phNfc_eIso15693_Raw\r
287 #endif\r
288 #define    phHal_eIso15693_Cmd             phNfc_eIso15693_Cmd\r
289 #define    phHal_eIso15693_Invalid         phNfc_eIso15693_Invalid\r
290 \r
291 /** \ingroup grp_hal_common\r
292  *\r
293  *  The <em> Felica Command List Enumerator </em> lists all available Felica Commands.\r
294  *\r
295  * \note None.\r
296  *\r
297  */\r
298 \r
299 typedef enum phHal_eFelicaCmdList\r
300 {\r
301     phHal_eFelica_Raw             = 0xF0U, /**< Felica Raw command:\n\r
302                                                  - This command sends the data buffer directly \r
303                                                  to the remote device */\r
304     phHal_eFelica_Check           = 0x00, /**< Felica Check command:\n\r
305                                                  - This command checks the data from the Felica\r
306                                                   remote device */\r
307     phHal_eFelica_Update          = 0x01, /**< Felica Update command:\n\r
308                                                  - This command updates the data onto the Felica\r
309                                                   remote device */\r
310     phHal_eFelica_Invalid         = 0xFFU      /**< Invalid Command */\r
311 } phHal_eFelicaCmdList_t;\r
312 \r
313 \r
314 typedef enum phHal_eJewelCmdList\r
315 {\r
316     phHal_eJewel_Raw            = 0x00U, /**< Jewel command:\n\r
317                                                  - This command sends the data buffer directly \r
318                                                  to the remote device */\r
319     phHal_eJewel_Invalid        = 0xFFU  /**< Invalid jewel command */\r
320 }phHal_eJewelCmdList_t;\r
321 \r
322 \r
323 \r
324 /** \ingroup grp_hal_nfci\r
325 *\r
326 * \if hal\r
327 *  \brief Remote Device Reader A RF Gate Information Container \r
328 * \else\r
329 *  \brief HAL-Specific\r
330 * \endif\r
331 *\r
332 *  The <em> Reader A structure </em> includes the available information\r
333 *  related to the discovered ISO14443A remote device. This information \r
334 *  is updated for every device discovery.\r
335 *  \note None.\r
336 *\r
337 */\r
338 typedef phNfc_sIso14443AInfo_t phHal_sIso14443AInfo_t;\r
339 \r
340 /** \ingroup grp_hal_nfci\r
341 *\r
342 * \if hal\r
343 *  \brief Remote Device Reader B RF Gate Information Container \r
344 * \else\r
345 *  \brief HAL-Specific\r
346 * \endif\r
347 *\r
348 *  The <em> Reader B structure </em> includes the available information\r
349 *  related to the discovered ISO14443B remote device. This information \r
350 *  is updated for every device discovery.\r
351 *  \note None.\r
352 *\r
353 */\r
354 \r
355 typedef phNfc_sIso14443BInfo_t phHal_sIso14443BInfo_t;\r
356 \r
357 typedef phNfc_sIso14443BPrimeInfo_t phHal_sIso14443BPrimeInfo;\r
358 \r
359 \r
360 /** \ingroup grp_hal_nfci\r
361 *\r
362 * \if hal\r
363 *  \brief Remote Device Jewel Reader RF Gate Information Container \r
364 * \else\r
365 *  \brief HAL-Specific\r
366 * \endif\r
367 *\r
368 *  The <em> Jewel Reader structure </em> includes the available information\r
369 *  related to the discovered Jewel remote device. This information \r
370 *  is updated for every device discovery.\r
371 *  \note None.\r
372 *\r
373 */\r
374 \r
375 \r
376 typedef phNfc_sJewelInfo_t phHal_sJewelInfo_t;\r
377 \r
378 /** \ingroup grp_hal_nfci\r
379 *\r
380 * \if hal\r
381 *  \brief Remote Device Felica Reader RF Gate Information Container \r
382 * \else\r
383 *  \brief HAL-Specific\r
384 * \endif\r
385 *\r
386 *  The <em> Felica Reader structure </em> includes the available information\r
387 *  related to the discovered Felica remote device. This information \r
388 *  is updated for every device discovery.\r
389 *  \note None.\r
390 *\r
391 */\r
392 \r
393 typedef phNfc_sFelicaInfo_t phHal_sFelicaInfo_t;\r
394 \r
395 \r
396 /** \ingroup grp_hal_nfci\r
397 *\r
398 * \if hal\r
399 *  \brief Remote Device Reader 15693 RF Gate Information Container \r
400 * \else\r
401 *  \brief HAL-Specific\r
402 * \endif\r
403 *\r
404 *  The <em> Reader A structure </em> includes the available information\r
405 *  related to the discovered ISO15693 remote device. This information \r
406 *  is updated for every device discovery.\r
407 *  \note None.\r
408 *\r
409 */\r
410 \r
411 typedef phNfc_sIso15693Info_t phHal_sIso15693Info_t;\r
412 \r
413 \r
414 /** \ingroup grp_hal_nfci\r
415 *\r
416 * \if hal\r
417 *  \brief NFC Data Rate Supported between the Reader and the Target\r
418 * \else\r
419 *  \brief HAL-Specific\r
420 * \endif\r
421 *\r
422 *  The <em> \ref phHalNfc_eDataRate enum </em> lists all the Data Rate \r
423 *  values to be used to determine the rate at which the data is transmitted\r
424 *  to the target.\r
425 *\r
426 *  \note None.\r
427 */\r
428 \r
429 \r
430 typedef phNfc_eDataRate_t phHalNfc_eDataRate_t;\r
431 \r
432 \r
433 /** \ingroup grp_hal_nfci\r
434 *\r
435 * \if hal\r
436 *  \brief NFCIP1 Gate Information Container \r
437 * \else\r
438 *  \brief HAL-Specific\r
439 * \endif\r
440 *\r
441 *  The <em> NFCIP1 structure </em> includes the available information\r
442 *  related to the discovered NFCIP1 remote device. This information \r
443 *  is updated for every device discovery.\r
444 *  \note None.\r
445 *\r
446 */\r
447 \r
448 typedef phNfc_sNfcIPInfo_t phHal_sNfcIPInfo_t;\r
449 \r
450 \r
451 /** \ingroup grp_hal_nfci\r
452 *\r
453 * \if hal\r
454 *  \brief Remote Device Specific Information Container\r
455 * \else\r
456 *  \brief HAL-Specific\r
457 * \endif\r
458 *\r
459 *  The <em> Remote Device Information Union </em> includes the available Remote Device Information\r
460 *  structures. Following the device detected, the corresponding data structure is used.\r
461 *\r
462 *  \note None.\r
463 *\r
464 */\r
465 \r
466 typedef phNfc_uRemoteDevInfo_t phHal_uRemoteDevInfo_t;\r
467 \r
468 /** \ingroup grp_hal_nfci\r
469 *\r
470 * \if hal\r
471 *  \brief RF Device Type Listing\r
472 * \else\r
473 *  \brief HAL-Specific\r
474 * \endif\r
475 *\r
476 *  The <em> RF Device Type List </em> is used to identify the type of\r
477 *  remote device that is discovered/connected. There seperate\r
478 *  types to identify a Remote Reader (denoted by _PCD) and \r
479 *  Remote Tag (denoted by _PICC)\r
480 *  \note None.\r
481 *\r
482 */\r
483 \r
484 typedef phNfc_eRFDevType_t phHal_eRFDevType_t;\r
485 \r
486 #define    phHal_eUnknown_DevType phNfc_eUnknown_DevType\r
487 \r
488     /* Specific PCD Devices */\r
489 #define    phHal_eISO14443_A_PCD phNfc_eISO14443_A_PCD\r
490 #define    phHal_eISO14443_B_PCD phNfc_eISO14443_B_PCD\r
491 #define    phHal_eISO14443_BPrime_PCD phNfc_eISO14443_BPrime_PCD\r
492 #define    phHal_eFelica_PCD phNfc_eFelica_PCD\r
493 #define    phHal_eJewel_PCD phNfc_eJewel_PCD\r
494 #define    phHal_eISO15693_PCD phNfc_eISO15693_PCD\r
495     /* Generic PCD Type */\r
496 #define    phHal_ePCD_DevType phNfc_ePCD_DevType\r
497 \r
498     /* Generic PICC Type */\r
499 #define    phHal_ePICC_DevType phNfc_ePICC_DevType\r
500     /* Specific PICC Devices */\r
501 #define    phHal_eISO14443_A_PICC phNfc_eISO14443_A_PICC\r
502 #define    phHal_eISO14443_4A_PICC phNfc_eISO14443_4A_PICC\r
503 #define    phHal_eISO14443_3A_PICC phNfc_eISO14443_3A_PICC\r
504 #define    phHal_eMifare_PICC phNfc_eMifare_PICC\r
505 #define    phHal_eISO14443_B_PICC phNfc_eISO14443_B_PICC\r
506 #define    phHal_eISO14443_4B_PICC phNfc_eISO14443_4B_PICC\r
507 #define    phHal_eISO14443_BPrime_PICC phNfc_eISO14443_BPrime_PICC\r
508 #define    phHal_eFelica_PICC phNfc_eFelica_PICC\r
509 #define    phHal_eJewel_PICC phNfc_eJewel_PICC\r
510 #define    phHal_eISO15693_PICC phNfc_eISO15693_PICC\r
511 \r
512     /* NFC-IP1 Device Types */\r
513 #define    phHal_eNfcIP1_Target phNfc_eNfcIP1_Target\r
514 #define    phHal_eNfcIP1_Initiator phNfc_eNfcIP1_Initiator\r
515 \r
516     /* Other Sources */\r
517 #define    phHal_eInvalid_DevType phNfc_eInvalid_DevType\r
518 \r
519 /** \ingroup grp_hal_nfci\r
520 *\r
521 * \if hal\r
522 *  \brief Remote Device Type Listing\r
523 * \else\r
524 *  \brief HAL-Specific\r
525 * \endif\r
526 *\r
527 *  The <em> Remote Device Type List </em> is used to identify the type of\r
528 *  remote device that is discovered/connected\r
529 *  \note This is same as RF Device Type List.\r
530 *\r
531 */\r
532 typedef phNfc_eRemDevType_t phHal_eRemDevType_t;\r
533 \r
534 /** \ingroup grp_hal_common\r
535  *\r
536  *\r
537  * \if hal\r
538  *  \brief Common Command Attribute\r
539  * \else\r
540  *  \brief HAL-Specific\r
541  * \endif\r
542  *\r
543  *  The <em> Hal Command Union </em> includes each available type of Commands.\r
544  *\r
545  * \note None.\r
546  *\r
547  */\r
548 \r
549 typedef phNfc_uCmdList_t phHal_uCmdList_t;\r
550 \r
551 \r
552 /** \ingroup grp_hal_nfci\r
553  *\r
554  * \if hal\r
555  *  \brief Remote Device Information Structure\r
556  * \else\r
557  *  \brief HAL-Specific\r
558  * \endif\r
559  *\r
560  *  The <em> Remote Device Information Structure </em> holds information about one single Remote\r
561  *  Device detected by the polling function .\n\r
562  *  It lists parameters common to all supported remote devices.\r
563  *\r
564  *  \note \r
565  *\r
566  *  \if hal\r
567  *   \sa \ref phHal4Nfc_ConfigureDiscovery and \ref phHal4Nfc_Connect\r
568  *  \else\r
569  *   \sa \r
570  *  \endif\r
571  *\r
572  */\r
573 \r
574 typedef phNfc_sRemoteDevInformation_t phHal_sRemoteDevInformation_t;\r
575 \r
576 \r
577 \r
578 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
579 \r
580 /* This data structure is not used anymore and will be removed in subsequent\r
581    release */\r
582 \r
583 typedef struct phHal_sDevInputParam\r
584 {\r
585     uint8_t FelicaPollPayload[5];          \r
586                                            \r
587                                            \r
588     uint8_t NfcPollPayload[5];             \r
589                                            \r
590                                            \r
591     uint8_t NFCIDAuto;                     \r
592                                            \r
593                                            \r
594     uint8_t NFCID3i[PHHAL_NFCID_LENGTH];\r
595                                            \r
596                                            \r
597                                            \r
598     uint8_t DIDiUsed;                      \r
599                                            \r
600     uint8_t CIDiUsed;                      \r
601                                            \r
602     uint8_t NfcNADiUsed;                   \r
603                                            \r
604     /*+ MantisId : 31 - JP - 09-01-2006 */\r
605         /*uint8_t TClNADiUsed; */          \r
606                                            \r
607     /*- MantisId : 31 - JP - 09-01-2006 */\r
608     uint8_t GeneralByte[48];               \r
609                                            \r
610                                            \r
611     uint8_t GeneralByteLength;             \r
612                                            \r
613     \r
614     uint8_t ISO14443_4B_AFI;               \r
615                                            \r
616 } phHal_sDevInputParam_t;\r
617 \r
618 \r
619 \r
620 \r
621 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
622 \r
623 \r
624 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r
625 /*    TARGET STRUCTURES */\r
626 \r
627 \r
628 /** \ingroup  grp_hal_common\r
629  *\r
630  * \if hal\r
631  *  \brief Transceive Information Data Structure for sending commands/response \r
632  *         to the remote device\r
633  * \else\r
634  *  \brief HAL-Specific\r
635  * \endif\r
636  *\r
637  *  The <em> Transceive Information Data Structure </em> is used to pass the \r
638  *  Command, Address (only required for MIFARE) and the send and receive data\r
639  *  data structure (buffer and length) for communication with remote device\r
640  *\r
641  *\r
642  */\r
643 \r
644 typedef phNfc_sTransceiveInfo_t phHal_sTransceiveInfo_t;\r
645 \r
646 \r
647 /** \ingroup grp_hal_nfci\r
648 *\r
649 * \if hal\r
650 *  \brief Input information for the Type A tags\r
651 * \else\r
652 *  \brief HAL-Specific\r
653 * \endif\r
654 *\r
655 *  The <em> \ref phHal_sIso14443ACfg structure </em> holds the information \r
656 *  required for the NFC device to be used during ISO14443A target discovery\r
657 *\r
658 *  \note None.\r
659 */\r
660 typedef struct phHal_sIso14443ACfg\r
661 {\r
662     uint8_t     Auto_Activation;       /**< Enable Auto Activation for \r
663                                     Technology A \n\r
664                                     If set to 0, the activation procedure will stop \r
665                                     after Select (SAK has been received). \r
666                                     The host could evaluate SAK value and then decide:\r
667                                         - to start communicating with the remote card \r
668                                           using proprietary commands (see NXP_MIFARE_RAW \r
669                                           and NXP_MIFARE_CMD)\r
670                                     or\r
671                                         - to activate the remote card up to ISO14443-4 \r
672                                           level (RATS and PPS) using \r
673                                           CONTINUE ACTIVATION command \r
674                                     If set to 1, activation follows the flow described in\r
675                                     ETSI HCI specification (restrict detection to \r
676                                     ISO14443-4 compliant cards).\r
677                                     */\r
678 }phHal_sIso14443ACfg_t;\r
679 \r
680 \r
681 /** \ingroup grp_hal_nfci\r
682 *\r
683 * \if hal\r
684 *  \brief Input information for the Type B tags\r
685 * \else\r
686 *  \brief HAL-Specific\r
687 * \endif\r
688 *\r
689 *  The <em> \ref phHal_sIso14443BCfg structure </em> holds the information \r
690 *  required for the NFC device to be used during ISO14443B target discovery\r
691 *\r
692 *  \note None.\r
693 */\r
694 typedef struct phHal_sIso14443BCfg\r
695 {\r
696     uint8_t     AppFamily_ID;       /**< Application Family Identifier for \r
697                                     Technology B, 0x00 means all application */\r
698 }phHal_sIso14443BCfg_t;\r
699 \r
700 /** \ingroup grp_hal_nfci\r
701 *\r
702 * \if hal\r
703 *  \brief Input information for the Felica tags\r
704 * \else\r
705 *  \brief HAL-Specific\r
706 * \endif\r
707 *\r
708 *  The <em> \ref phHal_sFelicaCfg_t structure </em> holds the information \r
709 *  required for the NFC device to be used during Felica target discovery\r
710 *\r
711 *  \note None.\r
712 */\r
713 \r
714 typedef struct phHal_sFelicaCfg\r
715 {\r
716     uint8_t     SystemCode[PHHAL_FEL_SYS_CODE_LEN];     /**< System code for Felica tags */\r
717 \r
718 }phHal_sFelicaCfg_t;\r
719 \r
720 \r
721 /** \ingroup grp_hal_nfci\r
722 *\r
723 * \if hal\r
724 *  \brief Poll Device Information for conifiguring the discovery wheel\r
725           Reader and Card Emulation Phases\r
726 * \else\r
727 *  \brief HAL-Specific\r
728 * \endif\r
729 *\r
730 *  The <em> \ref phHal_sPollDevInfo_t enum </em> is used to enable/disable \r
731 *  phases of the discovery wheel related to specific reader types and \r
732 *  card emulation phase\r
733 *  \note Enabling specific Reader technology when NFCIP1 speed is set in the\r
734 *        phNfc_sADD_Cfg_t is implicitly done in HAL. Use this structure to only\r
735 *        enable/disable Card Reader Functionality\r
736 */\r
737 typedef phNfc_sPollDevInfo_t phHal_sPollDevInfo_t;\r
738 \r
739 \r
740 /** \ingroup grp_hal_common\r
741 *\r
742 * \if hal\r
743 *  \brief Identifies Type of Host\r
744 * \else\r
745 *  \brief HAL-Specific\r
746 * \endif\r
747 *\r
748 *  This enumeration is used to identify the type of the host providing the\r
749 *  information or the notification to the Terminal host.\r
750 *  \note None.\r
751 */\r
752 \r
753 typedef enum phHal_HostType {\r
754     /* \r
755      * This type identifies the host controller\r
756      * in the NFC device\r
757      */\r
758     phHal_eHostController       = 0x00U,\r
759     /* \r
760      * This type identifies the Host Device\r
761      * controlling the NFC device.\r
762      */\r
763     phHal_eTerminalHost         = 0x01U,\r
764     /* \r
765      * This type identifies the uicc host\r
766      * connnected to the NFC device\r
767      */\r
768     phHal_eUICCHost             = 0x02U,\r
769     /* Host type is unknown */\r
770     phHal_eUnknownHost          = 0xFFU\r
771 }phHal_HostType_t;\r
772 \r
773 \r
774 /** \ingroup grp_hal_nfci\r
775 *\r
776 * \if hal\r
777 *  \brief P2P speed for the Initiator\r
778 * \else\r
779 *  \brief HAL-Specific\r
780 * \endif\r
781 *\r
782 *  The <em> \ref phHal_eP2PMode enum </em> lists all the NFCIP1 speeds \r
783 *  to be used for configuring the NFCIP1 discovery\r
784 *\r
785 *  \note None.\r
786 */\r
787 \r
788 #define    phHal_eDefaultP2PMode  phNfc_eDefaultP2PMode\r
789 #define    phHal_ePassive106 phNfc_ePassive106\r
790 #define    phHal_ePassive212 phNfc_ePassive212\r
791 #define    phHal_ePassive424 phNfc_ePassive424\r
792 #define    phHal_eActive  phNfc_eActive\r
793 #define    phHal_eP2P_ALL    phNfc_eP2P_ALL\r
794 #define    phHal_eInvalidP2PMode phNfc_eInvalidP2PMode\r
795 \r
796 \r
797 /** \ingroup grp_hal_common\r
798 *\r
799 * \if hal\r
800 *  \brief Identities the type of Notification\r
801 * \else\r
802 *  \brief HAL-Specific\r
803 * \endif\r
804 *\r
805 *  This enumeration is used to specify the type of notification notified\r
806 *  to the upper layer. This classifies the notification into two types\r
807 *  one for the discovery notifications and the other for all the remaining\r
808 *  event notifications\r
809 *  \note None.\r
810 */\r
811 \r
812 \r
813 typedef phNfc_eNotificationType_t phHal_eNotificationType_t;\r
814 \r
815 \r
816 /** \ingroup grp_hal_common\r
817 *\r
818 * \if hal\r
819 *  \brief Identifies the type of event notification\r
820 * \else\r
821 *  \brief HAL-Specific\r
822 * \endif\r
823 *\r
824 *  This enumeration is used to identify the type of the event notified\r
825 *  to the Terminal host.\r
826 *  \note None.\r
827 */\r
828 \r
829 typedef enum phHal_Event {\r
830 \r
831 \r
832     /* Transaction Events */\r
833     NFC_EVT_END_OF_TRANSACTION   = 0x11U ,\r
834     NFC_EVT_TRANSACTION          = 0x12U ,\r
835     NFC_EVT_START_OF_TRANSACTION = 0x20U ,\r
836 \r
837     /* Field Events */\r
838     NFC_EVT_FIELD_ON             = 0x31U,\r
839     NFC_EVT_FIELD_OFF            = 0x34U,\r
840 \r
841     /* Card/Target Activation Events */\r
842     NFC_EVT_ACTIVATED           = 0x33U,\r
843     NFC_EVT_DEACTIVATED         = 0x32U,\r
844 \r
845     NFC_EVT_PROTECTED           = 0x24U ,\r
846 \r
847     /* Reader Phases configuration request by UICC */\r
848     NFC_UICC_RDPHASES_ACTIVATE_REQ = 0x43U,\r
849     NFC_UICC_RDPHASES_DEACTIVATE_REQ = 0x44U,\r
850 \r
851     /* Connectivity and Triggering Events - Future Use */\r
852     NFC_EVT_CONNECTIVITY         = 0x10U ,\r
853     NFC_EVT_OPERATION_ENDED      = 0x13U ,\r
854 \r
855     /* NXP Specific System Information Events */\r
856     NFC_INFO_TXLDO_OVERCUR       = 0x71U,\r
857     NFC_INFO_MEM_VIOLATION       = 0x73U,\r
858     NFC_INFO_TEMP_OVERHEAT       = 0x74U,\r
859     NFC_INFO_LLC_ERROR           = 0x75U,\r
860 \r
861     /* NXP EVENTS */\r
862     NFC_EVT_MIFARE_ACCESS          = 0x35,\r
863     NFC_EVT_APDU_RECEIVED          = 0x36,\r
864     NFC_EVT_EMV_CARD_REMOVAL       = 0x37\r
865 \r
866 }phHal_Event_t;\r
867 \r
868 typedef phNfc_sUiccInfo_t phHal_sUiccInfo_t;\r
869 \r
870 /** \ingroup grp_hal_common\r
871 *\r
872 * \if hal\r
873 *  \brief Event notification Information\r
874 * \else\r
875 *  \brief HAL-Specific\r
876 * \endif\r
877 *\r
878 *  This structure provides the information about the event notified\r
879 *  to the terminal host.\r
880 *  \note None.\r
881 */\r
882 \r
883 typedef struct phHal_sEventInfo \r
884 {\r
885     /* Type of the host issuing the event */\r
886     phHal_HostType_t    eventHost;\r
887     /* Type of the source issuing the event */\r
888     phHal_eRFDevType_t  eventSource;\r
889     /* Type of the source issuing the event */\r
890     phHal_Event_t       eventType;\r
891     union   uEventInfo\r
892     {\r
893         /* Parameter information Information is obtained if the eventType is\r
894          * NFC_EVT_TRANSACTION for UICC.\r
895          */\r
896         phHal_sUiccInfo_t       uicc_info;\r
897         /* AID Information is obtained if the eventType is\r
898          * NFC_EVT_TRANSACTION.\r
899          */\r
900         phNfc_sData_t           aid;\r
901         /* Overheat Status Information is obtained if the eventType is\r
902          * NFC_INFO_TEMP_OVERHEAT.\r
903          */\r
904         uint8_t                 overheat_status;\r
905         /* rd_phases Information is obtained if the eventType is\r
906          * NFC_UICC_RDPHASES_ACTIVATE_REQ.\r
907          */\r
908         uint8_t                 rd_phases;\r
909         /* Remote Device Information is obtained if the eventType is\r
910          * NFC_EVT_ACTIVATED.\r
911          */\r
912         phHal_sRemoteDevInformation_t *pRemoteDevInfo;\r
913     }eventInfo;\r
914 }phHal_sEventInfo_t;\r
915 \r
916 \r
917 /** \ingroup grp_hal_common\r
918 *\r
919 * \if hal\r
920 *  \brief Information for the Host/Uicc Emulation Support\r
921 * \else\r
922 *  \brief HAL-Specific\r
923 * \endif\r
924 *\r
925 *  The <em> \ref phHal_sEmuSupport structure </em> holds the type \r
926 *   of the target emulation supported.\r
927 *\r
928 *  \note None.\r
929 */\r
930 \r
931 typedef struct phHal_sEmuSupport\r
932 {\r
933     unsigned int TypeA:1;\r
934     unsigned int TypeB:1;\r
935     unsigned int TypeBPrime:1;\r
936     unsigned int TypeFelica:1;\r
937     unsigned int TypeMifare:1;\r
938     unsigned int TypeNfcIP1:1;\r
939     unsigned int RFU:2;\r
940 \r
941 }phHal_sEmuSupport_t;\r
942 \r
943 \r
944 /** \ingroup grp_hal_nfci\r
945 *\r
946 * \if hal\r
947 *  \brief P2P Information for the Initiator\r
948 * \else\r
949 *  \brief HAL-Specific\r
950 * \endif\r
951 *\r
952 *  The <em> \ref phHal_sNfcIPCfg </em> holds the P2P related information\r
953 *  use by the NFC Device during P2P Discovery and connection\r
954 *\r
955 *  \note None.\r
956 */\r
957 \r
958 typedef phNfc_sNfcIPCfg_t phHal_sNfcIPCfg_t;\r
959 \r
960 /** \ingroup grp_hal_common\r
961 *\r
962 * \if hal\r
963 *  \brief Enumeration used to choose which type of parameters \r
964 *         are to be configured\r
965 * \else\r
966 *  \brief HAL-Specific\r
967 * \endif\r
968 *\r
969 *  \r
970 *  \note None.\r
971 */\r
972 typedef enum phHal_eConfigType\r
973 {\r
974     NFC_INVALID_CONFIG  =   0x00U, /**< Invalid Configuration */\r
975     NFC_RF_READER_CONFIG, /**< Reader Parmaeters */\r
976     NFC_P2P_CONFIG,       /**< NFCIP1 Parameters */\r
977     NFC_SE_PROTECTION_CONFIG, /**< Secure Element \r
978                                    Protection Cofiguration */\r
979     NFC_EMULATION_CONFIG  /**< Emulation Parameters */\r
980 }phHal_eConfigType_t;\r
981 \r
982 /** \ingroup grp_hal_common\r
983 *\r
984 * \if hal\r
985 *  \brief Discovery Configuration Mode\r
986 * \else\r
987 *  \brief HAL-Specific\r
988 * \endif\r
989 *\r
990 *  This enumeration is used to choose the Discovery Configuration\r
991 *  Mode :- Configure and Start, Stop or Start with last set \r
992 *  configuration\r
993 *  \note None.\r
994 */\r
995 \r
996 typedef phNfc_eDiscoveryConfigMode_t phHal_eDiscoveryConfigMode_t;\r
997 \r
998 \r
999 /** \ingroup grp_hal_common\r
1000 *\r
1001 * \if hal\r
1002 *  \brief Target or Tag Release Mode\r
1003 * \else\r
1004 *  \brief HAL-Specific\r
1005 * \endif\r
1006 *\r
1007 *  This enumeration defines various modes of releasing an acquired target \r
1008 *  or tag.\r
1009 *  \note None.\r
1010 */\r
1011 typedef phNfc_eReleaseType_t phHal_eReleaseType_t;\r
1012 \r
1013 \r
1014 /** \ingroup grp_hal_common\r
1015 *\r
1016 * \if hal\r
1017 *  \brief Configuration of specific Emulation Feature\r
1018 * \else\r
1019 *  \brief HAL-Specific\r
1020 * \endif\r
1021 *\r
1022 *  This enumeration is used to choose configuration for a specific\r
1023 *  emulation feature.\r
1024 *  \note None.\r
1025 */\r
1026 \r
1027 typedef enum phHal_eEmulationType\r
1028 {\r
1029     NFC_UNKNOWN_EMULATION       = 0x00U, /**< Invalid Configuration */\r
1030     NFC_HOST_CE_A_EMULATION     = 0x01U, /**< Configure parameters for Type A \r
1031                                               card emulation from host */\r
1032     NFC_HOST_CE_B_EMULATION     = 0x02U, /**< Configure parameters for Type B \r
1033                                               card emulation from host */\r
1034     NFC_B_PRIME_EMULATION       = 0x03U, /**< Configure parameters for Type B' \r
1035                                               card emulation from host */\r
1036     NFC_FELICA_EMULATION        = 0x04U, /**< Configure parameters for Type F \r
1037                                               card emulation from host */\r
1038     NFC_MIFARE_EMULATION        = 0x06U, /**< Configure parameters for MIFARE \r
1039                                               card emulation - For Future Use */\r
1040     NFC_SMARTMX_EMULATION       = 0x07U, /**< Configure parameters for SmartMX \r
1041                                             */\r
1042     NFC_UICC_EMULATION          = 0x08U  /**< Configure parameters for UICC \r
1043                                             emulation */\r
1044 }phHal_eEmulationType_t;\r
1045 \r
1046 #if 0\r
1047 /** \ingroup grp_hal_nfct\r
1048  *\r
1049  * \if hal\r
1050  *  \brief Information for Target Mode Start-Up\r
1051  * \else\r
1052  *  \brief HAL-Specific\r
1053  * \endif\r
1054  *\r
1055  *  The <em> Target Information Structure </em> required to start Target mode. \r
1056  *  It contains all the information for the Target mode.\r
1057  *\r
1058  *  \note None.\r
1059  *\r
1060  */\r
1061 \r
1062 typedef struct phHal_sTargetInfo\r
1063 {\r
1064     uint8_t                 enableEmulation;\r
1065     phHal_sNfcIPCfg_t       targetConfig;\r
1066 } phHal_sTargetInfo_t;\r
1067 #endif\r
1068 \r
1069 \r
1070 /** \ingroup grp_hal_common\r
1071 *\r
1072 * \if hal\r
1073 *  \brief Mode of operation for SmartMX\r
1074 * \else\r
1075 *  \brief HAL-Specific\r
1076 * \endif\r
1077 *\r
1078 *  This enumeration is used to choose the mode of operation for the SmartMx Module.\r
1079 *  Default static configuration at initialization time.\r
1080 *  \note None.\r
1081 */\r
1082 \r
1083 typedef enum phHal_eSmartMX_Mode{\r
1084     eSmartMx_Wired      = 0x00U, /* SmartMX is in Wired Mode */\r
1085     eSmartMx_Default,            /* SmartMX is in Default Configuration Mode */\r
1086     eSmartMx_Virtual,            /* SmartMx in the Virutal Mode */\r
1087     eSmartMx_Off                 /* SmartMx Feature is Switched off */\r
1088 } phHal_eSmartMX_Mode_t;\r
1089 \r
1090 \r
1091 /** \ingroup grp_hal_common\r
1092 *\r
1093 * \if hal\r
1094 *  \brief Mode of operation for SWP\r
1095 * \else\r
1096 *  \brief HAL-Specific\r
1097 * \endif\r
1098 *\r
1099 *  This enumeration is used to choose the mode of operation for the SWP Link \r
1100 *  for UICC Module. Default static configuration at initialization time.\r
1101 *  \note None.\r
1102 */\r
1103 \r
1104 typedef enum phHal_eSWP_Mode{\r
1105     eSWP_Switch_Off      = 0x00U,   /* SWP Link is Switched off */\r
1106     eSWP_Switch_Default,            /* SWP is in Default Configuration Mode */\r
1107     eSWP_Switch_On                  /* SWP Link is Switched on */\r
1108 } phHal_eSWP_Mode_t;\r
1109 \r
1110 \r
1111 /** \ingroup grp_hal_common\r
1112 *\r
1113 * \if hal\r
1114 *  \brief Information for the Configuring the SmartMX \r
1115 * \else\r
1116 *  \brief HAL-Specific\r
1117 * \endif\r
1118 *\r
1119 *  The <em> \ref phHal_sSmartMX_Cfg structure </em> holds the information \r
1120 *   to configure the SmartMX Module in the NFC Device.\r
1121 *\r
1122 *  \note None.\r
1123 */\r
1124 \r
1125 \r
1126 typedef struct phHal_sSmartMX_Cfg\r
1127 {\r
1128     uint8_t                 enableEmulation;\r
1129     uint8_t                 lowPowerMode;\r
1130     phHal_eSmartMX_Mode_t   smxMode;\r
1131 }phHal_sSmartMX_Cfg_t;\r
1132 \r
1133 \r
1134 /** \ingroup grp_hal_common\r
1135 *\r
1136 * \if hal\r
1137 *  \brief Information for the Configuring the UICC \r
1138 * \else\r
1139 *  \brief HAL-Specific\r
1140 * \endif\r
1141 *\r
1142 *  The <em> \ref phHal_sUiccEmuCfg structure </em> holds the information \r
1143 *   to configure the UICC Host.\r
1144 *\r
1145 *  \note None.\r
1146 */\r
1147 \r
1148 \r
1149 typedef struct phHal_sUiccEmuCfg\r
1150 {\r
1151     uint8_t             enableUicc;\r
1152     uint8_t             uiccEmuSupport;\r
1153     uint8_t             uiccReaderSupport;\r
1154     uint8_t             lowPowerMode;\r
1155     /* TODO: This will be updated later */\r
1156 }phHal_sUiccEmuCfg_t;\r
1157 \r
1158 /** \ingroup grp_hal_common\r
1159 *\r
1160 * \if hal\r
1161 *  \brief Information for the Configuring the Type A Host Emulation Feature\r
1162 * \else\r
1163 *  \brief HAL-Specific\r
1164 * \endif\r
1165 *\r
1166 *  The <em> \ref phHal_sHostEmuCfg_A structure </em> holds the information \r
1167 *   to configure the Host Emulation for Type A.\r
1168 *\r
1169 *  \note None.\r
1170 */\r
1171 \r
1172 typedef struct phHal_sHostEmuCfg_A\r
1173 {\r
1174     uint8_t                 enableEmulation;\r
1175     phNfc_sIso14443AInfo_t  hostEmuCfgInfo;\r
1176     uint8_t                 enableCID;\r
1177 }phHal_sHostEmuCfg_A_t;\r
1178 \r
1179 \r
1180 /** \ingroup grp_hal_common\r
1181 *\r
1182 * \if hal\r
1183 *  \brief Information for the Configuring the Type B Host Emulation Feature\r
1184 * \else\r
1185 *  \brief HAL-Specific\r
1186 * \endif\r
1187 *\r
1188 *  The <em> \ref phHal_sHostEmuCfg_B structure </em> holds the information \r
1189 *   to configure the Host Emulation for Type B.\r
1190 *\r
1191 *  \note None.\r
1192 */\r
1193 \r
1194 typedef struct phHal_sHostEmuCfg_B\r
1195 {\r
1196     uint8_t                 enableEmulation;\r
1197     phNfc_sIso14443BInfo_t  hostEmuCfgInfo;\r
1198 }phHal_sHostEmuCfg_B_t;\r
1199 \r
1200 /** \ingroup grp_hal_common\r
1201 *\r
1202 * \if hal\r
1203 *  \brief Information for the Configuring the Felica Host Emulation Feature\r
1204 * \else\r
1205 *  \brief HAL-Specific\r
1206 * \endif\r
1207 *\r
1208 *  The <em> \ref phHal_sHostEmuCfg_F structure </em> holds the information \r
1209 *   to configure the Felica Host Emulation.\r
1210 *\r
1211 *  \note None.\r
1212 */\r
1213 \r
1214 \r
1215 typedef struct phHal_sHostEmuCfg_F\r
1216 {\r
1217     uint8_t                 enableEmulation;\r
1218 }phHal_sHostEmuCfg_F_t;\r
1219 \r
1220 \r
1221 /** \ingroup grp_hal_common\r
1222 *\r
1223 * \if hal\r
1224 *  \brief Information for the Configuring the Emulation\r
1225 * \else\r
1226 *  \brief HAL-Specific\r
1227 * \endif\r
1228 *\r
1229 *  The <em> \ref phHal_sEmulationCfg structure </em> holds the information \r
1230 *   required for the device to act as a Tag or NFCIP1 Target.\r
1231 *\r
1232 *  \note phHal_sHostEmuCfg_F_t Type F emulation is not presently supported\r
1233 *  is reserved for future use. \r
1234 */\r
1235 \r
1236 typedef struct phHal_sEmulationCfg\r
1237 {\r
1238     phHal_HostType_t        hostType;\r
1239     phHal_eEmulationType_t  emuType;\r
1240     union phHal_uEmuConfig\r
1241     {\r
1242         phHal_sSmartMX_Cfg_t    smartMxCfg;\r
1243         phHal_sHostEmuCfg_A_t   hostEmuCfg_A;\r
1244         phHal_sHostEmuCfg_B_t   hostEmuCfg_B;\r
1245         phHal_sHostEmuCfg_F_t   hostEmuCfg_F;\r
1246         phHal_sUiccEmuCfg_t     uiccEmuCfg;\r
1247     }config;\r
1248 }phHal_sEmulationCfg_t;\r
1249 \r
1250 /** \ingroup grp_hal_common\r
1251 *\r
1252 * \if hal\r
1253 *  \brief Information for the Configuring the Reader parameters\r
1254 * \else\r
1255 *  \brief HAL-Specific\r
1256 * \endif\r
1257 *\r
1258 *  The <em> \ref phHal_sReaderCfg structure </em> holds the information \r
1259 *   to configure the Reader A or Reader B parameters.\r
1260 *\r
1261 *  \note None.\r
1262 */\r
1263 \r
1264 typedef struct phHal_sReaderCfg\r
1265 {\r
1266     phHal_eRFDevType_t    readerType;\r
1267     union phHal_uReaderCfg\r
1268     {\r
1269         phHal_sIso14443ACfg_t       Iso14443ACfg;\r
1270         phHal_sIso14443BCfg_t       Iso14443BCfg;\r
1271     }config;\r
1272 }phHal_sReaderCfg_t;\r
1273 \r
1274 \r
1275 /** \ingroup grp_hal_common\r
1276 *\r
1277 * \if hal\r
1278 *  \brief Information for Configuring the Protected Mode for \r
1279 *  the Secure Elements.\r
1280 * \else\r
1281 *  \brief HAL-Specific\r
1282 * \endif\r
1283 *\r
1284 *  The <em> \ref phHal_sSEProtectionCfg structure </em> holds the \r
1285 *  information to configure the Secure Element Protection configuration.\r
1286 *\r
1287 *  \note None.\r
1288 */\r
1289 \r
1290 typedef struct phHal_sSEProtectionCfg\r
1291 {\r
1292     uint8_t         mode;\r
1293 }phHal_sSEProtectionCfg_t;\r
1294 \r
1295 \r
1296 /** \ingroup  grp_hal_common\r
1297 *\r
1298 * \if hal\r
1299 *  \brief Poll configuration structure\r
1300 * \else\r
1301 *  \brief HAL-Specific\r
1302 * \endif\r
1303 *\r
1304 *  The <em> Poll configuration structure </em> holds information about the \r
1305 *  enabling the the type of discovery required by the application. This \r
1306 *  structure is the input parameter for the discovery call\r
1307 *\r
1308 *  \note All members of this structure are input parameters [out].\r
1309 *\r
1310 *  \if hal\r
1311 *   \sa \ref phHal4Nfc_Connect, \ref phHal4Nfc_ConfigParameters, \r
1312 *            \ref phHal_eP2PMode_t and \ref phHal4Nfc_Disconnect.\r
1313 *  \endif\r
1314 *\r
1315 */\r
1316 \r
1317 typedef phNfc_sADD_Cfg_t phHal_sADD_Cfg_t;\r
1318 \r
1319 \r
1320 /** \ingroup grp_hal_common\r
1321 *\r
1322 * \if hal\r
1323 *  \brief Configuration information.\r
1324 * \else\r
1325 *  \brief HAL-Specific\r
1326 * \endif\r
1327 *\r
1328 *  The <em> \ref phHal_uConfig structure </em> holds the information \r
1329 *   required for Configuring the Device.\r
1330 *\r
1331 *  \note None.\r
1332 */\r
1333 \r
1334 \r
1335 typedef union phHal_uConfig\r
1336 {\r
1337     phHal_sEmulationCfg_t emuConfig;  \r
1338     phHal_sNfcIPCfg_t     nfcIPConfig;    /**< Gives the information about\r
1339                                            *  the General Bytes for NFC-IP \r
1340                                            *  Communication.\r
1341                                            */\r
1342     phHal_sReaderCfg_t       readerConfig;\r
1343     phHal_sSEProtectionCfg_t protectionConfig;\r
1344 }phHal_uConfig_t;\r
1345 \r
1346 \r
1347 #endif\r
1348 \r
1349 /* EOF */\r