I2C (minor): add space around operators for readability

This commit is contained in:
King Kévin 2019-03-26 18:25:23 +01:00
parent a50a181b86
commit 62b83fd34d
1 changed files with 68 additions and 68 deletions

View File

@ -415,7 +415,7 @@ enum i2c_master_rc i2c_master_read(uint32_t i2c, uint8_t* data, size_t data_size
}
// 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;
}
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
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;
}
if (!(I2C_SR2(i2c) & I2C_SR2_MSL)) { // I2C device is not master