diff options
author | Daniel Tomas <dtomas.nxp@gmail.com> | 2011-06-21 17:24:09 +0200 |
---|---|---|
committer | mike wakerly <mikey@google.com> | 2011-06-28 10:47:23 -0700 |
commit | 967359c892ff74962b4f4243d989f447ffe4ae11 (patch) | |
tree | 548bdc1245227f4b64e4e698552d8f66255d2363 /src/phLibNfc_SE.c | |
parent | 99141cdd942973bc0cb8ef208ef717b14eb73b8e (diff) | |
download | external_libnfc-nxp-967359c892ff74962b4f4243d989f447ffe4ae11.zip external_libnfc-nxp-967359c892ff74962b4f4243d989f447ffe4ae11.tar.gz external_libnfc-nxp-967359c892ff74962b4f4243d989f447ffe4ae11.tar.bz2 |
Patch to support the new PN544 firmware events
Change-Id: I6e5a976721fb52f2da30081276bb2ac15d27d186
Diffstat (limited to 'src/phLibNfc_SE.c')
-rw-r--r-- | src/phLibNfc_SE.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/phLibNfc_SE.c b/src/phLibNfc_SE.c index 5fa4e08..4e839cf 100644 --- a/src/phLibNfc_SE.c +++ b/src/phLibNfc_SE.c @@ -204,6 +204,51 @@ STATIC void phLibNfc_SeNotification(void *context, status); break; } + + case NFC_EVT_APDU_RECEIVED: + { + if ((pEvtInfo->eventInfo.aid.length != 0) && ((pEvtInfo->eventInfo.aid.length <= 16))) + { + /* Copy received APDU to aid buffer. */ + Se_Trans_Info.UiccEvtInfo.aid.buffer = pEvtInfo->eventInfo.aid.buffer; + Se_Trans_Info.UiccEvtInfo.aid.length = pEvtInfo->eventInfo.aid.length; + } + + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtApduReceived, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } + + case NFC_EVT_MIFARE_ACCESS: + { + /* copy the Block MIFARE accessed */ + Se_Trans_Info.UiccEvtInfo.aid.buffer = pEvtInfo->eventInfo.aid.buffer; + Se_Trans_Info.UiccEvtInfo.aid.length = pEvtInfo->eventInfo.aid.length; + + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtMifareAccess, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } + + case NFC_EVT_EMV_CARD_REMOVAL: + { + (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( + pLibContext->sSeContext.sSeCallabackInfo.pSeListenerCtxt, + phLibNfc_eSE_EvtCardRemoval, + pSeInfo->hSecureElement, + &Se_Trans_Info, + status); + break; + } + case NFC_EVT_END_OF_TRANSACTION: { (*pLibContext->sSeContext.sSeCallabackInfo.pSeListenerNtfCb)( |