From ec601f6a003c2ed09bb6bd097c43aae3bb03a0e1 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Wed, 13 Oct 2010 19:31:02 +0000 Subject: [PATCH] Fix two bugs introduced in r729, typo. --- libnfc/chips/pn53x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 444534a..a4d0e0d 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -663,7 +663,7 @@ pn53x_InAutoPoll (nfc_device_t * pnd, /* 2nd target */ // Target type ptt = *(pbt++); - pntTargets[1].nm.nmt = pn53x_ptt_to_nmt(*(pbt++)); + pntTargets[1].nm.nmt = pn53x_ptt_to_nmt(ptt); // AutoPollTargetData length ln = *(pbt++); pn53x_decode_target_data (pbt, ln, pnd->nc, ptt, &(pntTargets[1].nti)); @@ -909,7 +909,7 @@ pn53x_InJumpForDEP (nfc_device_t * pnd, const bool bActiveDep, abtCmd[3] = 0x00; /* baud rate = 106kbps */ offset = 5; - if (pbtPassiveInitiatorData && bActiveDep) { /* can't have passive initiator data when using active mode */ + if (pbtPassiveInitiatorData && !bActiveDep) { /* can't have passive initiator data when using active mode */ abtCmd[4] |= 0x01; memcpy (abtCmd + offset, pbtPassiveInitiatorData, szPassiveInitiatorData); offset += szPassiveInitiatorData; @@ -1356,7 +1356,7 @@ pn53x_target_send_bytes (nfc_device_t * pnd, const byte_t * pbtTx, const size_t return true; } -// FIXME How to handle conner case ? +// FIXME How to handle corner case ? const pn53x_modulation_t pn53x_nm_to_pm(const nfc_modulation_t nm) { @@ -1396,7 +1396,7 @@ pn53x_nm_to_pm(const nfc_modulation_t nm) } } -// FIXME How to handle conner case ? +// FIXME How to handle corner case ? const nfc_modulation_type_t pn53x_ptt_to_nmt( const pn53x_target_type_t ptt ) {