8000 Fix I2C clock divider · adafruit/circuitpython@09a3153 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09a3153

Browse files
committed
Fix I2C clock divider
1 parent 1b33cd1 commit 09a3153

File tree

1 file changed

+1
-3
lines changed
  • ports/mimxrt10xx/common-hal/busio

1 file changed

+1
-3
lines changed

ports/mimxrt10xx/common-hal/busio/I2C.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434

3535
#include "fsl_lpi2c.h"
3636

37-
//TODO
37+
#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (1+CLOCK_GetDiv(kCLOCK_Lpi2cDiv)))
3838

39-
#define I2C_CLOCK_SOURCE_DIVIDER (5U)
40-
#define I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (I2C_CLOCK_SOURCE_DIVIDER + 1U))
4139

4240
static void config_periph_pin(const mcu_periph_obj_t *periph) {
4341
IOMUXC_SetPinMux(

0 commit comments

Comments
 (0)
0