Open TECH7Fox opened 1 year ago
Hi, I got the same issue on a CubeCell HTCC-AB02. In my case, there was a conflict with the board library, which also use a DEBUG statement in its debug.h, with a IFNDEF DEBUG to avoid redundancy. Using such common names in a library is poor practice and should be fixed ASAP (on both side really).
To solve the issue, you can modify the redundancy checks in PN532_debug.h
Here is what my file looks like:
#ifndef __DEBUG_PN532_H_
#define __DEBUG_PN532_H_
#define DEBUG_532
#include "Arduino.h"
#ifdef DEBUG_532
#define DMSG(args...) Serial.print(args)
#define DMSG_STR(str) Serial.println(str)
#define DMSG_HEX(num) Serial.print(' '); Serial.print((num>>4)&0x0F, HEX); Serial.print(num&0x0F, HEX)
#define DMSG_INT(num) Serial.print(' '); Serial.print(num)
#else
#define DMSG(args...)
#define DMSG_STR(str)
#define DMSG_HEX(num)
#define DMSG_INT(num)
#endif
#endif
I hope it will work for you too. This fix may need to be propagated to other files if there is an update of the library, but should work for now. I should really make a PR to fix this, but don't have time RN (maybe later... if i remember)
As a quick and dirty fix you can comment out
in line 50 of Arduino.h which is located at %localappdata%/Arduino15/packages/esp32/hardware/esp32/2.0.8/cores/esp32/Arduino.h
Using a ESP32 Dev Module. If I uncomment
#define DEBUG
to enable debug I get this:Anyone else got this?