1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 15:46:14 +01:00

Update I2CManager_SAMD.h

Fix compile errors following other changes
This commit is contained in:
Neil McKechnie 2023-02-10 18:21:06 +00:00
parent f5b5809ba5
commit 98697427a3

View File

@ -38,7 +38,7 @@
***************************************************************************/ ***************************************************************************/
#if defined(I2C_USE_INTERRUPTS) && defined(ARDUINO_SAMD_ZERO) #if defined(I2C_USE_INTERRUPTS) && defined(ARDUINO_SAMD_ZERO)
void SERCOM3_Handler() { void SERCOM3_Handler() {
I2CManagerClass::handleInterrupt(); I2CManager.handleInterrupt();
} }
#endif #endif
@ -166,11 +166,11 @@ void I2CManagerClass::I2C_sendStart() {
if (operation == OPERATION_READ || ((operation == OPERATION_REQUEST) && !bytesToSend)) if (operation == OPERATION_READ || ((operation == OPERATION_REQUEST) && !bytesToSend))
{ {
// Send start and address with read flag (1) or'd in // Send start and address with read flag (1) or'd in
s->I2CM.ADDR.bit.ADDR = (currentRequest->i2cAddress << 1) | 1; s->I2CM.ADDR.bit.ADDR = (deviceAddress << 1) | 1;
} }
else { else {
// Send start and address with write flag (0) or'd in // Send start and address with write flag (0) or'd in
s->I2CM.ADDR.bit.ADDR = (currentRequest->i2cAddress << 1ul) | 0; s->I2CM.ADDR.bit.ADDR = (deviceAddress << 1ul) | 0;
} }
} }