From 1cfe5a1e46cdfdcf5710f69a75053bf9b734d71d Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Fri, 10 Feb 2023 18:22:35 +0000 Subject: [PATCH] Update I2CManager_STM32.h Fix some merge errors. --- I2CManager_STM32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/I2CManager_STM32.h b/I2CManager_STM32.h index d7ea665..79a3726 100644 --- a/I2CManager_STM32.h +++ b/I2CManager_STM32.h @@ -230,7 +230,7 @@ void I2CManagerClass::I2C_sendStart() { s->CR1 |= I2C_CR1_START; // Generate START // Send address with write flag (0) or'd in s->DR = (deviceAddress << 1) | 0; // send the address - while (!(s->SR1 && (1<SR1 && I2C_SR1_ADDR)); // wait for ADDR bit to set temp = s->SR1 | s->SR2; // read SR1 and SR2 to clear the ADDR bit } } @@ -270,7 +270,7 @@ void I2CManagerClass::I2C_handleInterrupt() { // Bus error completionStatus = I2C_STATUS_BUS_ERROR; state = I2C_STATE_COMPLETED; - } else if (s->SR1 && (1<SR1 && I2C_SR1_TXE) { // Master write completed if (s->SR1 && (1<<10)) { // Nacked, send stop.