Class MFRC522DriverSPI

Inheritance Relationships

Base Type

Class Documentation

class MFRC522DriverSPI : public MFRC522Driver

Public Functions

virtual bool init() override
virtual void PCD_WriteRegister(const PCD_Register reg, const byte value) override

Writes a byte to the specified register in the MFRC522DriverSPI chip. The interface is described in the datasheet section 8.1.2.

Parameters:
  • reg – The register to write to. One of the PCD_Register enums.

  • value – The value to write.

virtual void PCD_WriteRegister(const PCD_Register reg, const byte count, byte *const values) override

Writes a number of bytes to the specified register in the MFRC522DriverSPI chip. The interface is described in the datasheet section 8.1.2.

Parameters:
  • reg – The register to write to. One of the PCD_Register enums.

  • count – The number of bytes to write to the register.

  • values – The values to write. Byte array.

virtual byte PCD_ReadRegister(const PCD_Register reg) override

Reads a byte from the specified register in the MFRC522DriverSPI chip. The interface is described in the datasheet section 8.1.2.

Parameters:

reg – The register to read from. One of the PCD_Register enums.

virtual void PCD_ReadRegister(const PCD_Register reg, const byte count, byte *const values, const byte rxAlign = 0) override

Reads a number of bytes from the specified register in the MFRC522DriverSPI chip. The interface is described in the datasheet section 8.1.2.

Parameters:
  • reg – The register to read from. One of the PCD_Register enums.

  • count – The number of bytes to read.

  • values – Byte array to store the values in.

  • rxAlign – Only bit positions rxAlign..7 in values[0] are updated.

inline MFRC522DriverSPI(MFRC522DriverPin &chipSelectPin, SPIClass &spiClass = SPI, const SPISettings spiSettings = SPISettings(4000000u, MSBFIRST, SPI_MODE0))

Protected Attributes

MFRC522DriverPin &_chipSelectPin
SPIClass &_spiClass
const SPISettings _spiSettings