PX4IO driver: Fix code style

This commit is contained in:
Lorenz Meier
2015-09-06 12:05:37 +02:00
parent 28bbbd1563
commit 8421d51d5e
4 changed files with 527 additions and 273 deletions
+16 -8
View File
@@ -31,11 +31,11 @@
*
****************************************************************************/
/**
* @file px4io_i2c.cpp
*
* I2C interface for PX4IO
*/
/**
* @file px4io_i2c.cpp
*
* I2C interface for PX4IO
*/
/* XXX trim includes */
#include <px4_config.h>
@@ -94,8 +94,10 @@ PX4IO_I2C::init()
int ret;
ret = I2C::init();
if (ret != OK)
if (ret != OK) {
goto out;
}
/* XXX really should do something more here */
@@ -133,8 +135,11 @@ PX4IO_I2C::write(unsigned address, void *data, unsigned count)
msgv[1].length = 2 * count;
int ret = transfer(msgv, 2);
if (ret == OK)
if (ret == OK) {
ret = count;
}
return ret;
}
@@ -161,8 +166,11 @@ PX4IO_I2C::read(unsigned address, void *data, unsigned count)
msgv[1].length = 2 * count;
int ret = transfer(msgv, 2);
if (ret == OK)
if (ret == OK) {
ret = count;
}
return ret;
}