minor typo in comment in WireKinetis.h (800 Mhz I2C bus freq)

DaQue

Well-known member
I was trying to figure out how to go slower and found a typo, either that or the world's fastest I2C bus!

#elif F_BUS == 16000000
if (frequency < 400000) {
port().F = 0x20; // 100 kHz
} else if (frequency < 1000000) {
port().F = 0x07; // 400 kHz
} else {
port().F = 0x00; // 800 MHz
}
port().FLT = 1;

Obviously it should be khz and it doesn't ever need to ever be fixed for functionality.

Any chance of a very slow I2C bus frequency (20khz or slower?) for debugging in a future release?
 
found a typo

Fixed.
https://github.com/PaulStoffregen/Wire/commit/49361a0c41b5a19cc236cc99d623534d63b6166e

Any chance of a very slow I2C bus frequency (20khz or slower?) for debugging in a future release?

I've considered redoing the setClock stuff to work similar to the SPI library, where a long if-else is used when the input is a compile time constant, with fallback to looping code with a table for variable input.

Honestly, it's a very low priority, so unlikely I'll ever get around to it. But if someone wanted to do this and submit a pull request, please structure it similar to the SPI library and I'll merge the change.
 
Back
Top