Skip to content

Commit 0d274a1

Browse files
Raffael Rostagnonashif
authored andcommitted
drivers: uart: esp32c2: Add support
Add UART support to ESP32C2 and ESP8684 Signed-off-by: Raffael Rostagno <[email protected]>
1 parent c1f8948 commit 0d274a1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

drivers/serial/uart_esp32.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#include <esp32s3/rom/ets_sys.h>
2222
#include <esp32s3/rom/gpio.h>
2323
#include <zephyr/dt-bindings/clock/esp32s3_clock.h>
24+
#elif defined(CONFIG_SOC_SERIES_ESP32C2)
25+
#include <esp32c2/rom/ets_sys.h>
26+
#include <esp32c2/rom/gpio.h>
27+
#include <zephyr/dt-bindings/clock/esp32c2_clock.h>
2428
#elif defined(CONFIG_SOC_SERIES_ESP32C3)
2529
#include <esp32c3/rom/ets_sys.h>
2630
#include <esp32c3/rom/gpio.h>
@@ -47,7 +51,9 @@
4751
#include <soc.h>
4852
#include <zephyr/drivers/uart.h>
4953

50-
#if defined(CONFIG_SOC_SERIES_ESP32C3) || defined(CONFIG_SOC_SERIES_ESP32C6)
54+
#if defined(CONFIG_SOC_SERIES_ESP32C2) || \
55+
defined(CONFIG_SOC_SERIES_ESP32C3) || \
56+
defined(CONFIG_SOC_SERIES_ESP32C6)
5157
#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
5258
#else
5359
#include <zephyr/drivers/interrupt_controller/intc_esp32.h>
@@ -61,7 +67,9 @@
6167

6268
LOG_MODULE_REGISTER(uart_esp32, CONFIG_UART_LOG_LEVEL);
6369

64-
#if defined(CONFIG_SOC_SERIES_ESP32C3) || defined(CONFIG_SOC_SERIES_ESP32C6)
70+
#if defined(CONFIG_SOC_SERIES_ESP32C2) || \
71+
defined(CONFIG_SOC_SERIES_ESP32C3) || \
72+
defined(CONFIG_SOC_SERIES_ESP32C6)
6573
#define ISR_HANDLER isr_handler_t
6674
#else
6775
#define ISR_HANDLER intr_handler_t

0 commit comments

Comments
 (0)