From 766be1adb68bd53da690660aae1782ce4a508ebc Mon Sep 17 00:00:00 2001 From: REGIOIGER Date: Thu, 26 Dec 2024 16:43:03 -0600 Subject: [PATCH] chore: restore examples --- examples/DetectTags/DetectTags.ino | 7 ++----- examples/DetectingReaders/DetectingReaders.ino | 3 +-- examples/ISO14443-3A_read_block/ISO14443-3A_read_block.ino | 5 +---- .../ISO14443-3A_write_block/ISO14443-3A_write_block.ino | 7 ++----- examples/ISO15693_read_block/ISO15693_read_block.ino | 7 ++----- examples/ISO15693_write_block/ISO15693_write_block.ino | 7 ++----- .../MifareClassic_read_block/MifareClassic_read_block.ino | 5 +---- .../MifareClassic_write_block.ino | 7 ++----- examples/NDEFReadMessage/NDEFReadMessage.ino | 3 +-- examples/NDEFSendMessage/NDEFSendMessage.ino | 3 +-- examples/NDEFSendRawMessage/NDEFSendRawMessage.ino | 3 +-- examples/P2P_Discovery/P2P_Discovery.ino | 5 +---- 12 files changed, 17 insertions(+), 45 deletions(-) diff --git a/examples/DetectTags/DetectTags.ino b/examples/DetectTags/DetectTags.ino index d562365..3821390 100644 --- a/examples/DetectTags/DetectTags.ino +++ b/examples/DetectTags/DetectTags.ino @@ -19,9 +19,8 @@ #define PN7150_VEN (13) #define PN7150_ADDR (0x28) -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); -// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28 +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); +// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 // Function prototypes String getHexRepresentation(const byte* data, const uint32_t numBytes); @@ -35,14 +34,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings is failed!"); while (1) ; diff --git a/examples/DetectingReaders/DetectingReaders.ino b/examples/DetectingReaders/DetectingReaders.ino index 565fa64..8c18469 100644 --- a/examples/DetectingReaders/DetectingReaders.ino +++ b/examples/DetectingReaders/DetectingReaders.ino @@ -18,8 +18,7 @@ #define PN7150_VEN (13) #define PN7150_ADDR (0x28) -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); // Creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 diff --git a/examples/ISO14443-3A_read_block/ISO14443-3A_read_block.ino b/examples/ISO14443-3A_read_block/ISO14443-3A_read_block.ino index 1538127..82960fd 100644 --- a/examples/ISO14443-3A_read_block/ISO14443-3A_read_block.ino +++ b/examples/ISO14443-3A_read_block/ISO14443-3A_read_block.ino @@ -19,8 +19,7 @@ #define BLK_NB_ISO14443_3A (5) // Block to be read it -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); // creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28 void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format @@ -66,14 +65,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings failed!"); while (1) ; diff --git a/examples/ISO14443-3A_write_block/ISO14443-3A_write_block.ino b/examples/ISO14443-3A_write_block/ISO14443-3A_write_block.ino index 365e7bd..44f061f 100644 --- a/examples/ISO14443-3A_write_block/ISO14443-3A_write_block.ino +++ b/examples/ISO14443-3A_write_block/ISO14443-3A_write_block.ino @@ -20,9 +20,8 @@ #define BLK_NB_ISO14443_3A (5) // Block to be read it #define DATA_WRITE_ISO14443_3A 0x11, 0x22, 0x33, 0x44 // Data to write -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); -// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28 +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); +// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format uint32_t szPos; @@ -82,14 +81,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings failed!"); while (1) ; diff --git a/examples/ISO15693_read_block/ISO15693_read_block.ino b/examples/ISO15693_read_block/ISO15693_read_block.ino index fbf03c4..97d1df1 100644 --- a/examples/ISO15693_read_block/ISO15693_read_block.ino +++ b/examples/ISO15693_read_block/ISO15693_read_block.ino @@ -19,9 +19,8 @@ #define BLK_NB_ISO15693 (8) // Block to be read it -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); -// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28 +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); +// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format uint32_t szPos; @@ -67,14 +66,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings is failed!"); while (1) ; diff --git a/examples/ISO15693_write_block/ISO15693_write_block.ino b/examples/ISO15693_write_block/ISO15693_write_block.ino index 6ced70d..e5d928c 100644 --- a/examples/ISO15693_write_block/ISO15693_write_block.ino +++ b/examples/ISO15693_write_block/ISO15693_write_block.ino @@ -20,9 +20,8 @@ #define BLK_NB_ISO15693 (8) // Block to write #define DATA_WRITE_ISO15693 0x11, 0x22, 0x33, 0x44 // Data to write -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); -// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28 +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); +// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 void setup() { Serial.begin(9600); @@ -32,14 +31,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings is failed!"); while (1) ; diff --git a/examples/MifareClassic_read_block/MifareClassic_read_block.ino b/examples/MifareClassic_read_block/MifareClassic_read_block.ino index a07773c..8020157 100644 --- a/examples/MifareClassic_read_block/MifareClassic_read_block.ino +++ b/examples/MifareClassic_read_block/MifareClassic_read_block.ino @@ -20,8 +20,7 @@ #define BLK_NB_MFC 4 // Block tat wants to be read #define KEY_MFC 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF // Default Mifare Classic key -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); // creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format @@ -74,14 +73,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings is failed!"); while (1) ; diff --git a/examples/MifareClassic_write_block/MifareClassic_write_block.ino b/examples/MifareClassic_write_block/MifareClassic_write_block.ino index 7afc7e5..ebaf7bb 100644 --- a/examples/MifareClassic_write_block/MifareClassic_write_block.ino +++ b/examples/MifareClassic_write_block/MifareClassic_write_block.ino @@ -23,9 +23,8 @@ // Data to be written in the Mifare Classic block #define DATA_WRITE_MFC 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); -// creates a global NFC device interface object, attached to pins 7 (IRQ) and 8 (VEN) and using the default I2C address 0x28 +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); +// creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 void PrintBuf(const byte* data, const uint32_t numBytes) { // Print hex data buffer in format uint32_t szPos; @@ -111,14 +110,12 @@ void setup() { Serial.println("Initializing..."); if (nfc.connectNCI()) { // Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1) ; } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings is failed!"); while (1) ; diff --git a/examples/NDEFReadMessage/NDEFReadMessage.ino b/examples/NDEFReadMessage/NDEFReadMessage.ino index e6758b8..df3e5f9 100644 --- a/examples/NDEFReadMessage/NDEFReadMessage.ino +++ b/examples/NDEFReadMessage/NDEFReadMessage.ino @@ -24,8 +24,7 @@ void displayDeviceInfo(); void displayRecordInfo(NdefRecord record); // Create a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); NdefMessage message; diff --git a/examples/NDEFSendMessage/NDEFSendMessage.ino b/examples/NDEFSendMessage/NDEFSendMessage.ino index fffec77..e39841a 100644 --- a/examples/NDEFSendMessage/NDEFSendMessage.ino +++ b/examples/NDEFSendMessage/NDEFSendMessage.ino @@ -23,8 +23,7 @@ // Function prototypes void messageSentCallback(); -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); // Creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 NdefMessage message; diff --git a/examples/NDEFSendRawMessage/NDEFSendRawMessage.ino b/examples/NDEFSendRawMessage/NDEFSendRawMessage.ino index 11d967c..f874950 100644 --- a/examples/NDEFSendRawMessage/NDEFSendRawMessage.ino +++ b/examples/NDEFSendRawMessage/NDEFSendRawMessage.ino @@ -24,8 +24,7 @@ // Function prototypes void messageSentCallback(); -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); // Creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 NdefMessage message; diff --git a/examples/P2P_Discovery/P2P_Discovery.ino b/examples/P2P_Discovery/P2P_Discovery.ino index 6ab4476..323d247 100644 --- a/examples/P2P_Discovery/P2P_Discovery.ino +++ b/examples/P2P_Discovery/P2P_Discovery.ino @@ -17,8 +17,7 @@ #define PN7150_VEN (13) #define PN7150_ADDR (0x28) -Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7150); -//Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR, PN7160); +Electroniccats_PN7150 nfc(PN7150_IRQ, PN7150_VEN, PN7150_ADDR); // creates a global NFC device interface object, attached to pins 11 (IRQ) and 13 (VEN) and using the default I2C address 0x28 RfIntf_t RfInterface; //Intarface to save data for multiple tags @@ -38,13 +37,11 @@ void setup(){ Serial.println("Initializing..."); if (nfc.connectNCI()) { //Wake up the board - //if (nfc.connectNCI_PN7160()) { // Wake up the board Serial.println("Error while setting up the mode, check connections!"); while (1); } if (nfc.configureSettings()) { - //if (nfc.configureSettings_PN7160()) { Serial.println("The Configure Settings failed!"); while (1); }