mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-19 08:16:35 +00:00
examples, test and utils use now nfc_init() function.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user