Add device listing capabilities

- acr122: add acr122_pick_device(), acr122_list_devices();
  - Add device name to device descriptions (nfc_device_desc_t) to select a given PCSC device;
  - Use constants for driver names;
  - Various code cleanups and enhancements.
This commit is contained in:
Romain Tartiere
2009-11-24 13:03:48 +00:00
parent fbb924e3bb
commit 1af29561e8
15 changed files with 201 additions and 122 deletions

View File

@@ -21,12 +21,13 @@
* @brief
*/
#ifndef _LIBNFC_DEV_PN532_UART_H_
#define _LIBNFC_DEV_PN532_UART_H_
#ifndef __NFC_DRIVER_PN532_UART_H__
#define __NFC_DRIVER_PN532_UART_H__
#include "nfc-types.h"
#define PN532_UART_DRIVER_NAME "PN532_UART"
// Functions used by developer to handle connection to this device
nfc_device_t* pn532_uart_connect(const nfc_device_desc_t* pndd);
void pn532_uart_disconnect(nfc_device_t* pnd);
@@ -34,5 +35,5 @@ void pn532_uart_disconnect(nfc_device_t* pnd);
// Callback function used by libnfc to transmit commands to the PN53X chip
bool pn532_uart_transceive(const nfc_device_spec_t nds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen);
#endif // _LIBNFC_DEV_PN532_UART_H_
#endif // ! __NFC_DRIVER_PN532_UART_H__