@@ -20,13 +20,13 @@ class SensirionI2CDevice : public i2c::I2CDevice {
20
20
* handles crc check used by Sensirion sensors
21
21
* @param data pointer to raw result
22
22
* @param len number of words to read
23
- * @return true if reading succeded
23
+ * @return true if reading succeeded
24
24
*/
25
25
bool read_data (uint16_t *data, uint8_t len);
26
26
27
27
/* * Read 1 data word from i2c device.
28
28
* @param data reference to raw result
29
- * @return true if reading succeded
29
+ * @return true if reading succeeded
30
30
*/
31
31
bool read_data (uint16_t &data) { return this ->read_data (&data, 1 ); }
32
32
@@ -35,17 +35,17 @@ class SensirionI2CDevice : public i2c::I2CDevice {
35
35
* @param i2c register
36
36
* @param data pointer to raw result
37
37
* @param len number of words to read
38
- * @param delay milliseconds to to wait between sending the i2c commmand and reading the result
39
- * @return true if reading succeded
38
+ * @param delay milliseconds to to wait between sending the i2c command and reading the result
39
+ * @return true if reading succeeded
40
40
*/
41
41
bool get_register (uint16_t command, uint16_t *data, uint8_t len, uint8_t delay = 0 ) {
42
42
return get_register_ (command, ADDR_16_BIT, data, len, delay);
43
43
}
44
44
/* * Read 1 data word from 16 bit i2c register.
45
45
* @param i2c register
46
46
* @param data reference to raw result
47
- * @param delay milliseconds to to wait between sending the i2c commmand and reading the result
48
- * @return true if reading succeded
47
+ * @param delay milliseconds to to wait between sending the i2c command and reading the result
48
+ * @return true if reading succeeded
49
49
*/
50
50
bool get_register (uint16_t i2c_register, uint16_t &data, uint8_t delay = 0 ) {
51
51
return this ->get_register_ (i2c_register, ADDR_16_BIT, &data, 1 , delay);
@@ -56,8 +56,8 @@ class SensirionI2CDevice : public i2c::I2CDevice {
56
56
* @param i2c register
57
57
* @param data pointer to raw result
58
58
* @param len number of words to read
59
- * @param delay milliseconds to to wait between sending the i2c commmand and reading the result
60
- * @return true if reading succeded
59
+ * @param delay milliseconds to to wait between sending the i2c command and reading the result
60
+ * @return true if reading succeeded
61
61
*/
62
62
bool get_8bit_register (uint8_t i2c_register, uint16_t *data, uint8_t len, uint8_t delay = 0 ) {
63
63
return get_register_ (i2c_register, ADDR_8_BIT, data, len, delay);
@@ -66,30 +66,30 @@ class SensirionI2CDevice : public i2c::I2CDevice {
66
66
/* * Read 1 data word from 8 bit i2c register.
67
67
* @param i2c register
68
68
* @param data reference to raw result
69
- * @param delay milliseconds to to wait between sending the i2c commmand and reading the result
70
- * @return true if reading succeded
69
+ * @param delay milliseconds to to wait between sending the i2c command and reading the result
70
+ * @return true if reading succeeded
71
71
*/
72
72
bool get_8bit_register (uint8_t i2c_register, uint16_t &data, uint8_t delay = 0 ) {
73
73
return this ->get_register_ (i2c_register, ADDR_8_BIT, &data, 1 , delay);
74
74
}
75
75
76
76
/* * Write a command to the i2c device.
77
77
* @param command i2c command to send
78
- * @return true if reading succeded
78
+ * @return true if reading succeeded
79
79
*/
80
80
template <class T > bool write_command (T i2c_register) { return write_command (i2c_register, nullptr , 0 ); }
81
81
82
82
/* * Write a command and one data word to the i2c device .
83
83
* @param command i2c command to send
84
84
* @param data argument for the i2c command
85
- * @return true if reading succeded
85
+ * @return true if reading succeeded
86
86
*/
87
87
template <class T > bool write_command (T i2c_register, uint16_t data) { return write_command (i2c_register, &data, 1 ); }
88
88
89
89
/* * Write a command with arguments as words
90
90
* @param i2c_register i2c command to send - an be uint8_t or uint16_t
91
91
* @param data vector<uint16> arguments for the i2c command
92
- * @return true if reading succeded
92
+ * @return true if reading succeeded
93
93
*/
94
94
template <class T > bool write_command (T i2c_register, const std::vector<uint16_t > &data) {
95
95
return write_command_ (i2c_register, sizeof (T), data.data (), data.size ());
@@ -99,7 +99,7 @@ class SensirionI2CDevice : public i2c::I2CDevice {
99
99
* @param i2c_register i2c command to send - an be uint8_t or uint16_t
100
100
* @param data arguments for the i2c command
101
101
* @param len number of arguments (words)
102
- * @return true if reading succeded
102
+ * @return true if reading succeeded
103
103
*/
104
104
template <class T > bool write_command (T i2c_register, const uint16_t *data, uint8_t len) {
105
105
// limit to 8 or 16 bit only
@@ -115,7 +115,7 @@ class SensirionI2CDevice : public i2c::I2CDevice {
115
115
* @param command_len either 1 for short 8 bit command or 2 for 16 bit command codes
116
116
* @param data arguments for the i2c command
117
117
* @param data_len number of arguments (words)
118
- * @return true if reading succeded
118
+ * @return true if reading succeeded
119
119
*/
120
120
bool write_command_ (uint16_t command, CommandLen command_len, const uint16_t *data, uint8_t data_len);
121
121
@@ -125,8 +125,8 @@ class SensirionI2CDevice : public i2c::I2CDevice {
125
125
* @param command_len either 1 for short 8 bit command or 2 for 16 bit command codes
126
126
* @param data pointer to raw result
127
127
* @param len number of words to read
128
- * @param delay milliseconds to to wait between sending the i2c commmand and reading the result
129
- * @return true if reading succeded
128
+ * @param delay milliseconds to to wait between sending the i2c command and reading the result
129
+ * @return true if reading succeeded
130
130
*/
131
131
bool get_register_ (uint16_t reg, CommandLen command_len, uint16_t *data, uint8_t len, uint8_t delay);
132
132
0 commit comments