Skip to content

Commit 49afc81

Browse files
author
Sergey Pluzhnikov
committed
[stm32] Fix I2C number bug
1 parent 1569459 commit 49afc81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modm/platform/i2c/stm32-extended/i2c_master.cpp.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ MODM_ISR(I2C{{ id }}_EV)
388388
if (isr & I2C_ISR_NACKF)
389389
{
390390
// acknowledge fail
391-
I2C1->ICR = I2C_ICR_NACKCF;
391+
I2C{{ id }}->ICR = I2C_ICR_NACKCF;
392392
DEBUG_STREAM("ACK FAIL");
393393
// may also be ADDRESS_NACK
394394
error = starting.address ? modm::I2cMaster::Error::AddressNack : modm::I2cMaster::Error::DataNack;

0 commit comments

Comments
 (0)