examples, test and utils use now nfc_init() function.

This commit is contained in:
Audrey Diacre 2012-01-18 11:09:01 +00:00
parent d1b0e93e8e
commit 1d55b6f8c6
26 changed files with 51 additions and 7 deletions

View file

@ -17,6 +17,8 @@ test_access_storm (void)
nfc_connstring connstrings[MAX_DEVICE_COUNT];
int res = 0;
nfc_init ();
size_t ref_device_count = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
if (!ref_device_count)
cut_omit ("No NFC device found");

View file

@ -31,7 +31,7 @@ cut_setup (void)
if (n < 2) {
cut_omit ("At least two NFC devices must be plugged-in to run this test");
}
nfc_init ();
devices[TARGET] = nfc_open (connstrings[TARGET]);
devices[INITIATOR] = nfc_open (connstrings[INITIATOR]);

View file

@ -30,7 +30,8 @@ cut_setup (void)
if (n < 2) {
cut_omit ("At least two NFC devices must be plugged-in to run this test");
}
nfc_init ();
devices[TARGET] = nfc_open (connstrings[TARGET]);
devices[INITIATOR] = nfc_open (connstrings[INITIATOR]);

View file

@ -29,6 +29,7 @@ cut_setup (void)
cut_omit ("At least two NFC devices must be plugged-in to run this test");
}
nfc_init ();
second_device = nfc_open (connstrings[0]);
first_device = nfc_open (connstrings[1]);

View file

@ -11,6 +11,8 @@ test_register_endianness (void)
{
nfc_connstring connstrings[MAX_DEVICE_COUNT];
int res = 0;
nfc_init ();
size_t device_count = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
if (!device_count)

View file

@ -12,6 +12,8 @@ test_register_endianness (void)
{
nfc_connstring connstrings[MAX_DEVICE_COUNT];
int res = 0;
nfc_init ();
size_t device_count = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
if (!device_count)