@@ -54,8 +54,7 @@ class sfeTkArdSPI : public sfeTkISPI
54
54
/* *
55
55
@brief Copy constructor for Arduino SPI bus object of the toolkit
56
56
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
59
58
*/
60
59
sfeTkArdSPI (sfeTkArdSPI const &rhs) : sfeTkISPI(), _spiPort{rhs._spiPort }, _sfeSPISettings{rhs._sfeSPISettings }
61
60
{
@@ -78,19 +77,29 @@ class sfeTkArdSPI : public sfeTkISPI
78
77
@brief Method sets up the required SPI settings.
79
78
@note This function provides a default SPI Port.
80
79
81
- @param bInit This flag tracks whether the bus has been initialized .
80
+ @param bInit Init the device - default is false .
82
81
83
82
@retval sfeTkError_t - kSTkErrOk on success
84
83
*/
85
84
sfeTkError_t init (bool bInit = false );
86
85
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
+ */
87
95
sfeTkError_t init (uint8_t csPin, bool bInit = false );
88
96
89
97
/* *
90
98
@brief Method sets up the required SPI settings.
91
99
92
100
@param spiPort Port for SPI communication.
93
101
@param busSPISettings Settings for speed, endianness, and spi mode of the SPI bus.
102
+ @param csPin The CS Pin for the device
94
103
@param bInit This flag tracks whether the bus has been initialized.
95
104
96
105
@retval sfeTkError_t - kSTkErrOk on success
@@ -132,6 +141,7 @@ class sfeTkArdSPI : public sfeTkISPI
132
141
133
142
@param devReg The device's register's address.
134
143
@param data Data to write.
144
+ @param length - length of data
135
145
136
146
@retval sfeTkError_t - kSTkErrOk on success
137
147
*/
@@ -143,6 +153,7 @@ class sfeTkArdSPI : public sfeTkISPI
143
153
144
154
@param devReg The device's register's address.
145
155
@param data Data to write.
156
+ @param length - length of data
146
157
147
158
@retval sfeTkError_t - kSTkErrOk on success
148
159
*/
@@ -152,7 +163,7 @@ class sfeTkArdSPI : public sfeTkISPI
152
163
@brief Read a single byte from the given register
153
164
154
165
@param devReg The device's register's address.
155
- @param data Data to read.
166
+ @param[out] data Data to read.
156
167
157
168
@retval sfeTkError_t - kSTkErrOk on success
158
169
*/
@@ -162,7 +173,7 @@ class sfeTkArdSPI : public sfeTkISPI
162
173
@brief read a single word to the given register
163
174
164
175
@param devReg The device's register's address.
165
- @param data Data to write.
176
+ @param[out] data Data to write.
166
177
167
178
@retval sfeTkError_t - true on success
168
179
*/
@@ -172,9 +183,9 @@ class sfeTkArdSPI : public sfeTkISPI
172
183
@brief Reads a block of data from the given register.
173
184
@note This method is virtual to allow it to be overridden to support a device that requires a unique impl
174
185
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
178
189
@param[out] readBytes - Number of bytes read
179
190
180
191
@retval sfeTkError_t - true on success
@@ -185,9 +196,9 @@ class sfeTkArdSPI : public sfeTkISPI
185
196
@brief Reads a block of data from the given register.
186
197
@note This method is virtual to allow it to be overridden to support a device that requires a unique impl
187
198
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
191
202
@param[out] readBytes - Number of bytes read
192
203
193
204
@retval sfeTkError_t - true on success
0 commit comments