Class MFRC522DriverI2C

Inheritance Relationships

Base Type

Class Documentation

class MFRC522DriverI2C : 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 MFRC522 chip. The interface is described in the datasheet section 8.1.4.

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 MFRC522 chip. The interface is described in the datasheet section 8.1.4.

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 MFRC522 chip. The interface is described in the datasheet section 8.1.4.

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 MFRC522 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 MFRC522DriverI2C(const byte slaveAdr = 0x28, TwoWire &wire = Wire)

Protected Attributes

const byte _slaveAdr
TwoWire &_wire