Skip to content

Cannot create PN532_SPI instance. #149

Closed
@aloyen07

Description

@aloyen07

Hello!
I'm have this code:

#define NFC_INTERFACE_SPI

#include <SPI.h>
#include <PN532_SPI.h>
#include "PN532.h"

PN532_SPI pn532spi(SPI, 6);
PN532 nfc(pn532spi);

void setup() {
  nfc.begin();
}

void loop() {

}

But it not works. Compilator throws this error:

/tmp/ccq7arst.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_eee.ino.cpp.o.2087':
<artificial>:(.text.startup+0x62): undefined reference to `PN532_SPI::PN532_SPI(SPIClass&, unsigned char)'
collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

How to fix it?

Metadata

Metadata

Assignees

Labels

PN532Label for PN532UAYUnassigned yet

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions