Skip to content

Commit 7e54886

Browse files
committed
feat(esp32h21): move gpio intr source to gpio_ll.h
1 parent 51ad6cf commit 7e54886

File tree

12 files changed

+23
-7
lines changed

12 files changed

+23
-7
lines changed

components/esp_driver_gpio/src/gpio.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -604,13 +604,7 @@ esp_err_t gpio_isr_register(void (*fn)(void *), void *arg, int intr_alloc_flags,
604604
{
605605
GPIO_CHECK(fn, "GPIO ISR null", ESP_ERR_INVALID_ARG);
606606
gpio_isr_alloc_t p;
607-
#if CONFIG_IDF_TARGET_ESP32P4 //TODO: IDF-7995
608-
p.source = ETS_GPIO_INTR0_SOURCE;
609-
#elif CONFIG_IDF_TARGET_ESP32H21 // TODO: IDF-11611
610-
p.source = ETS_GPIO_INTERRUPT_PRO_SOURCE;
611-
#else
612-
p.source = ETS_GPIO_INTR_SOURCE;
613-
#endif
607+
p.source = GPIO_LL_INTR_SOURCE0;
614608
p.intr_alloc_flags = intr_alloc_flags;
615609
#if SOC_ANA_CMPR_INTR_SHARE_WITH_GPIO
616610
p.intr_alloc_flags |= ESP_INTR_FLAG_SHARED;

components/hal/esp32/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ extern const uint8_t GPIO_PIN_MUX_REG_OFFSET[SOC_GPIO_PIN_COUNT];
4242
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(3))
4343
#define GPIO_LL_SDIO_EXT_INTR_ENA (BIT(4))
4444

45+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
46+
4547
/**
4648
* @brief Get the configuration for an IO
4749
*

components/hal/esp32c2/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ extern "C" {
3333
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
3434
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(1))
3535

36+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
37+
3638
/**
3739
* @brief Get the configuration for an IO
3840
*

components/hal/esp32c3/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ extern "C" {
3535
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
3636
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(1))
3737

38+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
39+
3840
/**
3941
* @brief Enable pull-up on GPIO.
4042
*

components/hal/esp32c5/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ extern "C" {
3737

3838
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
3939

40+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
41+
4042
/**
4143
* @brief Get the configuration for an IO
4244
*

components/hal/esp32c6/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ extern "C" {
3838
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
3939
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(1))
4040

41+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
42+
4143
/**
4244
* @brief Get the configuration for an IO
4345
*

components/hal/esp32c61/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ extern "C" {
3838
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
3939
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(1))
4040

41+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
42+
4143
/**
4244
* @brief Get the configuration for an IO
4345
*

components/hal/esp32h2/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ extern "C" {
3838
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
3939
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(1))
4040

41+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR_SOURCE
42+
4143
/**
4244
* @brief Get the configuration for an IO
4345
*

components/hal/esp32h21/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ extern "C" {
3939
#define GPIO_LL_PRO_CPU_INTR_ENA (BIT(0))
4040
#define GPIO_LL_PRO_CPU_NMI_INTR_ENA (BIT(1))
4141

42+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTERRUPT_PRO_SOURCE
43+
4244
/**
4345
* @brief Get the configuration for an IO
4446
*

components/hal/esp32p4/include/hal/gpio_ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ extern "C" {
4444
#define GPIO_LL_INTR2_ENA (BIT(3))
4545
#define GPIO_LL_INTR3_ENA (BIT(4))
4646

47+
#define GPIO_LL_INTR_SOURCE0 ETS_GPIO_INTR0_SOURCE
48+
4749
/**
4850
* @brief Get the configuration for an IO
4951
*

0 commit comments

Comments
 (0)