clang-format

This commit is contained in:
rob tillaart 2022-08-08 21:31:17 +02:00
parent 3cc0846d78
commit e238822921
1 changed files with 6 additions and 6 deletions

View File

@ -266,16 +266,16 @@ bool Adafruit_I2CDevice::setSpeed(uint32_t desiredclk) {
// calculate TWBR correctly
if ((F_CPU / 18) < desiredclk) {
#ifdef DEBUG_SERIAL
#ifdef DEBUG_SERIAL
Serial.println(F("I2C.setSpeed too high."));
#endif
#endif
return false;
}
uint32_t atwbr = ((F_CPU / desiredclk) - 16) / 2;
if (atwbr > 16320) {
#ifdef DEBUG_SERIAL
#ifdef DEBUG_SERIAL
Serial.println(F("I2C.setSpeed too low."));
#endif
#endif
return false;
}
@ -288,7 +288,7 @@ bool Adafruit_I2CDevice::setSpeed(uint32_t desiredclk) {
} else if (atwbr <= 4080) {
atwbr /= 16;
TWSR = 0x2;
} else { // if (atwbr <= 16320)
} else { // if (atwbr <= 16320)
atwbr /= 64;
TWSR = 0x3;
}