diff --git a/src/examples/mifaretag.h b/src/examples/mifaretag.h index 741d89f..32fbaf3 100644 --- a/src/examples/mifaretag.h +++ b/src/examples/mifaretag.h @@ -24,8 +24,6 @@ #ifndef _LIBNFC_MIFARE_TAG_H_ #define _LIBNFC_MIFARE_TAG_H_ -#include "nfc-defines.h" - typedef struct { byte_t abtUID[4]; byte_t btBCC; diff --git a/src/examples/mifareultag.h b/src/examples/mifareultag.h index 0e953e8..c3c0159 100644 --- a/src/examples/mifareultag.h +++ b/src/examples/mifareultag.h @@ -24,8 +24,6 @@ #ifndef _LIBNFC_MIFARE_UL_TAG_H_ #define _LIBNFC_MIFARE_UL_TAG_H_ -#include "nfc-defines.h" - typedef struct { byte_t sn0[3]; byte_t btBCC0; diff --git a/src/examples/nfc-anticol.c b/src/examples/nfc-anticol.c index a4e312c..3bec5d8 100644 --- a/src/examples/nfc-anticol.c +++ b/src/examples/nfc-anticol.c @@ -35,6 +35,8 @@ #define SAK_FLAG_ATS_SUPPORTED 0x20 +#define MAX_FRAME_LEN 264 + static byte_t abtRx[MAX_FRAME_LEN]; static size_t szRxBits; static size_t szRxLen; diff --git a/src/examples/nfc-emulate.c b/src/examples/nfc-emulate.c index 8198c31..1781508 100644 --- a/src/examples/nfc-emulate.c +++ b/src/examples/nfc-emulate.c @@ -32,6 +32,8 @@ #include "nfc-messages.h" #include "bitutils.h" +#define MAX_FRAME_LEN 264 + static byte_t abtRecv[MAX_FRAME_LEN]; static size_t szRecvBits; static nfc_device_t* pnd; @@ -87,7 +89,7 @@ int main(int argc, char *argv[]) // Try to open the NFC reader pnd = nfc_connect(NULL); - if (pnd == INVALID_DEVICE_INFO) + if (pnd == NULL) { printf("Error connecting NFC reader\n"); return 1; diff --git a/src/examples/nfc-list.c b/src/examples/nfc-list.c index 023ea58..ec6cfec 100644 --- a/src/examples/nfc-list.c +++ b/src/examples/nfc-list.c @@ -52,7 +52,7 @@ int main(int argc, const char* argv[]) pnd = nfc_connect(&ndd); */ - if (pnd == INVALID_DEVICE_INFO) + if (pnd == NULL) { ERR("Unable to connect to NFC device."); return 1; diff --git a/src/examples/nfc-mfclassic.c b/src/examples/nfc-mfclassic.c index b190bfa..3821c8e 100644 --- a/src/examples/nfc-mfclassic.c +++ b/src/examples/nfc-mfclassic.c @@ -405,7 +405,7 @@ int main(int argc, const char* argv[]) // Try to open the NFC reader pnd = nfc_connect(NULL); - if (pnd == INVALID_DEVICE_INFO) + if (pnd == NULL) { printf("Error connecting NFC reader\n"); return 1; diff --git a/src/examples/nfc-mfultralight.c b/src/examples/nfc-mfultralight.c index 660fc28..a957d35 100644 --- a/src/examples/nfc-mfultralight.c +++ b/src/examples/nfc-mfultralight.c @@ -149,7 +149,7 @@ int main(int argc, const char* argv[]) // Try to open the NFC reader pnd = nfc_connect(NULL); - if (pnd == INVALID_DEVICE_INFO) + if (pnd == NULL) { printf("Error connecting NFC reader\n"); return 1; diff --git a/src/examples/nfc-relay.c b/src/examples/nfc-relay.c index fba1eb0..659e339 100644 --- a/src/examples/nfc-relay.c +++ b/src/examples/nfc-relay.c @@ -31,6 +31,8 @@ #include "nfc-messages.h" #include "bitutils.h" +#define MAX_FRAME_LEN 264 + static byte_t abtReaderRx[MAX_FRAME_LEN]; static byte_t abtReaderRxPar[MAX_FRAME_LEN]; static size_t szReaderRxBits; @@ -70,7 +72,7 @@ int main(int argc,char* argv[]) // Try to open the NFC emulator device pndTag = nfc_connect(NULL); - if (pndTag == INVALID_DEVICE_INFO) + if (pndTag == NULL) { printf("Error connecting NFC emulator device\n"); return 1; @@ -89,8 +91,8 @@ int main(int argc,char* argv[]) printf("[+] Thank you, the emulated tag is initialized\n"); // Try to open the NFC reader - pndReader = INVALID_DEVICE_INFO; - while (pndReader == INVALID_DEVICE_INFO) pndReader = nfc_connect(NULL); + pndReader = NULL; + while (pndReader == NULL) pndReader = nfc_connect(NULL); printf("[+] Configuring NFC reader settings\n"); nfc_configure(pndReader,DCO_HANDLE_CRC,false); nfc_configure(pndReader,DCO_HANDLE_PARITY,false); diff --git a/src/examples/nfcip-initiator.c b/src/examples/nfcip-initiator.c index a1c0cb9..e1bfd11 100644 --- a/src/examples/nfcip-initiator.c +++ b/src/examples/nfcip-initiator.c @@ -25,6 +25,8 @@ #include #include +#define MAX_FRAME_LEN 264 + int main(int argc, const char *argv[]) { nfc_device_t *pnd; diff --git a/src/examples/nfcip-target.c b/src/examples/nfcip-target.c index 0c0bb3a..e684242 100644 --- a/src/examples/nfcip-target.c +++ b/src/examples/nfcip-target.c @@ -24,6 +24,8 @@ #include #include +#define MAX_FRAME_LEN 264 + int main(int argc, const char *argv[]) { byte_t abtRecv[MAX_FRAME_LEN]; diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index e2177e8..1db7046 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -19,7 +19,7 @@ IF(LIBNFC_USB) FIND_PACKAGE(LIBUSB REQUIRED) ADD_DEFINITIONS("-DHAVE_LIBUSB=1") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS_OTHER}") - SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn531" "drivers/pn533") + SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn531_usb" "drivers/pn533_usb") ENDIF(LIBNFC_USB) diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index a53eccf..47e143b 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = buses drivers . # set the include path found by configure INCLUDES= $(all_includes) -nfcinclude_HEADERS = nfc.h nfc-defines.h nfc-types.h buses.h drivers.h nfc-messages.h bitutils.h +nfcinclude_HEADERS = nfc.h nfc-types.h buses.h drivers.h nfc-messages.h bitutils.h nfcincludedir = $(includedir)/nfc lib_LTLIBRARIES = libnfc.la diff --git a/src/lib/buses/uart.h b/src/lib/buses/uart.h index f42b75c..a01213b 100644 --- a/src/lib/buses/uart.h +++ b/src/lib/buses/uart.h @@ -28,7 +28,7 @@ #include #include -#include "nfc-defines.h" + #include "nfc-types.h" // Handle platform specific includes diff --git a/src/lib/drivers.h b/src/lib/drivers.h index 1b78aa0..a455bba 100644 --- a/src/lib/drivers.h +++ b/src/lib/drivers.h @@ -17,33 +17,40 @@ * along with this program. If not, see * * - * @file devices.h + * @file drivers.h * @brief */ #ifndef _LIBNFC_DEVICES_H_ #define _LIBNFC_DEVICES_H_ -#include "nfc-defines.h" + #include "nfc-types.h" + #ifdef HAVE_PCSC_LITE #include "drivers/acr122.h" #endif /* HAVE_PCSC_LITE */ + #ifdef HAVE_LIBUSB - #include "drivers/pn531.h" - #include "drivers/pn533.h" + #include "drivers/pn531_usb.h" + #include "drivers/pn533_usb.h" #endif /* HAVE_LIBUSB */ + #include "drivers/arygon.h" #include "drivers/pn532_uart.h" +#define DRIVERS_MAX_DEVICES 16 +#define INVALID_DEVICE_INFO 0 +#define MAX_FRAME_LEN 264 + const static struct driver_callbacks drivers_callbacks_list[] = { // Driver Name Connect Transceive Disconnect #ifdef HAVE_PCSC_LITE { "ACR122", acr122_connect, acr122_transceive, acr122_disconnect }, #endif /* HAVE_PCSC_LITE */ #ifdef HAVE_LIBUSB - { "PN531USB", pn531_connect, pn531_transceive, pn531_disconnect }, - { "PN533USB", pn533_connect, pn533_transceive, pn533_disconnect }, + { "PN531USB", pn531_usb_connect, pn531_usb_transceive, pn531_usb_disconnect }, + { "PN533USB", pn533_usb_connect, pn533_usb_transceive, pn533_usb_disconnect }, #endif /* HAVE_LIBUSB */ { "PN532_UART", pn532_uart_connect, pn532_uart_transceive, pn532_uart_disconnect }, { "ARYGON", arygon_connect, arygon_transceive, arygon_disconnect } diff --git a/src/lib/drivers/Makefile.am b/src/lib/drivers/Makefile.am index a1c9ba3..10f210c 100644 --- a/src/lib/drivers/Makefile.am +++ b/src/lib/drivers/Makefile.am @@ -15,9 +15,9 @@ if PCSC_LITE_ENABLED endif if LIBUSB_ENABLED - noinst_HEADERS += pn531.h pn533.h + noinst_HEADERS += pn531_usb.h pn533_usb.h libnfcdrivers_la_CFLAGS += @LIBUSB_CFLAGS@ -DHAVE_LIBUSB - libnfcdrivers_la_SOURCES += pn531.c pn533.c + libnfcdrivers_la_SOURCES += pn531_usb.c pn533_usb.c libnfcdrivers_la_LIBADD += @LIBUSB_LIBS@ endif diff --git a/src/lib/drivers/acr122.c b/src/lib/drivers/acr122.c index 145da14..87e4084 100644 --- a/src/lib/drivers/acr122.c +++ b/src/lib/drivers/acr122.c @@ -27,13 +27,17 @@ #include #include #include + +#include "../drivers.h" + +// Bus #include #ifdef __APPLE__ #include #endif -#include "nfc-defines.h" + #include "nfc-messages.h" // WINDOWS: #define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE SCARD_CTL_CODE(3500) @@ -59,8 +63,8 @@ typedef struct { nfc_device_t* acr122_connect(const nfc_device_desc_t* pndd) { - char* pacReaders[MAX_DEVICES]; - char acList[256+64*MAX_DEVICES]; + char* pacReaders[DRIVERS_MAX_DEVICES]; + char acList[256+64*DRIVERS_MAX_DEVICES]; size_t szListLen = sizeof(acList); size_t szPos; uint32_t uiReaderCount; @@ -88,7 +92,7 @@ nfc_device_t* acr122_connect(const nfc_device_desc_t* pndd) for (szPos=0; szPos #include -#include "nfc-defines.h" + #include "nfc-types.h" // Functions used by developer to handle connection to this device diff --git a/src/lib/drivers/arygon.c b/src/lib/drivers/arygon.c index c25f4b7..a87eefc 100644 --- a/src/lib/drivers/arygon.c +++ b/src/lib/drivers/arygon.c @@ -23,9 +23,12 @@ #include "arygon.h" -#include "uart.h" #include "nfc-messages.h" +#include "../drivers.h" +// Bus +#include "uart.h" + #ifdef _WIN32 #define SERIAL_STRING "COM" #define delay_ms( X ) Sleep( X ) @@ -86,7 +89,7 @@ nfc_device_t* arygon_connect(const nfc_device_desc_t* pndd) #else DBG("Trying to find ARYGON device on serial port: %s# at %d bauds.",SERIAL_STRING, SERIAL_DEFAULT_PORT_SPEED); // I have no idea how MAC OS X deals with multiple devices, so a quick workaround - for (uiDevNr=0; uiDevNrpcPort, pndd->uiSpeed); strcpy(acConnect,pndd->pcPort); diff --git a/src/lib/drivers/arygon.h b/src/lib/drivers/arygon.h index e662a81..f4894c1 100644 --- a/src/lib/drivers/arygon.h +++ b/src/lib/drivers/arygon.h @@ -24,7 +24,7 @@ #ifndef _LIBNFC_DEV_ARYGON_H_ #define _LIBNFC_DEV_ARYGON_H_ -#include "nfc-defines.h" + #include "nfc-types.h" // Functions used by developer to handle connection to this device diff --git a/src/lib/drivers/pn531_usb.c b/src/lib/drivers/pn531_usb.c index 833e48b..1b289f1 100644 --- a/src/lib/drivers/pn531_usb.c +++ b/src/lib/drivers/pn531_usb.c @@ -17,22 +17,24 @@ * along with this program. If not, see * * - * @file pn531.c - * @brief + * @file pn531_usb.c + * @brief Driver for PN531 chip using USB */ /* Thanks to d18c7db and Okko for example code */ +#include "pn531_usb.h" #include #include - -#include #include -#include "nfc-defines.h" -#include "pn531.h" +#include "../drivers.h" + +// Bus +#include + #include "nfc-messages.h" #define BUFFER_LENGTH 256 @@ -42,10 +44,10 @@ typedef struct { usb_dev_handle* pudh; uint32_t uiEndPointIn; uint32_t uiEndPointOut; -} dev_spec_pn531; +} dev_spec_pn531_usb; // Find transfer endpoints for bulk transfers -static void get_end_points(struct usb_device *dev, dev_spec_pn531* pdsp) +static void get_end_points(struct usb_device *dev, dev_spec_pn531_usb* pdsp) { uint32_t uiIndex; uint32_t uiEndPoint; @@ -80,7 +82,7 @@ static void get_end_points(struct usb_device *dev, dev_spec_pn531* pdsp) } } -nfc_device_t* pn531_connect(const nfc_device_desc_t* pndd) +nfc_device_t* pn531_usb_connect(const nfc_device_desc_t* pndd) { int idvendor = 0x04CC; int idproduct = 0x0531; @@ -89,8 +91,8 @@ nfc_device_t* pn531_connect(const nfc_device_desc_t* pndd) struct usb_bus *bus; struct usb_device *dev; nfc_device_t* pnd = INVALID_DEVICE_INFO; - dev_spec_pn531* pdsp; - dev_spec_pn531 dsp; + dev_spec_pn531_usb* pdsp; + dev_spec_pn531_usb dsp; uint32_t uiDevIndex; dsp.uiEndPointIn = 0; @@ -145,7 +147,7 @@ nfc_device_t* pn531_connect(const nfc_device_desc_t* pndd) return INVALID_DEVICE_INFO; } // Allocate memory for the device info and specification, fill it and return the info - pdsp = malloc(sizeof(dev_spec_pn531)); + pdsp = malloc(sizeof(dev_spec_pn531_usb)); *pdsp = dsp; pnd = malloc(sizeof(nfc_device_t)); strcpy(pnd->acName,"PN531USB"); @@ -162,22 +164,22 @@ nfc_device_t* pn531_connect(const nfc_device_desc_t* pndd) return pnd; } -void pn531_disconnect(nfc_device_t* pnd) +void pn531_usb_disconnect(nfc_device_t* pnd) { - dev_spec_pn531* pdsp = (dev_spec_pn531*)pnd->ds; + dev_spec_pn531_usb* pdsp = (dev_spec_pn531_usb*)pnd->ds; usb_release_interface(pdsp->pudh,0); usb_close(pdsp->pudh); free(pnd->ds); free(pnd); } -bool pn531_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen) +bool pn531_usb_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen) { size_t uiPos = 0; int ret = 0; byte_t abtTx[BUFFER_LENGTH] = { 0x00, 0x00, 0xff }; // Every packet must start with "00 00 ff" byte_t abtRx[BUFFER_LENGTH]; - dev_spec_pn531* pdsp = (dev_spec_pn531*)ds; + dev_spec_pn531_usb* pdsp = (dev_spec_pn531_usb*)ds; // Packet length = data length (len) + checksum (1) + end of stream marker (1) abtTx[3] = szTxLen; diff --git a/src/lib/drivers/pn531_usb.h b/src/lib/drivers/pn531_usb.h index 34dbe36..356fc2a 100644 --- a/src/lib/drivers/pn531_usb.h +++ b/src/lib/drivers/pn531_usb.h @@ -17,7 +17,7 @@ * along with this program. If not, see * * - * @file pn531.h + * @file pn531_usb.h * @brief */ @@ -27,15 +27,15 @@ #include #include -#include "nfc-defines.h" + #include "nfc-types.h" // Functions used by developer to handle connection to this device -nfc_device_t* pn531_connect(const nfc_device_desc_t* pndd); -void pn531_disconnect(nfc_device_t* pnd); +nfc_device_t* pn531_usb_connect(const nfc_device_desc_t* pndd); +void pn531_usb_disconnect(nfc_device_t* pnd); // Callback function used by libnfc to transmit commands to the PN53X chip -bool pn531_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen); +bool pn531_usb_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen); #endif // _LIBNFC_DEV_PN531_H_ diff --git a/src/lib/drivers/pn532_uart.c b/src/lib/drivers/pn532_uart.c index e0f1876..b045a5c 100644 --- a/src/lib/drivers/pn532_uart.c +++ b/src/lib/drivers/pn532_uart.c @@ -23,9 +23,13 @@ #include "pn532_uart.h" -#include "uart.h" #include "nfc-messages.h" +#include "../drivers.h" + +// Bus +#include "uart.h" + #ifdef _WIN32 #define SERIAL_STRING "COM" #define delay_ms( X ) Sleep( X ) @@ -61,7 +65,7 @@ nfc_device_t* pn532_uart_connect(const nfc_device_desc_t* pndd) #else DBG("Trying to find ARYGON device on serial port: %s# at %d bauds.",SERIAL_STRING, SERIAL_DEFAULT_PORT_SPEED); // I have no idea how MAC OS X deals with multiple devices, so a quick workaround - for (uiDevNr=0; uiDevNrpcPort, pndd->uiSpeed); strcpy(acConnect,pndd->pcPort); diff --git a/src/lib/drivers/pn532_uart.h b/src/lib/drivers/pn532_uart.h index a8e4069..ec105ab 100644 --- a/src/lib/drivers/pn532_uart.h +++ b/src/lib/drivers/pn532_uart.h @@ -24,7 +24,7 @@ #ifndef _LIBNFC_DEV_PN532_UART_H_ #define _LIBNFC_DEV_PN532_UART_H_ -#include "nfc-defines.h" + #include "nfc-types.h" // Functions used by developer to handle connection to this device diff --git a/src/lib/drivers/pn533_usb.c b/src/lib/drivers/pn533_usb.c index 5cf599b..3f7c6ac 100644 --- a/src/lib/drivers/pn533_usb.c +++ b/src/lib/drivers/pn533_usb.c @@ -17,20 +17,23 @@ * along with this program. If not, see * * - * @file pn533.c - * @brief + * @file pn533_usb.c + * @brief Driver for PN533 chip using USB */ /* Thanks to d18c7db and Okko for example code */ -#include "pn533.h" +#include "pn533_usb.h" -#include #include #include -#include "nfc-defines.h" +#include "../drivers.h" + +// Bus +#include + #include "nfc-messages.h" #define BUFFER_LENGTH 256 @@ -40,10 +43,10 @@ typedef struct { usb_dev_handle* pudh; uint32_t uiEndPointIn; uint32_t uiEndPointOut; -} dev_spec_pn533; +} dev_spec_pn533_usb; // Find transfer endpoints for bulk transfers -static void get_end_points(struct usb_device *dev, dev_spec_pn533* pdsp) +static void get_end_points(struct usb_device *dev, dev_spec_pn533_usb* pdsp) { uint32_t uiIndex; uint32_t uiEndPoint; @@ -78,15 +81,15 @@ static void get_end_points(struct usb_device *dev, dev_spec_pn533* pdsp) } } -nfc_device_t* pn533_connect(const nfc_device_desc_t* pndd) +nfc_device_t* pn533_usb_connect(const nfc_device_desc_t* pndd) { int idvendor = 0x04e6; int idproduct = 0x5591; struct usb_bus *bus; struct usb_device *dev; nfc_device_t* pnd = INVALID_DEVICE_INFO; - dev_spec_pn533* pdsp; - dev_spec_pn533 dsp; + dev_spec_pn533_usb* pdsp; + dev_spec_pn533_usb dsp; uint32_t uiDevIndex; dsp.uiEndPointIn = 0; @@ -140,7 +143,7 @@ nfc_device_t* pn533_connect(const nfc_device_desc_t* pndd) return INVALID_DEVICE_INFO; } // Allocate memory for the device info and specification, fill it and return the info - pdsp = malloc(sizeof(dev_spec_pn533)); + pdsp = malloc(sizeof(dev_spec_pn533_usb)); *pdsp = dsp; pnd = malloc(sizeof(nfc_device_t)); strcpy(pnd->acName,"PN533USB"); @@ -157,22 +160,22 @@ nfc_device_t* pn533_connect(const nfc_device_desc_t* pndd) return pnd; } -void pn533_disconnect(nfc_device_t* pnd) +void pn533_usb_disconnect(nfc_device_t* pnd) { - dev_spec_pn533* pdsp = (dev_spec_pn533*)pnd->ds; + dev_spec_pn533_usb* pdsp = (dev_spec_pn533_usb*)pnd->ds; usb_release_interface(pdsp->pudh,0); usb_close(pdsp->pudh); free(pnd->ds); free(pnd); } -bool pn533_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen) +bool pn533_usb_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen) { size_t uiPos = 0; int ret = 0; byte_t abtTx[BUFFER_LENGTH] = { 0x00, 0x00, 0xff }; // Every packet must start with "00 00 ff" byte_t abtRx[BUFFER_LENGTH]; - dev_spec_pn533* pdsp = (dev_spec_pn533*)ds; + dev_spec_pn533_usb* pdsp = (dev_spec_pn533_usb*)ds; // Packet length = data length (len) + checksum (1) + end of stream marker (1) abtTx[3] = szTxLen; diff --git a/src/lib/drivers/pn533_usb.h b/src/lib/drivers/pn533_usb.h index 860768f..cd4e423 100644 --- a/src/lib/drivers/pn533_usb.h +++ b/src/lib/drivers/pn533_usb.h @@ -17,22 +17,22 @@ * along with this program. If not, see * * - * @file pn533.h + * @file pn533_usb.h * @brief */ #ifndef _LIBNFC_DEV_PN533_H_ #define _LIBNFC_DEV_PN533_H_ -#include "nfc-defines.h" + #include "nfc-types.h" // Functions used by developer to handle connection to this device -nfc_device_t* pn533_connect(const nfc_device_desc_t* pndd); -void pn533_disconnect(nfc_device_t* pnd); +nfc_device_t* pn533_usb_connect(const nfc_device_desc_t* pndd); +void pn533_usb_disconnect(nfc_device_t* pnd); // Callback function used by libnfc to transmit commands to the PN53X chip -bool pn533_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen); +bool pn533_usb_transceive(const dev_spec ds, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen); #endif // _LIBNFC_DEV_PN533_H_ diff --git a/src/lib/nfc-defines.h b/src/lib/nfc-defines.h deleted file mode 100644 index 9c6eafd..0000000 --- a/src/lib/nfc-defines.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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 - * - * - * @file nfc-defines.h - * @brief - */ - -#ifndef __NFC_DEFINES_H__ -#define __NFC_DEFINES_H__ - -/* DEBUG flag can also be enabled using ./configure --enable-debug */ -/* #define DEBUG */ - -#define INVALID_DEVICE_INFO 0 -#define MAX_FRAME_LEN 264 -#define MAX_DEVICES 16 - -#endif // _LIBNFC_DEFINES_H_ diff --git a/src/lib/nfc.h b/src/lib/nfc.h index 7c8bb3d..20d9000 100644 --- a/src/lib/nfc.h +++ b/src/lib/nfc.h @@ -29,7 +29,7 @@ #include #include -#include "nfc-defines.h" + #include "nfc-types.h" #ifdef __cplusplus