From 2a6a8e6e298f999d2ca78db439d496dc5983595c Mon Sep 17 00:00:00 2001 From: Adam Laurie Date: Sat, 4 Apr 2020 15:10:02 +0100 Subject: [PATCH] add debugging for high level config requests --- libnfc/nfc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 636697d..f239ba2 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -130,6 +130,25 @@ struct nfc_driver_list { const struct nfc_driver_list *nfc_drivers = NULL; +// descritions for debugging +const char * nfc_property_name[] = { + "NP_TIMEOUT_COMMAND", + "NP_TIMEOUT_ATR", + "NP_TIMEOUT_COM", + "NP_HANDLE_CRC", + "NP_HANDLE_PARITY", + "NP_ACTIVATE_FIELD", + "NP_ACTIVATE_CRYPTO1", + "NP_INFINITE_SELECT", + "NP_ACCEPT_INVALID_FRAMES", + "NP_ACCEPT_MULTIPLE_FRAMES", + "NP_AUTO_ISO14443_4", + "NP_EASY_FRAMING", + "NP_FORCE_ISO14443_A", + "NP_FORCE_ISO14443_B", + "NP_FORCE_SPEED_106" +}; + static void nfc_drivers_init(void) { @@ -409,6 +428,7 @@ nfc_list_devices(nfc_context *context, nfc_connstring connstrings[], const size_ int nfc_device_set_property_int(nfc_device *pnd, const nfc_property property, const int value) { + log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "set_property_int %s %s", nfc_property_name[property], value ? "True" : "False"); HAL(device_set_property_int, pnd, property, value); } @@ -428,6 +448,7 @@ nfc_device_set_property_int(nfc_device *pnd, const nfc_property property, const int nfc_device_set_property_bool(nfc_device *pnd, const nfc_property property, const bool bEnable) { + log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "set_property_bool %s %s", nfc_property_name[property], bEnable ? "True" : "False"); HAL(device_set_property_bool, pnd, property, bEnable); }