diff options
author | daniel_tomas <daniel.tomas@nxp.com> | 2011-01-06 18:47:23 -0800 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2011-01-12 16:27:28 -0800 |
commit | 434eb43979d170509b9b28c0598e5f44e31aa348 (patch) | |
tree | 511a191d4e583c5f4cc5c237034794c06745391a /src | |
parent | 78f4485d27a7630534b2b28f24ab9d0190a2e642 (diff) | |
download | external_libnfc-nxp-434eb43979d170509b9b28c0598e5f44e31aa348.zip external_libnfc-nxp-434eb43979d170509b9b28c0598e5f44e31aa348.tar.gz external_libnfc-nxp-434eb43979d170509b9b28c0598e5f44e31aa348.tar.bz2 |
Event field ON/OFF management added in the libnfc
Change-Id: Ieafb6ab9094d9dc4b7edfb1e3676fd9794d8af28
Diffstat (limited to 'src')
-rw-r--r-- | src/phLibNfc.h | 6 | ||||
-rw-r--r-- | src/phLibNfc_SE.c | 36 |
2 files changed, 32 insertions, 10 deletions
diff --git a/src/phLibNfc.h b/src/phLibNfc.h index 0ef7522..c09815a 100644 --- a/src/phLibNfc.h +++ b/src/phLibNfc.h @@ -168,9 +168,11 @@ typedef enum element*/ phLibNfc_eSE_EvtTypeTransaction=0x02, /**<Indicates external reader trying to access secure element */ - phLibNfc_eSE_EvtConnectivity /**<This event notifies the terminal host that it shall + phLibNfc_eSE_EvtConnectivity, /**<This event notifies the terminal host that it shall send a connectivity event from UICC as defined in - ETSI TS 102 622 V7.4.0 */ + ETSI TS 102 622 V7.4.0 */ + phLibNfc_eSE_EvtFieldOn, // consider using phLibNfc_eSE_EvtConnectivity + phLibNfc_eSE_EvtFieldOff, } phLibNfc_eSE_EvtType_t; /** diff --git a/src/phLibNfc_SE.c b/src/phLibNfc_SE.c index 42334d8..958f0d1 100644 --- a/src/phLibNfc_SE.c +++ b/src/phLibNfc_SE.c @@ -213,8 +213,8 @@ STATIC void phLibNfc_SeNotification(void *context, &Se_Trans_Info, status); break; - } - case NFC_EVT_CONNECTIVITY: + } + case NFC_EVT_CONNECTIVITY: { (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, @@ -223,17 +223,37 @@ STATIC void phLibNfc_SeNotification(void *context, &Se_Trans_Info, status); break; - } - case NFC_EVT_START_OF_TRANSACTION: // PLG ++ - - (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + } + case NFC_EVT_START_OF_TRANSACTION: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, phLibNfc_eSE_EvtTypeTransaction, pSeInfo->hSecureElement, &Se_Trans_Info, status); - - break; // PLG -- + break; + } + case NFC_EVT_FIELD_ON: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtFieldOn, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } + case NFC_EVT_FIELD_OFF: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtFieldOff, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } default: { break; |