white space diffs.

pull/637/head
Rohit Grover 2014-11-03 08:56:31 +00:00
parent fa0a82d695
commit fd3b27b327
1 changed files with 32 additions and 32 deletions

View File

@ -100,10 +100,10 @@ void i2c_frequency(i2c_t *obj, int hz) {
I2C_InitTypeDef I2C_InitStructure;
if ((hz != 0) && (hz <= 400000)) {
// wait before init
timeout = LONG_TIMEOUT;
while((I2C_GetFlagStatus(i2c, I2C_FLAG_BUSY)) && (timeout-- != 0));
while ((I2C_GetFlagStatus(i2c, I2C_FLAG_BUSY)) && (timeout-- != 0)) {
}
I2C_DeInit(i2c);
@ -274,7 +274,8 @@ void i2c_reset(i2c_t *obj) {
// wait before reset
timeout = LONG_TIMEOUT;
while((I2C_GetFlagStatus(i2c, I2C_FLAG_BUSY)) && (timeout-- != 0));
while ((I2C_GetFlagStatus(i2c, I2C_FLAG_BUSY)) && (timeout-- != 0)) {
}
if (obj->i2c == I2C_1) {
RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C1, ENABLE);
@ -376,7 +377,6 @@ int i2c_slave_write(i2c_t *obj, const char *data, int length) {
return count;
}
#endif // DEVICE_I2CSLAVE
#endif // DEVICE_I2C