Skip to content

A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol

fix pn532 init for the tembed

Geo90c1d18f15e4
diff --git a/src/Vendors/PN532.cpp b/src/Vendors/PN532.cpp
index 138925cd..483cc212 100644
--- a/src/Vendors/PN532.cpp
+++ b/src/Vendors/PN532.cpp
@@ -28,6 +28,12 @@ PN532::PN532(CONNECTION_TYPE connection_type) {
}
bool PN532::begin(uint8_t sda, uint8_t scl) {
+ #ifdef DEVICE_TEMBEDS3CC1101
+ pinMode(TEMBEDS3PN532_IRQ, OUTPUT);
+ digitalWrite(TEMBEDS3PN532_IRQ, HIGH);
+ delay(100);
+ #endif
+
Wire.begin(sda, scl);
bool i2c_check = true;
diff --git a/src/Vendors/PN532.h b/src/Vendors/PN532.h
index 81e70497..45816c07 100644
--- a/src/Vendors/PN532.h
+++ b/src/Vendors/PN532.h
@@ -12,6 +12,8 @@
#include <Adafruit_PN532.h>
#include <vector>
+#define TEMBEDS3PN532_IRQ 45
+
class PN532 : public RFIDInterface {
public:
enum CONNECTION_TYPE { I2C = 1, I2C_SPI = 2, SPI = 3 };