Skip to content

Commit 5d128a5

Browse files
committed
Fixes doxygen comment,typo
1 parent 2544076 commit 5d128a5

3 files changed

Lines changed: 38 additions & 10 deletions

File tree

src/M5UnitUnifiedRFID.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/*!
2121
@namespace m5
22-
@brief Top level namespace of M5stack
22+
@brief Top level namespace of M5Stack
2323
*/
2424
namespace m5 {
2525

@@ -29,7 +29,9 @@ namespace m5 {
2929
*/
3030
namespace unit {
3131

32-
using UnitRFID = m5::unit::UnitMFRC522;
32+
//! @brief Alias for UnitMFRC522
33+
using UnitRFID = m5::unit::UnitMFRC522;
34+
//! @brief Alias for UnitWS1850S
3335
using UnitRFID2 = m5::unit::UnitWS1850S;
3436

3537
} // namespace unit

src/unit/unit_MFRC522.hpp

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
5151
enum class ReceiverGain : uint8_t {
5252
dB18, //!< 18 decibel
@@ -64,8 +64,8 @@ enum class ReceiverGain : uint8_t {
6464
@brief API error code
6565
*/
6666
enum 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);

src/unit/unit_WS1850S.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@ class UnitWS1850S : public UnitMFRC522 {
2424
M5_UNIT_COMPONENT_HPP_BUILDER(UnitWS1850S, 0x28);
2525

2626
public:
27+
/*!
28+
@brief Constructor
29+
@param addr I2C address
30+
*/
2731
explicit UnitWS1850S(const uint8_t addr = DEFAULT_ADDRESS) : UnitMFRC522(addr)
2832
{
2933
}
34+
/*!
35+
@brief Destructor
36+
*/
3037
virtual ~UnitWS1850S()
3138
{
3239
}
3340

41+
/*!
42+
@brief Begin the unit
43+
@return True if successful
44+
*/
3445
virtual bool begin() override;
3546

3647
protected:

0 commit comments

Comments
 (0)