diff options
author | Daniel Tomas <dtomas.nxp@gmail.com> | 2011-06-28 17:22:58 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-06-28 17:22:58 -0700 |
commit | 51c0ca53011b86464dcf14aeb33944a69861a8f4 (patch) | |
tree | 8c64b09a7568ff5846b3000668c71b8774ffa0d1 /src/phLibNfc_SE.c | |
parent | 252aedb3edd2c04adedeb5c9f8369af504411dad (diff) | |
parent | f16124343b080a2f188350de5d5006d14a6eb1bb (diff) | |
download | libnfc-nxp-51c0ca53011b86464dcf14aeb33944a69861a8f4.tar.gz |
am f1612434: am 967359c8: Patch to support the new PN544 firmware events
* commit 'f16124343b080a2f188350de5d5006d14a6eb1bb':
Patch to support the new PN544 firmware events
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)( |