19
19
@brief I2C constructor
20
20
*/
21
21
/* **********************************************************************/
22
- I2cModel::I2cModel ()
23
- {
22
+ I2cModel::I2cModel () {
24
23
memset (&_msg_i2c_bus_scan, 0 , sizeof (_msg_i2c_bus_scan));
25
24
memset (&_msg_i2c_bus_scanned, 0 , sizeof (_msg_i2c_bus_scanned));
26
25
memset (&_msg_i2c_device_add_replace, 0 , sizeof (_msg_i2c_device_add_replace));
27
- memset (&_msg_i2c_device_added_replaced, 0 , sizeof (_msg_i2c_device_added_replaced));
26
+ memset (&_msg_i2c_device_added_replaced, 0 ,
27
+ sizeof (_msg_i2c_device_added_replaced));
28
28
memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
29
29
memset (&_msg_i2c_device_removed, 0 , sizeof (_msg_i2c_device_removed));
30
30
memset (&_msg_i2c_device_event, 0 , sizeof (_msg_i2c_device_event));
@@ -40,7 +40,8 @@ I2cModel::~I2cModel() {
40
40
memset (&_msg_i2c_bus_scan, 0 , sizeof (_msg_i2c_bus_scan));
41
41
memset (&_msg_i2c_bus_scanned, 0 , sizeof (_msg_i2c_bus_scanned));
42
42
memset (&_msg_i2c_device_add_replace, 0 , sizeof (_msg_i2c_device_add_replace));
43
- memset (&_msg_i2c_device_added_replaced, 0 , sizeof (_msg_i2c_device_added_replaced));
43
+ memset (&_msg_i2c_device_added_replaced, 0 ,
44
+ sizeof (_msg_i2c_device_added_replaced));
44
45
memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
45
46
memset (&_msg_i2c_device_removed, 0 , sizeof (_msg_i2c_device_removed));
46
47
memset (&_msg_i2c_device_event, 0 , sizeof (_msg_i2c_device_event));
@@ -143,8 +144,10 @@ bool I2cModel::DecodeI2cDeviceRemove(pb_istream_t *stream) {
143
144
WS_DEBUG_PRINTLN (" [i2c] Set _msg_i2c_device_remove..." );
144
145
memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
145
146
bool is_success = false ;
146
- is_success = pb_decode (stream, wippersnapper_i2c_I2cDeviceRemove_fields, &_msg_i2c_device_remove);
147
- WS_DEBUG_PRINT (" is_success: " ); WS_DEBUG_PRINTLN (is_success);
147
+ is_success = pb_decode (stream, wippersnapper_i2c_I2cDeviceRemove_fields,
148
+ &_msg_i2c_device_remove);
149
+ WS_DEBUG_PRINT (" is_success: " );
150
+ WS_DEBUG_PRINTLN (is_success);
148
151
return is_success;
149
152
}
150
153
@@ -288,7 +291,8 @@ bool I2cModel::encodeMsgI2cDeviceAddedorReplaced(
288
291
size_t sz_msg;
289
292
290
293
// Fill I2cDeviceAddedOrReplaced message
291
- memset (&_msg_i2c_device_added_replaced, 0 , sizeof (_msg_i2c_device_added_replaced));
294
+ memset (&_msg_i2c_device_added_replaced, 0 ,
295
+ sizeof (_msg_i2c_device_added_replaced));
292
296
_msg_i2c_device_added_replaced.has_i2c_device_description = true ;
293
297
_msg_i2c_device_added_replaced.i2c_device_description = device_descriptor;
294
298
_msg_i2c_device_added_replaced.i2c_bus_status = bus_status;
0 commit comments