diff --git a/src/defines.h b/src/defines.h index 122ac25..4641be7 100644 --- a/src/defines.h +++ b/src/defines.h @@ -29,6 +29,7 @@ typedef void* dev_spec; // Device connection specification #define INVALID_DEVICE_INFO 0 #define MAX_FRAME_LEN 264 #define DEVICE_NAME_LENGTH 256 +#define MAX_DEVICES 16 // Useful macros #define MIN(a,b) (((a) < (b)) ? (a) : (b)) diff --git a/src/dev_acr122.c b/src/dev_acr122.c index 80b8363..22b6eb1 100644 --- a/src/dev_acr122.c +++ b/src/dev_acr122.c @@ -43,7 +43,6 @@ along with this program. If not, see . #define ACR122_WRAP_LEN 5 #define ACR122_COMMAND_LEN 266 #define ACR122_RESPONSE_LEN 268 -#define MAX_READERS 16 typedef struct { SCARDCONTEXT hCtx; @@ -61,8 +60,8 @@ static byte abtLed[9] = { 0xFF,0x00,0x40,0x05,0x04,0x00,0x00,0x00,0x00 }; dev_info* dev_acr122_connect(const uint32_t uiIndex) { - char* pacReaders[MAX_READERS]; - char acList[256+64*MAX_READERS]; + char* pacReaders[MAX_DEVICES]; + char acList[256+64*MAX_DEVICES]; size_t ulListLen = sizeof(acList); uint32_t uiPos; uint32_t uiReaderCount; @@ -92,7 +91,7 @@ dev_info* dev_acr122_connect(const uint32_t uiIndex) for (uiPos=0; uiPos. #include "types.h" #include "dev_acr122.h" #include "dev_pn531.h" +#include "dev_arygon.h" const static struct dev_callbacks dev_callbacks_list[] = { // Driver Name Connect Transceive Disconect { "ACR122", dev_acr122_connect, dev_acr122_transceive, dev_acr122_disconnect }, - { "PN531USB", dev_pn531_connect, dev_pn531_transceive, dev_pn531_disconnect } + { "PN531USB", dev_pn531_connect, dev_pn531_transceive, dev_pn531_disconnect }, + { "ARYGON", dev_arygon_connect, dev_arygon_transceive, dev_arygon_disconnect } }; #endif // _LIBNFC_DEVICES_H_