Get SPI SS/CS pin automatically

This commit is contained in:
Denis Volpato Martins
2016-08-21 19:52:45 -03:00
parent 4dd8522a40
commit b86a09792d
2 changed files with 18 additions and 0 deletions

View File

@@ -16,6 +16,14 @@
MFRC522::MFRC522() {
} // 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.
* 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)
} // 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.
*/