Skip to content

Commit f28a94e

Browse files
esp32 :Fix i2c
1 parent 39b3536 commit f28a94e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ports/esp32/machine_i2c.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "extmod/modmachine.h"
3131

3232
#include "driver/i2c_master.h"
33+
#include "hal/i2c_ll.h"
3334

3435
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
3536

@@ -56,6 +57,7 @@
5657
#if SOC_I2C_SUPPORT_XTAL
5758
#if CONFIG_XTAL_FREQ > 0
5859
#define I2C_SCLK_FREQ (CONFIG_XTAL_FREQ * 1000000)
60+
#else
5961
#error "I2C uses XTAL but no configured freq"
6062
#endif // CONFIG_XTAL_FREQ
6163
#elif SOC_I2C_SUPPORT_APB

0 commit comments

Comments
 (0)