Skip to content

Commit f57f1b1

Browse files
Raffael Rostagnosylvioalves
authored andcommitted
soc: esp32c2: Add i2c support
Add pinctrl config and HAL files for i2c support. Signed-off-by: Raffael Rostagno <[email protected]>
1 parent 1d454ec commit f57f1b1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

zephyr/esp32c2/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ if(CONFIG_SOC_SERIES_ESP32C2)
294294
../../components/hal/uart_hal_iram.c
295295
)
296296

297+
zephyr_sources_ifdef(
298+
CONFIG_I2C_ESP32
299+
../../components/hal/i2c_hal_iram.c
300+
../../components/hal/i2c_hal.c
301+
)
302+
297303
zephyr_sources_ifdef(
298304
CONFIG_PWM_LED_ESP32
299305
../../components/hal/ledc_hal_iram.c

zephyr/port/pincfgs/esp32c2.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,13 @@ ledc:
8989
ch5:
9090
sigo: ledc_ls_sig_out5
9191
gpio: [[0, 10], [18, 20]]
92+
93+
i2c0:
94+
sda:
95+
sigi: i2cext0_sda_in
96+
sigo: i2cext0_sda_out
97+
gpio: [[0, 10], [18, 20]]
98+
scl:
99+
sigi: i2cext0_scl_in
100+
sigo: i2cext0_scl_out
101+
gpio: [[0, 10], [18, 20]]

0 commit comments

Comments
 (0)