Skip to content

Commit e5533ad

Browse files
committed
Fix typos and mistakes in comments / docs
1 parent f0a91e4 commit e5533ad

File tree

4 files changed

+44
-30
lines changed

4 files changed

+44
-30
lines changed

src/sfeTk/sfeTkError.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3232
* General Concept
3333
* A SparkFun Toolkit error system. The goal is to keep this simple.
3434
*
35-
* This mimics a vareity of systems, using an int type for error codes,
35+
* This mimics a variety of systems, using an int type for error codes,
3636
* where:
3737
* 0 = okay
3838
* -1 = general failure

src/sfeTk/sfeTkIBus.h

+9-10
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class sfeTkIBus
8888
public:
8989
/**--------------------------------------------------------------------------
9090
* @brief Write a single byte to the device*
91-
* @param data Data to write.*
91+
* @param data Data to write.
9292
*
9393
* @retval sfeTkError_t - kSTkErrOk on successful execution.
9494
*
@@ -120,9 +120,9 @@ class sfeTkIBus
120120
/**--------------------------------------------------------------------------
121121
* @brief Writes a number of bytes starting at the given register's address.
122122
*
123-
* @param devAddr The device's address/pin
124-
* param devReg The device's register's address.
125-
* @param data Data to write.
123+
* @param devReg The device's register's address.
124+
* @param data Data to write.
125+
* @param length - length of data
126126
*
127127
* @retval sfeTkError_t kSTkErrOk on successful execution
128128
*
@@ -132,9 +132,9 @@ class sfeTkIBus
132132
/**--------------------------------------------------------------------------
133133
* @brief Writes a number of bytes starting at the given register's 16-bit address.
134134
*
135-
* @param devAddr The device's 16-bit address/pin
136-
* param devReg The device's register's address.
137-
* @param data Data to write.
135+
* @param devReg The device's register's address.
136+
* @param data Data to write.
137+
* @param length - length of data
138138
*
139139
* @retval sfeTkError_t kSTkErrOk on successful execution
140140
*
@@ -145,7 +145,7 @@ class sfeTkIBus
145145
* @brief Read a single byte from the given register
146146
*
147147
* @param devReg The device's register's address.
148-
* @param data Data to read.
148+
* @param data Data to read.
149149
*
150150
* @retval sfeTkError_t - kSTkErrOk on successful execution.
151151
*
@@ -165,8 +165,7 @@ class sfeTkIBus
165165
/**--------------------------------------------------------------------------
166166
* @brief Reads a block of data from the given register.
167167
*
168-
* @param devAddr The device's I2C address.
169-
* @param devReg The device's register's address.
168+
* @param reg The device's register's address.
170169
* @param data Data to write.
171170
* @param numBytes - length of data
172171
* @param[out] readBytes - number of bytes read

src/sfeTkArdI2C.h

+12-8
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,16 @@ class sfeTkArdI2C : public sfeTkII2C
8484

8585
/**
8686
@brief - address version of the init method
87+
88+
@param addr The address of the device
8789
*/
8890
sfeTkError_t init(uint8_t addr);
8991

9092
/**
9193
@brief Method sets up the required I2C settings.
9294
9395
@param wirePort Port for I2C communication.
96+
@param addr The address of the device
9497
@param bInit This flag tracks whether the bus has been initialized.
9598
9699
@retval kSTkErrOk on successful execution.
@@ -145,6 +148,7 @@ class sfeTkArdI2C : public sfeTkII2C
145148
146149
@param devReg The device's register's address.
147150
@param data Data to write.
151+
@param length - length of data
148152
149153
@retval kStkErrOk on success
150154
*/
@@ -153,9 +157,9 @@ class sfeTkArdI2C : public sfeTkII2C
153157
/**
154158
@brief Writes a number of bytes starting at the given register's 16-bit address.
155159
156-
@param devAddr The device's 16-bit address/pin
157-
param devReg The device's register's address.
160+
@param devReg The device's register's address - 16 bit.
158161
@param data Data to write.
162+
@param length - length of data
159163
160164
@retval sfeTkError_t kSTkErrOk on successful execution
161165
@@ -168,7 +172,7 @@ class sfeTkArdI2C : public sfeTkII2C
168172
@note sfeTkIBus interface method
169173
170174
@param devReg The device's register's address.
171-
@param data Data to read.
175+
@param[out] data Data to read.
172176
173177
@retval kStkErrOk on success
174178
*/
@@ -180,7 +184,7 @@ class sfeTkArdI2C : public sfeTkII2C
180184
@note sfeTkIBus interface method
181185
182186
@param devReg The device's register's address.
183-
@param data Data to read.
187+
@param[out] data Data to read.
184188
185189
@retval kSTkErrOk on success
186190
*/
@@ -193,8 +197,8 @@ class sfeTkArdI2C : public sfeTkII2C
193197
@note This method is virtual to allow it to be overridden to support a device that requires a unique impl
194198
195199
@param devReg The device's register's address.
196-
@param data Data being read.
197-
@param numBytes Number of bytes to read.
200+
@param[out] data Data buffer to read into
201+
@param numBytes Number of bytes to read/length of data buffer
198202
@param[out] readBytes - Number of bytes read
199203
200204
@@ -206,8 +210,8 @@ class sfeTkArdI2C : public sfeTkII2C
206210
@brief Reads a block of data from the given 16-bit register address.
207211
208212
@param reg The device's 16 bit register's address.
209-
@param data Data to write.
210-
@param numBytes - length of data
213+
@param data Data buffer to read into
214+
@param numBytes - Number of bytes to read/length of data buffer
211215
@param[out] readBytes - number of bytes read
212216
213217
@retval int returns kSTkErrOk on success, or kSTkErrFail code

