@@ -40,13 +40,13 @@ over Inter-Integrated Circuit (I2C) in Arduino
40
40
class sfeTkArdI2C : public sfeTkII2C
41
41
{
42
42
public:
43
- /* *--------------------------------------------------------------------------
43
+ /* *
44
44
@brief Constructor
45
45
*/
46
46
sfeTkArdI2C (void ) : _i2cPort(nullptr ), _bufferChunkSize{kDefaultBufferChunk }
47
47
{
48
48
}
49
- /* *--------------------------------------------------------------------------
49
+ /* *
50
50
@brief Constructor
51
51
52
52
@param addr The address of the device
@@ -74,20 +74,20 @@ class sfeTkArdI2C : public sfeTkII2C
74
74
return *this ;
75
75
}
76
76
77
- /* *--------------------------------------------------------------------------
77
+ /* *
78
78
@brief Method sets up the required I2C settings.
79
79
@note This function provides a default I2C Port.
80
80
81
81
@retval kSTkErrOk on successful execution.
82
82
*/
83
83
sfeTkError_t init ();
84
84
85
- /* *--------------------------------------------------------------------------
85
+ /* *
86
86
@brief - address version of the init method
87
87
*/
88
88
sfeTkError_t init (uint8_t addr);
89
89
90
- /* *--------------------------------------------------------------------------
90
+ /* *
91
91
@brief Method sets up the required I2C settings.
92
92
93
93
@param wirePort Port for I2C communication.
@@ -97,15 +97,15 @@ class sfeTkArdI2C : public sfeTkII2C
97
97
*/
98
98
sfeTkError_t init (TwoWire &wirePort, uint8_t addr, bool bInit = false );
99
99
100
- /* *--------------------------------------------------------------------------
100
+ /* *
101
101
@brief A simple ping of the device at the given address.
102
102
@note sfeTkIBus interface method
103
103
104
104
@retval kSTkErrOk on success,
105
105
*/
106
106
sfeTkError_t ping ();
107
107
108
- /* *--------------------------------------------------------------------------
108
+ /* *
109
109
@brief Write a single byte to the device
110
110
@note sfeTkIBus interface method
111
111
@@ -115,7 +115,7 @@ class sfeTkArdI2C : public sfeTkII2C
115
115
*/
116
116
sfeTkError_t writeByte (uint8_t data);
117
117
118
- /* *--------------------------------------------------------------------------
118
+ /* *
119
119
@brief Write a single byte to the given register
120
120
@note sfeTkIBus interface method
121
121
@@ -126,7 +126,7 @@ class sfeTkArdI2C : public sfeTkII2C
126
126
*/
127
127
sfeTkError_t writeRegisterByte (uint8_t devReg, uint8_t data);
128
128
129
- /* *--------------------------------------------------------------------------
129
+ /* *
130
130
@brief Write a single word to the given register
131
131
@note sfeTkIBus interface method
132
132
@@ -137,7 +137,7 @@ class sfeTkArdI2C : public sfeTkII2C
137
137
*/
138
138
sfeTkError_t writeRegisterWord (uint8_t devReg, uint16_t data);
139
139
140
- /* *--------------------------------------------------------------------------
140
+ /* *
141
141
@brief Writes a number of bytes starting at the given register's address.
142
142
143
143
@note sfeTkIBus interface method
@@ -150,7 +150,7 @@ class sfeTkArdI2C : public sfeTkII2C
150
150
*/
151
151
sfeTkError_t writeRegisterRegion (uint8_t devReg, const uint8_t *data, size_t length);
152
152
153
- /* *--------------------------------------------------------------------------
153
+ /* *
154
154
@brief Writes a number of bytes starting at the given register's 16-bit address.
155
155
156
156
@param devAddr The device's 16-bit address/pin
@@ -162,7 +162,7 @@ class sfeTkArdI2C : public sfeTkII2C
162
162
*/
163
163
sfeTkError_t writeRegister16Region (uint16_t devReg, const uint8_t *data, size_t length);
164
164
165
- /* *--------------------------------------------------------------------------
165
+ /* *
166
166
@brief Reads a byte of data from the given register.
167
167
168
168
@note sfeTkIBus interface method
@@ -174,7 +174,7 @@ class sfeTkArdI2C : public sfeTkII2C
174
174
*/
175
175
sfeTkError_t readRegisterByte (uint8_t devReg, uint8_t &data);
176
176
177
- /* *--------------------------------------------------------------------------
177
+ /* *
178
178
@brief Reads a word of data from the given register.
179
179
180
180
@note sfeTkIBus interface method
@@ -186,7 +186,7 @@ class sfeTkArdI2C : public sfeTkII2C
186
186
*/
187
187
sfeTkError_t readRegisterWord (uint8_t devReg, uint16_t &data);
188
188
189
- /* *--------------------------------------------------------------------------
189
+ /* *
190
190
@brief Reads a block of data from the given register.
191
191
192
192
@note sfeTkIBus interface method
@@ -202,7 +202,7 @@ class sfeTkArdI2C : public sfeTkII2C
202
202
*/
203
203
sfeTkError_t readRegisterRegion (uint8_t devReg, uint8_t *data, size_t numBytes, size_t &readBytes);
204
204
205
- /* *--------------------------------------------------------------------------
205
+ /* *
206
206
@brief Reads a block of data from the given 16-bit register address.
207
207
208
208
@param reg The device's 16 bit register's address.
@@ -216,7 +216,7 @@ class sfeTkArdI2C : public sfeTkII2C
216
216
sfeTkError_t readRegister16Region (uint16_t reg, uint8_t *data, size_t numBytes, size_t &readBytes);
217
217
218
218
// Buffer size chunk getter/setter
219
- /* *--------------------------------------------------------------------------
219
+ /* *
220
220
@brief set the buffer chunk size
221
221
222
222
@note default size is 32
@@ -230,7 +230,7 @@ class sfeTkArdI2C : public sfeTkII2C
230
230
_bufferChunkSize = theChunk;
231
231
}
232
232
233
- /* *--------------------------------------------------------------------------
233
+ /* *
234
234
@brief set the buffer chunk size
235
235
236
236
@retval The current chunk size
0 commit comments