From f47af31fb750c159c658b099877f2ae6b577058a Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Sun, 3 Jun 2012 21:05:26 +0000 Subject: [PATCH] Indent correctly previous commit (make style) --- libnfc/chips/pn53x.c | 32 ++++++++++++++++---------------- libnfc/nfc.c | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index f54c48c..f25abb0 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -63,9 +63,9 @@ nfc_modulation pn53x_ptt_to_nm(const pn53x_target_type ptt); pn53x_modulation pn53x_nm_to_pm(const nfc_modulation nm); pn53x_target_type pn53x_nm_to_ptt(const nfc_modulation nm); -void pn53x_current_target_new (const struct nfc_device *pnd, const nfc_target *pnt); -void pn53x_current_target_free (const struct nfc_device *pnd); -bool pn53x_current_target_is (const struct nfc_device *pnd, const nfc_target *pnt); +void pn53x_current_target_new(const struct nfc_device *pnd, const nfc_target *pnt); +void pn53x_current_target_free(const struct nfc_device *pnd); +bool pn53x_current_target_is(const struct nfc_device *pnd, const nfc_target *pnt); /* implementations */ int @@ -855,10 +855,10 @@ pn53x_set_property_bool(struct nfc_device *pnd, const nfc_property property, con // timings could be tweak better than this, and maybe we can tweak timings // to "gain" a sort-of hardware polling (ie. like PN532 does) return pn53x_RFConfiguration__MaxRetries(pnd, - (bEnable) ? 0xff : 0x00, // MxRtyATR, default: active = 0xff, passive = 0x02 - (bEnable) ? 0xff : 0x01, // MxRtyPSL, default: 0x01 - (bEnable) ? 0xff : 0x02 // MxRtyPassiveActivation, default: 0xff (0x00 leads to problems with PN531) - ); + (bEnable) ? 0xff : 0x00, // MxRtyATR, default: active = 0xff, passive = 0x02 + (bEnable) ? 0xff : 0x01, // MxRtyPSL, default: 0x01 + (bEnable) ? 0xff : 0x02 // MxRtyPassiveActivation, default: 0xff (0x00 leads to problems with PN531) + ); } break; @@ -1111,7 +1111,7 @@ pn53x_initiator_select_passive_target_ext(struct nfc_device *pnd, if ((res = pn53x_decode_target_data(abtTargetsData + 1, szTargetsData - 1, CHIP_DATA(pnd)->type, nm.nmt, &(pnt->nti)) < 0)) { return res; } - pn53x_current_target_new (pnd, pnt); + pn53x_current_target_new(pnd, pnt); } return abtTargetsData[0]; } @@ -1166,7 +1166,7 @@ pn53x_initiator_poll_target(struct nfc_device *pnd, return NFC_ECHIP; break; } - pn53x_current_target_new (pnd, pnt); + pn53x_current_target_new(pnd, pnt); } else { pn53x_set_property_bool(pnd, NP_INFINITE_SELECT, true); // FIXME It does not support DEP targets @@ -1227,7 +1227,7 @@ pn53x_initiator_select_dep_target(struct nfc_device *pnd, } else { res = pn53x_InJumpForDEP(pnd, ndm, nbr, pbtPassiveInitiatorData, NULL, NULL, 0, pnt, timeout); } - if (res>=0) + if (res >= 0) pn53x_current_target_new(pnd, pnt); return res; } @@ -1652,7 +1652,7 @@ int pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target nt) { // Check if the argument target nt is equals to current saved target - if (!pn53x_current_target_is (pnd, &nt)) { + if (!pn53x_current_target_is(pnd, &nt)) { return NFC_ETGRELEASED; } @@ -1882,7 +1882,7 @@ pn53x_target_init(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const if (pnt->nm.nmt == NMT_DEP) { pnt->nti.ndi.ndm = ndm; // Update DEP mode } - pn53x_current_target_new (pnd, pnt); + pn53x_current_target_new(pnd, pnt); if (ptm & PTM_ISO14443_4_PICC_ONLY) { // When PN532 is in PICC target mode, it automatically reply to RATS so @@ -3027,7 +3027,7 @@ pn53x_get_information_about(nfc_device *pnd, char *buf, size_t buflen) } void -pn53x_current_target_new (const struct nfc_device *pnd, const nfc_target *pnt) +pn53x_current_target_new(const struct nfc_device *pnd, const nfc_target *pnt) { // Keep the current nfc_target for further commands if (CHIP_DATA(pnd)->current_target) { @@ -3038,7 +3038,7 @@ pn53x_current_target_new (const struct nfc_device *pnd, const nfc_target *pnt) } void -pn53x_current_target_free (const struct nfc_device *pnd) +pn53x_current_target_free(const struct nfc_device *pnd) { if (CHIP_DATA(pnd)->current_target) { free(CHIP_DATA(pnd)->current_target); @@ -3047,13 +3047,13 @@ pn53x_current_target_free (const struct nfc_device *pnd) } bool -pn53x_current_target_is (const struct nfc_device *pnd, const nfc_target *pnt) +pn53x_current_target_is(const struct nfc_device *pnd, const nfc_target *pnt) { if ((CHIP_DATA(pnd)->current_target == NULL) || (pnt == NULL)) { return false; } // XXX It will not work if t is not binary-equal to current target - if (0 != memcmp (pnt, CHIP_DATA(pnd)->current_target, sizeof(nfc_target))) { + if (0 != memcmp(pnt, CHIP_DATA(pnd)->current_target, sizeof(nfc_target))) { return false; } return true; diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 6f73fe1..05bb6b7 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -614,9 +614,9 @@ nfc_initiator_deselect_target(nfc_device *pnd) * Tests show that on average this way of communicating is much faster than using the regular driver/middle-ware (often supplied by manufacturers). * * @warning The configuration option \a NP_HANDLE_PARITY must be set to \c true (the default value). - * + * * @note When used with MIFARE Classic, NFC_ETGRELEASED error is returned if authentication command failed. You need to re-select the tag to operate with. - * + * */ int nfc_initiator_transceive_bytes(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx,