Replace nfc_target_info_t with nfc_target_t in API function, we now have a coherent struct to handle nfc_target_t, use it!
This commit is contained in:
parent
6f3fbcb6bf
commit
af88da1a9c
10 changed files with 76 additions and 85 deletions
|
|
@ -41,7 +41,7 @@ int
|
|||
main (int argc, const char *argv[])
|
||||
{
|
||||
nfc_device_t *pnd;
|
||||
nfc_target_info_t nti;
|
||||
nfc_target_t nt;
|
||||
byte_t abtRx[MAX_FRAME_LEN];
|
||||
size_t szRx;
|
||||
byte_t abtTx[] = "Hello World!";
|
||||
|
|
@ -62,12 +62,11 @@ main (int argc, const char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if(!nfc_initiator_select_dep_target (pnd, NDM_PASSIVE, NULL, &nti)) {
|
||||
if(!nfc_initiator_select_dep_target (pnd, NDM_PASSIVE, NULL, &nt)) {
|
||||
nfc_perror(pnd, "nfc_initiator_select_dep_target");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
printf( "This D.E.P. target have been found:\n" );
|
||||
print_nfc_dep_info (nti.ndi);
|
||||
print_nfc_target (nt);
|
||||
|
||||
printf ("Sending: %s\n", abtTx);
|
||||
if (!nfc_initiator_transceive_bytes (pnd, abtTx, sizeof(abtTx), abtRx, &szRx)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue