diff options
author | Daniel Tomas <dtomas.nxp@gmail.com> | 2011-06-28 17:57:52 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-06-28 17:57:52 -0700 |
commit | f6ee24c71b104308e6ee5a71fad9041f3a7aedb5 (patch) | |
tree | eff2176b01c2065a85a958f4477aebbd29d9fae0 /src/phLibNfc_SE.c | |
parent | b313c3d09c64c31439332e88e0aca676ae1858b5 (diff) | |
parent | 51c0ca53011b86464dcf14aeb33944a69861a8f4 (diff) | |
download | libnfc-nxp-f6ee24c71b104308e6ee5a71fad9041f3a7aedb5.tar.gz |
am 51c0ca53: am f1612434: am 967359c8: Patch to support the new PN544 firmware events
* commit '51c0ca53011b86464dcf14aeb33944a69861a8f4':
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 06913d4..3c271f3 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)( |