From d0138d78d8c9f1f89ebcd50e8ebd0a92a4ed9794 Mon Sep 17 00:00:00 2001 From: kkloesener Date: Tue, 3 Nov 2020 22:11:30 +0100 Subject: [PATCH] testst --- MFRC522_I2C.cpp | 5 ++--- MFRC522_I2C.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/MFRC522_I2C.cpp b/MFRC522_I2C.cpp index 8bf2cf9..cda1f85 100644 --- a/MFRC522_I2C.cpp +++ b/MFRC522_I2C.cpp @@ -20,11 +20,10 @@ */ MFRC522::MFRC522( byte chipAddress, byte resetPowerDownPin, ///< Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low) - TwoWire TwoWireInstance - ) { + TwoWire * TwoWireInstance + ) : _TwoWireInstance(TwoWireInstance) { _chipAddress = chipAddress; _resetPowerDownPin = resetPowerDownPin; - _TwoWireInstance = TwoWireInstance; } // End constructor diff --git a/MFRC522_I2C.h b/MFRC522_I2C.h index 1b720a6..b9c15f6 100644 --- a/MFRC522_I2C.h +++ b/MFRC522_I2C.h @@ -321,7 +321,7 @@ public: ///////////////////////////////////////////////////////////////////////////////////// // Functions for setting up the Arduino ///////////////////////////////////////////////////////////////////////////////////// - MFRC522(byte chipAddress, byte resetPowerDownPin, TwoWire TwoWireInstance); + MFRC522(byte chipAddress, byte resetPowerDownPin, TwoWire & TwoWireInstance = Wire); ///////////////////////////////////////////////////////////////////////////////////// // Basic interface functions for communicating with the MFRC522 @@ -404,7 +404,7 @@ public: private: byte _chipAddress; byte _resetPowerDownPin; // Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low) - TwoWire _TwoWireInstance; // TwoWire Instance + TwoWire & _TwoWireInstance; // TwoWire Instance byte MIFARE_TwoStepHelper(byte command, byte blockAddr, long data); };