drivers.h

Go to the documentation of this file.
00001 /*-
00002  * Public platform independent Near Field Communication (NFC) library
00003  * 
00004  * Copyright (C) 2009, Roel Verdult
00005  * 
00006  * This program is free software: you can redistribute it and/or modify it
00007  * under the terms of the GNU Lesser General Public License as published by the
00008  * Free Software Foundation, either version 3 of the License, or (at your
00009  * option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00014  * more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>
00018  */
00019 
00025 #ifndef __NFC_DRIVERS_H__
00026 #define __NFC_DRIVERS_H__
00027 
00028 #include <nfc/nfc-types.h>
00029 
00030 #ifdef HAVE_PCSC_LITE
00031   #include "drivers/acr122.h"
00032 #endif /* HAVE_PCSC_LITE */
00033 
00034 #ifdef HAVE_LIBUSB
00035   #include "drivers/pn53x_usb.h"
00036   #include "drivers/pn531_usb.h"
00037   #include "drivers/pn533_usb.h"
00038 #endif /* HAVE_LIBUSB */
00039 
00040 #include "drivers/arygon.h"
00041 #include "drivers/pn532_uart.h"
00042 
00043 #define DRIVERS_MAX_DEVICES         16
00044 #define MAX_FRAME_LEN       264
00045 
00046 const static struct driver_callbacks drivers_callbacks_list[] = {
00047 //  Driver Name             Pick Device             List Devices              Connect              Transceive                Disconnect
00048 #ifdef HAVE_PCSC_LITE
00049   { ACR122_DRIVER_NAME,     acr122_pick_device,     acr122_list_devices,      acr122_connect,      acr122_transceive,        acr122_disconnect       },
00050 #endif /* HAVE_PCSC_LITE */
00051 #ifdef HAVE_LIBUSB
00052   { PN531_USB_DRIVER_NAME,  pn531_usb_pick_device, pn531_usb_list_devices,    pn531_usb_connect,   pn53x_usb_transceive,     pn53x_usb_disconnect        },
00053   { PN533_USB_DRIVER_NAME,  pn533_usb_pick_device, pn533_usb_list_devices,    pn533_usb_connect,   pn53x_usb_transceive,     pn53x_usb_disconnect        },
00054 #endif /* HAVE_LIBUSB */
00055   { PN532_UART_DRIVER_NAME, pn532_uart_pick_device, pn532_uart_list_devices,  pn532_uart_connect,  pn532_uart_transceive,    pn532_uart_disconnect   },
00056   { ARYGON_DRIVER_NAME,     NULL,                   NULL,                     arygon_connect,      arygon_transceive,        arygon_disconnect       }
00057 };
00058 
00059 #endif // __NFC_DRIVERS_H__
00060