-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create PN532_SPI instance. #149
Comments
Hello, I have happened to solve this issue a while ago. It was happening because newer arduino rules deprecated a syntax declaration used in SPI include file of that library, if memory serves me well. Sorry for now I am not able to post my solution, only this hint to go toward solution. I rember though that the solution was changing few lines of code regarding that deprecated syntax |
Same issue here with SPI/HSU or whatever, the linker fail on the sample file although the object files are included.
|
Adding -DNFC_INTERFACE_I2C / -DNFC_INTERFACE_SPI to compiler.cpreprocessor.flags.esp32s3= in platform.txt fix the issue (Yes i have "#define NFC_INTERFACE_I2C" at start of my code). |
@reganissu Im having the exactly same problem, have you remembered the solution? |
Ok, I have found the workaround I have done and that made everything work for me. I am not totally sure it is on topic for your issue, but I am posting the solution below and you can judge for yourself. In the PN532_SPI folder, in PN532_SPI.cpp file, in the void PN532_SPI::begin() function in the first 30 lines of code, you have to make the following mod, since SetDataMode and SetBitOrder have been deprecated a long ago (by arduino SPI library I think - not sure): // SPISettings(2000000, LSBFIRST, SPI_MODE0); |
The issue is that The #define in the ".ino" file seems out of scope : A workaround is to manually edit the compiler args by adding |
Hello,I just tested this issue and found that adding #include <PN532_SPI.cpp> allows it to run normally. |
This issue has been fixed and will be closed soon. If you still have any doubts, please reopen one. |
Hello!
I'm have this code:
But it not works. Compilator throws this error:
How to fix it?
The text was updated successfully, but these errors were encountered: