add timeout on nfc_target_init() and this function returns now received bytes count on success.

This commit is contained in:
Audrey Diacre 2012-01-05 15:10:11 +00:00
parent c80ebdca25
commit 239fd750c4
14 changed files with 22 additions and 21 deletions

View file

@ -84,7 +84,7 @@ target_thread (void *arg)
uint8_t abtRx[1024];
size_t szRx = sizeof (abtRx);
int res = nfc_target_init (device, &nt, abtRx, &szRx);
int res = nfc_target_init (device, &nt, abtRx, &szRx, 0);
cut_assert_equal_int (0, res, cut_message ("Can't initialize NFC device as target: %s", nfc_strerror (device)));
if (res < 0) { thread_res = -1; return (void*) thread_res; }

View file

@ -82,7 +82,7 @@ target_thread (void *arg)
uint8_t abtRx[1024];
size_t szRx = sizeof (abtRx);
int res = nfc_target_init (device, &nt, abtRx, &szRx);
int res = nfc_target_init (device, &nt, abtRx, &szRx, 0);
cut_assert_equal_int (0, res, cut_message ("Can't initialize NFC device as target: %s", nfc_strerror (device)));
if (res < 0) { thread_res = -1; return (void*) thread_res; }