rx buffer size parameter of pn53x_transceive() function is now a const size_t.

This commit is contained in:
Audrey Diacre 2012-01-09 10:24:00 +00:00
parent 7df3bb5aeb
commit c10b473361
7 changed files with 75 additions and 62 deletions

View file

@ -181,11 +181,13 @@ int main(int argc, const char* argv[])
print_hex((uint8_t*)abtTx,szTx);
szRx = sizeof(abtRx);
if (pn53x_transceive (pnd, abtTx, szTx, abtRx, &szRx, 0) < 0) {
int res = 0;
if ((res = pn53x_transceive (pnd, abtTx, szTx, abtRx, szRx, 0)) < 0) {
free(cmd);
nfc_perror (pnd, "Rx");
continue;
}
szRx = (size_t) res;
printf("Rx: ");
print_hex(abtRx, szRx);