mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-16 22:19:14 +01:00
suggested code readability improvement by compiler warning
This commit is contained in:
parent
1416f83f8c
commit
f807339eec
@ -72,7 +72,7 @@ void I2CManagerClass::I2C_sendStart() {
|
|||||||
bytesToReceive = currentRequest->readLen;
|
bytesToReceive = currentRequest->readLen;
|
||||||
|
|
||||||
// If anything to send, initiate write. Otherwise initiate read.
|
// 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;
|
TWI0.MADDR = (currentRequest->i2cAddress << 1) | 1;
|
||||||
else
|
else
|
||||||
TWI0.MADDR = (currentRequest->i2cAddress << 1) | 0;
|
TWI0.MADDR = (currentRequest->i2cAddress << 1) | 0;
|
||||||
@ -157,4 +157,4 @@ ISR(TWI0_TWIM_vect) {
|
|||||||
I2CManagerClass::handleInterrupt();
|
I2CManagerClass::handleInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user