1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 12:51:24 +01:00

suggested code readability improvement by compiler warning

This commit is contained in:
Harald Barth 2022-01-15 20:21:28 +01:00
parent 1416f83f8c
commit f807339eec

View File

@ -72,7 +72,7 @@ void I2CManagerClass::I2C_sendStart() {
bytesToReceive = currentRequest->readLen;
// If anything to send, initiate write. Otherwise initiate read.
if (operation == OPERATION_READ || (operation == OPERATION_REQUEST & !bytesToSend))
if (operation == OPERATION_READ || ((operation == OPERATION_REQUEST) & !bytesToSend))
TWI0.MADDR = (currentRequest->i2cAddress << 1) | 1;
else
TWI0.MADDR = (currentRequest->i2cAddress << 1) | 0;
@ -157,4 +157,4 @@ ISR(TWI0_TWIM_vect) {
I2CManagerClass::handleInterrupt();
}
#endif
#endif