This commit is contained in:
kkloesener
2020-11-03 22:11:30 +01:00
parent 95862a4e20
commit d0138d78d8
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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);
};