2010-01-12 18:58:13 +01:00
|
|
|
/*-
|
2009-10-12 16:52:26 +02:00
|
|
|
* Public platform independent Near Field Communication (NFC) library
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009, Roel Verdult
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
2010-01-12 18:58:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-11-10 10:47:59 +01:00
|
|
|
* @file drivers.h
|
2010-01-12 18:58:13 +01:00
|
|
|
* @brief Supported drivers header
|
2009-10-12 16:52:26 +02:00
|
|
|
*/
|
2009-04-29 14:58:29 +02:00
|
|
|
|
2009-11-20 12:27:07 +01:00
|
|
|
#ifndef __NFC_DRIVERS_H__
|
|
|
|
#define __NFC_DRIVERS_H__
|
2009-11-10 10:47:59 +01:00
|
|
|
|
2010-01-12 18:58:13 +01:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif /* HAVE_CONFIG_H */
|
|
|
|
|
|
|
|
|
2009-12-01 15:23:00 +01:00
|
|
|
#include <nfc/nfc-types.h>
|
2009-11-10 10:47:59 +01:00
|
|
|
|
2009-06-11 13:57:36 +02:00
|
|
|
#ifdef HAVE_PCSC_LITE
|
2009-11-04 11:42:53 +01:00
|
|
|
#include "drivers/acr122.h"
|
2009-09-14 10:47:31 +02:00
|
|
|
#endif /* HAVE_PCSC_LITE */
|
2009-11-10 10:47:59 +01:00
|
|
|
|
2009-09-10 11:28:17 +02:00
|
|
|
#ifdef HAVE_LIBUSB
|
2009-12-06 17:36:55 +01:00
|
|
|
#include "drivers/pn53x_usb.h"
|
2009-11-10 10:47:59 +01:00
|
|
|
#include "drivers/pn531_usb.h"
|
|
|
|
#include "drivers/pn533_usb.h"
|
2009-09-14 10:47:31 +02:00
|
|
|
#endif /* HAVE_LIBUSB */
|
2009-11-10 10:47:59 +01:00
|
|
|
|
2009-11-04 11:42:53 +01:00
|
|
|
#include "drivers/arygon.h"
|
|
|
|
#include "drivers/pn532_uart.h"
|
2009-04-29 14:58:29 +02:00
|
|
|
|
2009-11-10 10:47:59 +01:00
|
|
|
#define DRIVERS_MAX_DEVICES 16
|
|
|
|
#define MAX_FRAME_LEN 264
|
|
|
|
|
2009-11-04 11:14:17 +01:00
|
|
|
const static struct driver_callbacks drivers_callbacks_list[] = {
|
2009-12-03 16:57:13 +01:00
|
|
|
// Driver Name Pick Device List Devices Connect Transceive Disconnect
|
2009-06-11 13:57:36 +02:00
|
|
|
#ifdef HAVE_PCSC_LITE
|
2009-12-03 16:57:13 +01:00
|
|
|
{ ACR122_DRIVER_NAME, acr122_pick_device, acr122_list_devices, acr122_connect, acr122_transceive, acr122_disconnect },
|
2009-09-14 10:47:31 +02:00
|
|
|
#endif /* HAVE_PCSC_LITE */
|
2009-09-10 11:28:17 +02:00
|
|
|
#ifdef HAVE_LIBUSB
|
2009-12-07 22:13:36 +01:00
|
|
|
{ PN531_USB_DRIVER_NAME, pn531_usb_pick_device, pn531_usb_list_devices, pn531_usb_connect, pn53x_usb_transceive, pn53x_usb_disconnect },
|
|
|
|
{ PN533_USB_DRIVER_NAME, pn533_usb_pick_device, pn533_usb_list_devices, pn533_usb_connect, pn53x_usb_transceive, pn53x_usb_disconnect },
|
2009-09-14 10:47:31 +02:00
|
|
|
#endif /* HAVE_LIBUSB */
|
2009-12-03 16:57:13 +01:00
|
|
|
{ PN532_UART_DRIVER_NAME, pn532_uart_pick_device, pn532_uart_list_devices, pn532_uart_connect, pn532_uart_transceive, pn532_uart_disconnect },
|
|
|
|
{ ARYGON_DRIVER_NAME, NULL, NULL, arygon_connect, arygon_transceive, arygon_disconnect }
|
2009-04-29 14:58:29 +02:00
|
|
|
};
|
|
|
|
|
2009-11-20 12:27:07 +01:00
|
|
|
#endif // __NFC_DRIVERS_H__
|
2009-04-29 14:58:29 +02:00
|
|
|
|