@@ -46,7 +46,7 @@ enum class Command : uint8_t {
4646
4747/* !
4848 @enum ReceiverGain
49- @brief The receiver’s signal voltage gain facor
49+ @brief The receiver’s signal voltage gain factor
5050 */
5151enum class ReceiverGain : uint8_t {
5252 dB18, // !< 18 decibel
@@ -64,8 +64,8 @@ enum class ReceiverGain : uint8_t {
6464 @brief API error code
6565 */
6666enum class Error : uint8_t {
67- OCCUR_COLLISION, // !< Ccollision occurs
68- UID_NOT_COLMPLETED, // !< UID is not yet complete
67+ OCCUR_COLLISION, // !< Collision occurs
68+ UID_NOT_COMPLETED, // !< UID is not yet complete
6969 ARGUMENT = 0x80 , // !< Error caused by arguments (0x80)
7070 COMMUNICATION, // !< Error in communication (0x81)
7171 REGISTER, // !< Error by error register value (0x82)
@@ -101,31 +101,46 @@ class UnitMFRC522 : public Component {
101101 bool enable_antenna{true };
102102 // ! The receiver’s signal voltage gain factor
103103 mfrc522::ReceiverGain receiver_gain{mfrc522::ReceiverGain::dB48};
104- // ! Using sotware CRC
104+ // ! Using software CRC
105105 bool software_crc{false };
106106 };
107107
108+ /* !
109+ @brief Constructor
110+ @param addr I2C address
111+ */
108112 explicit UnitMFRC522 (const uint8_t addr = DEFAULT_ADDRESS) : Component(addr)
109113 {
110114 auto ccfg = component_config ();
111115 ccfg.clock = 400 * 1000U ;
112116 component_config (ccfg);
113117 }
118+ /* !
119+ @brief Destructor
120+ */
114121 virtual ~UnitMFRC522 ()
115122 {
116123 }
117124
125+ /* !
126+ @brief Begin the unit
127+ @return True if successful
128+ */
118129 virtual bool begin () override ;
130+ /* !
131+ @brief Update internal state
132+ @param force Force update if true
133+ */
119134 virtual void update (const bool force = false ) override ;
120135
121136 // /@name Settings for begin
122137 // /@{
123- /* ! @brief Gets the configration */
138+ /* ! @brief Gets the configuration */
124139 inline config_t config ()
125140 {
126141 return _cfg;
127142 }
128- // ! @brief Set the configration
143+ // ! @brief Set the configuration
129144 inline void config (const config_t & cfg)
130145 {
131146 _cfg = cfg;
@@ -336,7 +351,7 @@ class UnitMFRC522 : public Component {
336351 @brief Operation for the value block
337352 @param cmd Command
338353 @param block Block address
339- @param arg Arrgument for command if needs
354+ @param arg Argument for command if needs
340355 */
341356 bool mifareClassicValueBlock (const m5::nfc::a::Command cmd, const uint8_t block, const uint32_t arg = 0 );
342357 // /@}
@@ -366,7 +381,7 @@ class UnitMFRC522 : public Component {
366381
367382 bool picc_haltA ();
368383
369- // Read/Wrte
384+ // Read/Write
370385 bool read_block (uint8_t * rbuf, uint8_t & rlen, const uint8_t addr);
371386 bool write_block (const uint8_t block, const uint8_t * buf, const uint8_t len);
372387 bool write_page (const uint8_t page, const uint8_t * buf, const uint8_t len);
0 commit comments