diff options
| author | Dave Marples <dave@marples.net> | 2020-02-27 14:08:39 +0000 |
|---|---|---|
| committer | Dave Marples <dave@marples.net> | 2020-02-27 14:08:39 +0000 |
| commit | 09a3153bf4467b88e46b799a06aa418fc7b579ca (patch) | |
| tree | 54d56fe16e93ad7cb10004275f2b1c727414900a | |
| parent | 1b33cd11fc788bd6b45b54c5629a3b98a92efc2a (diff) | |
Fix I2C clock divider
| -rw-r--r-- | ports/mimxrt10xx/common-hal/busio/I2C.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ports/mimxrt10xx/common-hal/busio/I2C.c b/ports/mimxrt10xx/common-hal/busio/I2C.c index 2de996f9a..0bb7dcc6c 100644 --- a/ports/mimxrt10xx/common-hal/busio/I2C.c +++ b/ports/mimxrt10xx/common-hal/busio/I2C.c @@ -34,10 +34,8 @@ #include "fsl_lpi2c.h" -//TODO +#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (1+CLOCK_GetDiv(kCLOCK_Lpi2cDiv))) -#define I2C_CLOCK_SOURCE_DIVIDER (5U) -#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (I2C_CLOCK_SOURCE_DIVIDER + 1U)) static void config_periph_pin(const mcu_periph_obj_t *periph) { IOMUXC_SetPinMux( |
