nfc_get_supported_baud_rate() proposal to reverse API

cf issue #298
nfc_get_supported_baud_rate() would be the one for "initiator mode"
and we add nfc_get_supported_baud_rate_target_mode()
This commit is contained in:
Philippe Teuwen
2015-06-08 11:34:16 +02:00
parent fecc19de4c
commit 04a51df796
3 changed files with 29 additions and 9 deletions

View File

@@ -3366,7 +3366,7 @@ pn53x_get_information_about(nfc_device *pnd, char **pbuf)
}
buflen -= res;
const nfc_baud_rate *nbr;
if ((res = nfc_device_get_supported_baud_rate(pnd, N_INITIATOR, nmt[i], &nbr)) < 0) {
if ((res = nfc_device_get_supported_baud_rate(pnd, nmt[i], &nbr)) < 0) {
free(*pbuf);
return res;
}
@@ -3431,7 +3431,7 @@ pn53x_get_information_about(nfc_device *pnd, char **pbuf)
}
buflen -= res;
const nfc_baud_rate *nbr;
if ((res = nfc_device_get_supported_baud_rate(pnd, N_TARGET, nmt[i], &nbr)) < 0) {
if ((res = nfc_device_get_supported_baud_rate_target_mode(pnd, nmt[i], &nbr)) < 0) {
free(*pbuf);
return res;
}