src/sfeTkArdSPI.h

+22-11
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class sfeTkArdSPI : public sfeTkISPI
5454
/**
5555
@brief Copy constructor for Arduino SPI bus object of the toolkit
5656
57-
@param spiPort Port for SPI communication.
58-
@param busSPISettings Settings for speed, endianness, and spi mode of the SPI bus.
57+
@param rhs source of the copy operation
5958
*/
6059
sfeTkArdSPI(sfeTkArdSPI const &rhs) : sfeTkISPI(), _spiPort{rhs._spiPort}, _sfeSPISettings{rhs._sfeSPISettings}
6160
{
@@ -78,19 +77,29 @@ class sfeTkArdSPI : public sfeTkISPI
7877
@brief Method sets up the required SPI settings.
7978
@note This function provides a default SPI Port.
8079
81-
@param bInit This flag tracks whether the bus has been initialized.
80+
@param bInit Init the device - default is false.
8281
8382
@retval sfeTkError_t - kSTkErrOk on success
8483
*/
8584
sfeTkError_t init(bool bInit = false);
8685

86+
/**
87+
@brief Method sets up the required SPI settings.
88+
@note This function provides a default SPI Port.
89+
90+
@param csPin The CS Pin for the device
91+
@param bInit Init the device - default is false.
92+
93+
@retval sfeTkError_t - kSTkErrOk on success
94+
*/
8795
sfeTkError_t init(uint8_t csPin, bool bInit = false);
8896

8997
/**
9098
@brief Method sets up the required SPI settings.
9199
92100
@param spiPort Port for SPI communication.
93101
@param busSPISettings Settings for speed, endianness, and spi mode of the SPI bus.
102+
@param csPin The CS Pin for the device
94103
@param bInit This flag tracks whether the bus has been initialized.
95104
96105
@retval sfeTkError_t - kSTkErrOk on success
@@ -132,6 +141,7 @@ class sfeTkArdSPI : public sfeTkISPI
132141
133142
@param devReg The device's register's address.
134143
@param data Data to write.
144+
@param length - length of data
135145
136146
@retval sfeTkError_t - kSTkErrOk on success
137147
*/
@@ -143,6 +153,7 @@ class sfeTkArdSPI : public sfeTkISPI
143153
144154
@param devReg The device's register's address.
145155
@param data Data to write.
156+
@param length - length of data
146157
147158
@retval sfeTkError_t - kSTkErrOk on success
148159
*/
@@ -152,7 +163,7 @@ class sfeTkArdSPI : public sfeTkISPI
152163
@brief Read a single byte from the given register
153164
154165
@param devReg The device's register's address.
155-
@param data Data to read.
166+
@param[out] data Data to read.
156167
157168
@retval sfeTkError_t - kSTkErrOk on success
158169
*/
@@ -162,7 +173,7 @@ class sfeTkArdSPI : public sfeTkISPI
162173
@brief read a single word to the given register
163174
164175
@param devReg The device's register's address.
165-
@param data Data to write.
176+
@param[out] data Data to write.
166177
167178
@retval sfeTkError_t - true on success
168179
*/
@@ -172,9 +183,9 @@ class sfeTkArdSPI : public sfeTkISPI
172183
@brief Reads a block of data from the given register.
173184
@note This method is virtual to allow it to be overridden to support a device that requires a unique impl
174185
175-
@param devReg The device's register's address.
176-
@param data Data to write.
177-
@param numBytes - length of data
186+
@param reg The device's register's address.
187+
@param[out] data Data buffer to read into
188+
@param numBytes - length of data/size of data buffer
178189
@param[out] readBytes - Number of bytes read
179190
180191
@retval sfeTkError_t - true on success
@@ -185,9 +196,9 @@ class sfeTkArdSPI : public sfeTkISPI
185196
@brief Reads a block of data from the given register.
186197
@note This method is virtual to allow it to be overridden to support a device that requires a unique impl
187198
188-
@param devReg The device's register's 16 bit address.
189-
@param data Data to write.
190-
@param numBytes - length of data
199+
@param reg The device's register's 16 bit address.
200+
@param[out] data Data buffer to read into
201+
@param numBytes - Length of data to read/size of data buffer
191202
@param[out] readBytes - Number of bytes read
192203
193204
@retval sfeTkError_t - true on success

0 commit comments

Comments
 (0)