remove some constructors
Optional soft reset was added before, this can confuse ppl by default set ss and not set rst pin. To clearify this change is made. Maybe brakes some implmentations.
This commit is contained in:
@@ -10,26 +10,13 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// Functions for setting up the Arduino
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
MFRC522::MFRC522(): MFRC522(SS, UINT8_MAX) { // SS is defined in pins_arduino.h, UINT8_MAX means there is no connection from Arduino to MFRC522's reset and power down input
|
||||
} // End constructor
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Prepares the output pins.
|
||||
*/
|
||||
MFRC522::MFRC522( byte resetPowerDownPin ///< Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low). If there is no connection from the CPU to NRSTPD, set this to UINT8_MAX. In this case, only soft reset will be used in PCD_Init().
|
||||
): MFRC522(SS, resetPowerDownPin) { // SS is defined in pins_arduino.h
|
||||
} // End constructor
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Prepares the output pins.
|
||||
*/
|
||||
MFRC522::MFRC522( byte chipSelectPin, ///< Arduino pin connected to MFRC522's SPI slave select input (Pin 24, NSS, active low)
|
||||
byte resetPowerDownPin ///< Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low). If there is no connection from the CPU to NRSTPD, set this to UINT8_MAX. In this case, only soft reset will be used in PCD_Init().
|
||||
byte resetPowerDownPin ///< Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low). If there is no connection from the CPU to NRSTPD, set this to constant UNUSED_PIN. In this case, only soft reset will be used in PCD_Init().
|
||||
) {
|
||||
_chipSelectPin = chipSelectPin;
|
||||
_resetPowerDownPin = resetPowerDownPin;
|
||||
@@ -198,7 +185,7 @@ void MFRC522::PCD_Init() {
|
||||
digitalWrite(_chipSelectPin, HIGH);
|
||||
|
||||
// If a valid pin number has been set, pull device out of power down / reset state.
|
||||
if (_resetPowerDownPin != UINT8_MAX) {
|
||||
if (_resetPowerDownPin != UNUSED_PIN) {
|
||||
// Set the resetPowerDownPin as digital output, do not reset or power down.
|
||||
pinMode(_resetPowerDownPin, OUTPUT);
|
||||
|
||||
@@ -233,14 +220,6 @@ void MFRC522::PCD_Init() {
|
||||
PCD_AntennaOn(); // Enable the antenna driver pins TX1 and TX2 (they were disabled by the reset)
|
||||
} // End PCD_Init()
|
||||
|
||||
/**
|
||||
* Initializes the MFRC522 chip.
|
||||
*/
|
||||
void MFRC522::PCD_Init( byte resetPowerDownPin ///< Arduino pin connected to MFRC522's reset and power down input (Pin 6, NRSTPD, active low)
|
||||
) {
|
||||
PCD_Init(SS, resetPowerDownPin); // SS is defined in pins_arduino.h
|
||||
} // End PCD_Init()
|
||||
|
||||
/**
|
||||
* Initializes the MFRC522 chip.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user