forgot to set speed

master
Tomek Dubrownik 2012-05-22 21:10:02 +02:00
parent c8b3a0721b
commit 6b0e81d1c6
1 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,7 @@ int nfc_read(char *MifareOut)
int nfc_initialize(void) int nfc_initialize(void)
{ {
/* #ifdef NFC_AUTOPROBE
nfc_device_desc_t *Devices; nfc_device_desc_t *Devices;
size_t NumDevices; size_t NumDevices;
@ -70,13 +70,15 @@ int nfc_initialize(void)
} }
g_NFCDevice = nfc_connect(&Devices[0]); g_NFCDevice = nfc_connect(&Devices[0]);
*/ #else
char pcPort[] = NFC_PORT; char pcPort[] = NFC_PORT;
nfc_device_desc_t dev = { nfc_device_desc_t dev = {
.pcDriver = "PN532_UART", .pcDriver = "PN532_UART",
.uiSpeed = 115200,
}; };
strcpy(dev.acPort, pcPort); strcpy(dev.acPort, pcPort);
g_NFCDevice = nfc_connect(&dev); g_NFCDevice = nfc_connect(&dev);
#endif
if (g_NFCDevice == NULL) if (g_NFCDevice == NULL)
{ {
fprintf(stderr, "Error: Could not connect to NFC device.\n"); fprintf(stderr, "Error: Could not connect to NFC device.\n");