1919 @brief I2C constructor
2020*/
2121/* **********************************************************************/
22- I2cModel::I2cModel ()
23- {
22+ I2cModel::I2cModel () {
2423 memset (&_msg_i2c_bus_scan, 0 , sizeof (_msg_i2c_bus_scan));
2524 memset (&_msg_i2c_bus_scanned, 0 , sizeof (_msg_i2c_bus_scanned));
2625 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));
2828 memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
2929 memset (&_msg_i2c_device_removed, 0 , sizeof (_msg_i2c_device_removed));
3030 memset (&_msg_i2c_device_event, 0 , sizeof (_msg_i2c_device_event));
@@ -40,7 +40,8 @@ I2cModel::~I2cModel() {
4040 memset (&_msg_i2c_bus_scan, 0 , sizeof (_msg_i2c_bus_scan));
4141 memset (&_msg_i2c_bus_scanned, 0 , sizeof (_msg_i2c_bus_scanned));
4242 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));
4445 memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
4546 memset (&_msg_i2c_device_removed, 0 , sizeof (_msg_i2c_device_removed));
4647 memset (&_msg_i2c_device_event, 0 , sizeof (_msg_i2c_device_event));
@@ -143,8 +144,10 @@ bool I2cModel::DecodeI2cDeviceRemove(pb_istream_t *stream) {
143144 WS_DEBUG_PRINTLN (" [i2c] Set _msg_i2c_device_remove..." );
144145 memset (&_msg_i2c_device_remove, 0 , sizeof (_msg_i2c_device_remove));
145146 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);
148151 return is_success;
149152}
150153
@@ -288,7 +291,8 @@ bool I2cModel::encodeMsgI2cDeviceAddedorReplaced(
288291 size_t sz_msg;
289292
290293 // 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));
292296 _msg_i2c_device_added_replaced.has_i2c_device_description = true ;
293297 _msg_i2c_device_added_replaced.i2c_device_description = device_descriptor;
294298 _msg_i2c_device_added_replaced.i2c_bus_status = bus_status;
0 commit comments