blob: 99e3ffe8d47cc2bb67e191fd254caac5aeae7436 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
/*
* Copyright (C) 2010 NXP Semiconductors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*!
* \file phLibNfc_SE.h
*
* Project: NFC-FRI 1.1
*
* $Workfile:: phLibNfc_1.1.h $
* $Modtime:: $
* $Author: ing07299 $
* $Revision: 1.14 $
*
*/
#ifndef PHLIBNFC_SE_H
#define PHLIBNFC_SE_H
#define LIBNFC_SE_INVALID_HANDLE 0
#define LIBNFC_SE_SUPPORTED 2
#define LIBNFC_SE_BASE_HANDLE 0xABCDEF
#define LIBNFC_SE_SMARTMX_INDEX 0
#define LIBNFC_SE_UICC_INDEX 1
#define PAUSE_PHASE 0x0824 /*Indicates the Pause phase duration*/
#define EMULATION_PHASE 0x5161 /*Indicates the Emulation phase duration*/
typedef struct phLibNfc_SeCallbackInfo
{
/* SE set mode callback and its context */
pphLibNfc_SE_SetModeRspCb_t pSEsetModeCb;
void *pSEsetModeCtxt;
/* Store SE discovery notification callback and its context */
pphLibNfc_SE_NotificationCb_t pSeListenerNtfCb;
void *pSeListenerCtxt;
}phLibNfc_SECallbackInfo_t;
/*SE State */
typedef enum {
phLibNfc_eSeInvalid = 0x00,
phLibNfc_eSeInit,
phLibNfc_eSeReady,
phLibNfc_eSeVirtual,
phLibNfc_eSeWired
}phLibNfc_SeState_t;
/* Context for secured element */
typedef struct phLibNfc_SeCtxt
{
/* UICC Status in Virtual Mode */
uint8_t uUiccActivate;
/* SMX Status in Virtual Mode */
uint8_t uSmxActivate;
/* Count of the Secure Elements Present */
uint8_t uSeCount;
/* Se Temp handle */
phLibNfc_Handle hSetemp;
/*Current SE state*/
phLibNfc_SeState_t eSE_State;
/*Current SE Mode */
phLibNfc_eSE_ActivationMode eActivatedMode;
/* SE callback information */
phLibNfc_SECallbackInfo_t sSeCallabackInfo;
}phLibNfc_SeCtxt_t;
extern phLibNfc_SE_List_t sSecuredElementInfo[PHLIBNFC_MAXNO_OF_SE];
#endif
|