summaryrefslogtreecommitdiffstats
path: root/src/phLibNfc_SE.h
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-09-23 12:47:58 -0700
committerNick Pelly <npelly@google.com>2010-09-23 13:53:18 -0700
commit5d9927ba30ba449badb9f6df0fbeb4d6aedc6e2a (patch)
tree190f9251c6db03d3550ec7f30b51a2561c01d9cf /src/phLibNfc_SE.h
parent4ff7c86a2c706b150078274455406f1b04966e1a (diff)
downloadexternal_libnfc-nxp-5d9927ba30ba449badb9f6df0fbeb4d6aedc6e2a.zip
external_libnfc-nxp-5d9927ba30ba449badb9f6df0fbeb4d6aedc6e2a.tar.gz
external_libnfc-nxp-5d9927ba30ba449badb9f6df0fbeb4d6aedc6e2a.tar.bz2
Initial libnfc checkin
Source: Trusted_NFC_Device_Host_AA03.01e02_google.zip code drop (23-Sep-2010) Change-Id: Ie47f18423f949a8d3e0815d13f55c814312add24 Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'src/phLibNfc_SE.h')
-rw-r--r--src/phLibNfc_SE.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/phLibNfc_SE.h b/src/phLibNfc_SE.h
new file mode 100644
index 0000000..99e3ffe
--- /dev/null
+++ b/src/phLibNfc_SE.h
@@ -0,0 +1,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
+
+