I2C (minor): add space around operators for readability
This commit is contained in:
parent
a50a181b86
commit
62b83fd34d
|
@ -415,7 +415,7 @@ enum i2c_master_rc i2c_master_read(uint32_t i2c, uint8_t* data, size_t data_size
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
if (data==NULL || data_size==0) { // no data to read
|
if (NULL == data || 0 == data_size) { // no data to read
|
||||||
return I2C_MASTER_RC_NONE;
|
return I2C_MASTER_RC_NONE;
|
||||||
}
|
}
|
||||||
if (1 == data_size) {
|
if (1 == data_size) {
|
||||||
|
@ -468,7 +468,7 @@ enum i2c_master_rc i2c_master_write(uint32_t i2c, const uint8_t* data, size_t da
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
if (data==NULL || data_size==0) { // no data to write
|
if (NULL == data || 0 == data_size) { // no data to write
|
||||||
return I2C_MASTER_RC_NONE;
|
return I2C_MASTER_RC_NONE;
|
||||||
}
|
}
|
||||||
if (!(I2C_SR2(i2c) & I2C_SR2_MSL)) { // I2C device is not master
|
if (!(I2C_SR2(i2c) & I2C_SR2_MSL)) { // I2C device is not master
|
||||||
|
|
Loading…
Reference in New Issue