Merge pull request #340 from victorpv/patch-4
Correct issue with I2C port speed not changing after begin()
This commit is contained in:
commit
a706616ab5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue