summaryrefslogtreecommitdiff
path: root/ports/esp32/machine_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/machine_i2c.c')
-rwxr-xr-x[-rw-r--r--]ports/esp32/machine_i2c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/esp32/machine_i2c.c b/ports/esp32/machine_i2c.c
index eefdeaaf9..f4cfa5816 100644..100755
--- a/ports/esp32/machine_i2c.c
+++ b/ports/esp32/machine_i2c.c
@@ -32,6 +32,8 @@
#include "driver/i2c.h"
#include "hal/i2c_ll.h"
+#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SOFTI2C
+
#ifndef MICROPY_HW_I2C0_SCL
#define MICROPY_HW_I2C0_SCL (GPIO_NUM_18)
#define MICROPY_HW_I2C0_SDA (GPIO_NUM_19)
@@ -210,3 +212,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
protocol, &machine_hw_i2c_p,
locals_dict, &mp_machine_i2c_locals_dict
);
+
+#endif