Get SPI SS/CS pin automatically
This commit is contained in:
16
MFRC522.cpp
16
MFRC522.cpp
@@ -16,6 +16,14 @@
|
|||||||
MFRC522::MFRC522() {
|
MFRC522::MFRC522() {
|
||||||
} // End constructor
|
} // 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)
|
||||||
|
): MFRC522(SS, resetPowerDownPin) {
|
||||||
|
} // End constructor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* Prepares the output pins.
|
* Prepares the output pins.
|
||||||
@@ -217,6 +225,14 @@ void MFRC522::PCD_Init() {
|
|||||||
PCD_AntennaOn(); // Enable the antenna driver pins TX1 and TX2 (they were disabled by the reset)
|
PCD_AntennaOn(); // Enable the antenna driver pins TX1 and TX2 (they were disabled by the reset)
|
||||||
} // End PCD_Init()
|
} // 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);
|
||||||
|
} // End PCD_Init()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the MFRC522 chip.
|
* Initializes the MFRC522 chip.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ public:
|
|||||||
// Functions for setting up the Arduino
|
// Functions for setting up the Arduino
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
MFRC522();
|
MFRC522();
|
||||||
|
MFRC522(byte resetPowerDownPin);
|
||||||
MFRC522(byte chipSelectPin, byte resetPowerDownPin);
|
MFRC522(byte chipSelectPin, byte resetPowerDownPin);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -340,6 +341,7 @@ public:
|
|||||||
// Functions for manipulating the MFRC522
|
// Functions for manipulating the MFRC522
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
void PCD_Init();
|
void PCD_Init();
|
||||||
|
void PCD_Init(byte resetPowerDownPin);
|
||||||
void PCD_Init(byte chipSelectPin, byte resetPowerDownPin);
|
void PCD_Init(byte chipSelectPin, byte resetPowerDownPin);
|
||||||
void PCD_Reset();
|
void PCD_Reset();
|
||||||
void PCD_AntennaOn();
|
void PCD_AntennaOn();
|
||||||
|
|||||||
Reference in New Issue
Block a user