@@ -26,17 +26,17 @@ namespace mfrc522 {
2626 @brief PCD command
2727*/
2828enum class Command : uint8_t {
29- Idle, // !< no action, cancels current command execution
30- Mem, // !< stores 25 bytes into the internal buffer
31- GenerateRandomID, // !< generates a 10-byte random ID number
32- CalcCRC, // !< activates the CRC coprocessor or performs a self test
33- Transmit, // !< transmits data from the FIFO buffer
34- NoCmdChange = 0x07 , // !< no command change
35- Receive, // !< activates the receiver circuits
36- Transceive = 0x0C , // !< transmits data from FIFO buffer to antenna and automatically activates the receiver after
29+ Idle, // !< No action, cancels current command execution
30+ Mem, // !< Stores 25 bytes into the internal buffer
31+ GenerateRandomID, // !< Generates a 10-byte random ID number
32+ CalcCRC, // !< Activates the CRC coprocessor or performs a self test
33+ Transmit, // !< Transmits data from the FIFO buffer
34+ NoCmdChange = 0x07 , // !< No command change
35+ Receive, // !< Activates the receiver circuits
36+ Transceive = 0x0C , // !< Transmits data from FIFO buffer to antenna and automatically activates the receiver after
3737 // !< transmission
38- MFAuthent = 0x0E , // !< performs the MIFARE standard authentication as a reader
39- SoftReset, // !< performs the MIFARE standard authentication as a reader
38+ MFAuthent = 0x0E , // !< Performs the MIFARE standard authentication as a reader
39+ SoftReset, // !< Resets the MFRC522
4040};
4141
4242/* !
@@ -61,7 +61,7 @@ enum class ReceiverGain : uint8_t {
6161enum class Error : uint8_t {
6262 OCCUR_COLLISION , // !< Ccollision occurs
6363 UID_NOT_COLMPLETED , // !< UID is not yet complete
64- ARGUMENT = 0x80 , // !< Error caused by arguments
64+ ARGUMENT = 0x80 , // !< Error caused by arguments (0x80)
6565 COMMUNICATION , // !< Error in communication (0x81)
6666 REGISTER , // !< Error by error register value (0x82)
6767 TIMEOUT , // !< Timeout occurs (0x83)
@@ -84,6 +84,10 @@ class UnitMFRC522 : public Component {
8484 M5_UNIT_COMPONENT_HPP_BUILDER (UnitMFRC522, 0x28 );
8585
8686public:
87+ /* !
88+ @brief API return value
89+ @note The user can treat it as if it were a bool type
90+ */
8791 using result_t = m5::stl::expected<void , mfrc522::Error>;
8892
8993 /* !
@@ -192,11 +196,16 @@ class UnitMFRC522 : public Component {
192196 bool writeReceiverGain (const mfrc522::ReceiverGain gain);
193197 // /@}
194198
199+ // /@note Timer settings
195200 // /@name TPrescale
196201 // /@{
202+ // ! @brief Read the TPrescale
197203 bool readTPrescale (uint16_t & tprescale);
204+ // ! @brief Read the TPrescale
198205 bool readTPrescale (float & tprescale);
206+ // ! @brief Write the TPrescale
199207 bool writeTPrescale (const uint16_t tprescale);
208+ // ! @brief Write the TPrescale
200209 bool writeTPrescale (const float tprescale);
201210 // /@}
202211
@@ -242,14 +251,16 @@ class UnitMFRC522 : public Component {
242251 @note Device status changes from READY to ACTIVE
243252 @note Device status changes from READY* to ACTIVE*
244253 @note ISO14443-4 processing can be performed on devices in ACTIVE state
254+ @warning Whenever an operation on an activated device is no longer required, it must be deactivated
245255 */
246256 result_t activateDevice (UID & uid);
247257 /* !
248258 @brief Deactivate device
249- @param uid target UID
259+ @param uid Target UID
250260 @return True if successful
251261 @note Send HLTA command and stop crypt1
252262 @note Device status changes from ACTIVE to HALT
263+ @note Device status changes from ACTIVE* to HALT
253264 */
254265 result_t deactivateDevice ();
255266 // /@}
0 commit comments