M5Unit-RFID 0.0.1 git rev:d8076ed
Loading...
Searching...
No Matches
unit_MFRC522.hpp File Reference

MFRC522 Unit for M5UnitUnified. More...

#include <M5UnitComponent.hpp>
#include <nfc/nfc.hpp>
#include <nfc/a/nfca.hpp>

Go to the source code of this file.

Classes

class  m5::unit::UnitMFRC522
 Radio frequency identification unit. More...
 
struct  m5::unit::UnitMFRC522::config_t
 Settings for begin. More...
 

Namespaces

namespace  m5
 Top level namespace of M5Stack.
 

Enumerations

enum class  m5::unit::mfrc522::Command : uint8_t {
  Idle , Mem , GenerateRandomID , CalcCRC ,
  Transmit , NoCmdChange = 0x07 , Receive , Transceive = 0x0C ,
  MFAuthent = 0x0E , SoftReset
}
 PCD command. More...
 
enum class  m5::unit::mfrc522::ReceiverGain : uint8_t {
  dB18 , dB23 , dB33 = 0x04 , dB38 ,
  dB43 , dB48
}
 The receiver’s signal voltage gain factor. More...
 
enum class  m5::unit::mfrc522::Error : uint8_t {
  OCCUR_COLLISION , UID_NOT_COMPLETED , ARGUMENT = 0x80 , COMMUNICATION ,
  REGISTER , TIMEOUT , MIFARE_NACK , CRC ,
  AUTH , CANNOT_RESOLVE_COLLISION , INTERNAL = 0xFE , UNKNOWN = 0xFF
}
 API error code. More...
 

Variables

constexpr uint16_t m5::unit::mfrc522::MAX_FIFO_DEPTH {64}
 Maximum FIFO depth.
 

Detailed Description

MFRC522 Unit for M5UnitUnified.

Enumeration Type Documentation

◆ Command

enum class m5::unit::mfrc522::Command : uint8_t
strong

PCD command.

Enumerator
Idle 

No action, cancels current command execution.

Mem 

Stores 25 bytes into the internal buffer.

GenerateRandomID 

Generates a 10-byte random ID number.

CalcCRC 

Activates the CRC coprocessor or performs a self test.

Transmit 

Transmits data from the FIFO buffer.

NoCmdChange 

No command change.

Receive 

Activates the receiver circuits.

Transceive 

Transmits data from FIFO buffer to antenna and automatically activates the receiver after transmission

MFAuthent 

Performs the MIFARE standard authentication as a reader.

SoftReset 

Resets the MFRC522.

◆ Error

enum class m5::unit::mfrc522::Error : uint8_t
strong

API error code.

Enumerator
OCCUR_COLLISION 

Collision occurs.

UID_NOT_COMPLETED 

UID is not yet complete.

ARGUMENT 

Error caused by arguments (0x80)

COMMUNICATION 

Error in communication (0x81)

REGISTER 

Error by error register value (0x82)

TIMEOUT 

Timeout occurs (0x83)

MIFARE_NACK 

MIFARE NACK detection (0x84)

CRC 

CRC error (0x85)

AUTH 

Authentication error(0x86)

CANNOT_RESOLVE_COLLISION 

Collision resolution failed (0x87)

INTERNAL 

Internal error.

UNKNOWN 

Misc.

◆ ReceiverGain

enum class m5::unit::mfrc522::ReceiverGain : uint8_t
strong

The receiver’s signal voltage gain factor.

Enumerator
dB18 

18 decibel

dB23 

23 decibel

dB33 

33 decibel

dB38 

38 decibel

dB43 

43 decibel

dB48 

48 decibel