esp-hw-support: fix interrupt allocation tests on esp32c2

A part of the test 'Can allocate IRAM int only with an IRAM handler' was to
allocate an intr with the handler in RTC memory which is not supported by esp32c2.
A condition was added to prevent this part of the test to execute on esp32c2 targets.
pull/10546/head
Guillaume Souchere 2022-12-29 08:41:28 +01:00
rodzic 0025915dc4
commit 979525d0d8
1 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -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]")
{
@ -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)
{