mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 18:13:46 +00:00
Allow to connect to a device using a connection string:
- Provide a nfc_get_default_device() that allow to grab the connstring stored in LIBNFC_DEFAULT_DEVICE environnement variable or returns the first available device if not set; - nfc_connect(NULL) now takes the default device (see nfc_get_default_device()); - Removes nfc_driver_desc_t from public types - Defines nfc_connstring as char[1024] - examples/*: use nfc_connstring - examples/nfc-poll: now uses only the default device (instead of all devices availables) - Removes parse_args() from nfc-utils.[hc]
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
|
||||
# include <nfc/nfc-types.h>
|
||||
|
||||
bool pn532_uart_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * pszDeviceFound);
|
||||
bool pn532_uart_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound);
|
||||
|
||||
nfc_device_t *pn532_uart_connect (const nfc_device_desc_t * pndd);
|
||||
nfc_device_t *pn532_uart_connect (const nfc_connstring connstring);
|
||||
void pn532_uart_disconnect (nfc_device_t * pnd);
|
||||
bool pn532_uart_send (nfc_device_t * pnd, const byte_t * pbtData, const size_t szData, struct timeval *timeout);
|
||||
int pn532_uart_receive (nfc_device_t * pnd, byte_t * pbtData, const size_t szData, struct timeval *timeout);
|
||||
|
||||
Reference in New Issue
Block a user