Skip to content

Commit

Permalink
Merge branch 'feature/re-enable-intr-alloc-test-c2' into 'master'
Browse files Browse the repository at this point in the history
esp-hw-support: Re-enable intr_alloc tests on esp32c2 target

Closes IDF-5061

See merge request espressif/esp-idf!21836
  • Loading branch information
SoucheSouche committed Jan 4, 2023
2 parents 61a04e2 + 979525d commit ebbe24a
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,19 @@ TEST_CASE("allocate 2 handlers for a same source and remove the later one", "[in
esp_intr_free(handle1);
}


#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2)
//IDF-5061
static void dummy(void *arg)
{
}
static IRAM_ATTR void dummy_iram(void *arg)
{
}

// RTC not supported on all target (e.g., esp32c2)
#if SOC_RTC_FAST_MEM_SUPPORTED
static RTC_IRAM_ATTR void dummy_rtc(void *arg)
{
}
#endif

TEST_CASE("Can allocate IRAM int only with an IRAM handler", "[intr_alloc]")
{
Expand All @@ -249,15 +250,17 @@ TEST_CASE("Can allocate IRAM int only with an IRAM handler", "[intr_alloc]")
TEST_ESP_OK(err);
err = esp_intr_free(ih);
TEST_ESP_OK(err);

// RTC not supported on all target (e.g., esp32c2)
#if SOC_RTC_FAST_MEM_SUPPORTED
err = esp_intr_alloc(spi_periph_signal[1].irq,
ESP_INTR_FLAG_IRAM, &dummy_rtc, NULL, &ih);
TEST_ESP_OK(err);
err = esp_intr_free(ih);
TEST_ESP_OK(err);
#endif
}

#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2)

#ifndef CONFIG_FREERTOS_UNICORE
void isr_free_task(void *param)
{
Expand Down

0 comments on commit ebbe24a

Please sign in to comment.