summaryrefslogtreecommitdiff
path: root/ports/esp32/mpconfigport.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/mpconfigport.h')
-rw-r--r--ports/esp32/mpconfigport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h
index cc10fd0b7..e47b333c7 100644
--- a/ports/esp32/mpconfigport.h
+++ b/ports/esp32/mpconfigport.h
@@ -139,11 +139,13 @@
#define MICROPY_PY_MACHINE_PWM_INCLUDEFILE "ports/esp32/machine_pwm.c"
#define MICROPY_PY_MACHINE_I2C (1)
#define MICROPY_PY_MACHINE_I2C_TRANSFER_WRITE1 (1)
+#ifndef MICROPY_PY_MACHINE_I2C_TARGET
// I2C target hardware is limited on ESP32 (eg read event comes after the read) so we only support newer SoCs.
// ESP32C6 does not have enough flash space so also disable it on that SoC.
#define MICROPY_PY_MACHINE_I2C_TARGET (SOC_I2C_SUPPORT_SLAVE && !CONFIG_IDF_TARGET_ESP32 && !CONFIG_IDF_TARGET_ESP32C6)
#define MICROPY_PY_MACHINE_I2C_TARGET_INCLUDEFILE "ports/esp32/machine_i2c_target.c"
#define MICROPY_PY_MACHINE_I2C_TARGET_MAX (2)
+#endif
#define MICROPY_PY_MACHINE_SOFTI2C (1)
#define MICROPY_PY_MACHINE_SPI (1)
#define MICROPY_PY_MACHINE_SOFTSPI (1)