This commit is contained in:
Roger Clark 2017-09-17 18:24:38 +10:00
commit 9b70d118b6
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ void HardWire::setClock(uint32_t frequencyHz)
dev_flags &= ~I2C_FAST_MODE;// clear FAST_MODE bit
break;
}
if (sel_hard->regs->CR1 & I2C_CR1_PE){
i2c_disable(sel_hard);
i2c_master_enable(sel_hard, dev_flags);
}
}
HardWire Wire(1);