Merge pull request #590 from AdamLaurie/master

add debugging for high level config requests
This commit is contained in:
Adam Laurie 2020-04-04 17:18:46 +01:00 committed by GitHub
commit 8a1e14901d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}