esp_system: sync with C3 changes

Fixes interrupt allocation issue
This commit is contained in:
Marius Vikhammer
2020-12-30 15:33:03 +08:00
committed by Angus Gratton
parent f54e9269f3
commit eed154a583
5 changed files with 17 additions and 10 deletions
+6 -7
View File
@@ -19,6 +19,7 @@
#include "sdkconfig.h"
#include "esp_rom_sys.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3, ESP32S3)
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
@@ -31,8 +32,6 @@
#include "esp32s3/rom/rtc.h"
#endif
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define ESP_EXT0_WAKEUP_LEVEL_LOW 0
#define ESP_EXT0_WAKEUP_LEVEL_HIGH 1
@@ -63,7 +62,7 @@ TEST_CASE("wake up from deep sleep using timer", "[deepsleep][reset=DEEPSLEEP_RE
esp_deep_sleep_start();
}
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3)
TEST_CASE("light sleep followed by deep sleep", "[deepsleep][reset=DEEPSLEEP_RESET]")
{
esp_sleep_enable_timer_wakeup(1000000);
@@ -82,7 +81,7 @@ TEST_CASE("wake up from light sleep using timer", "[deepsleep]")
(tv_stop.tv_usec - tv_start.tv_usec) * 1e-3f;
TEST_ASSERT_INT32_WITHIN(500, 2000, (int) dt);
}
#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3)
static void test_light_sleep(void* arg)
{
@@ -417,7 +416,7 @@ __attribute__((unused)) static uint32_t get_cause(void)
return wakeup_cause;
}
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3)
// This test case verifies deactivation of trigger for wake up sources
TEST_CASE("disable source trigger behavior", "[deepsleep]")
{
@@ -490,7 +489,7 @@ TEST_CASE("disable source trigger behavior", "[deepsleep]")
// Disable ext0 wakeup source, as this might interfere with other tests
ESP_ERROR_CHECK(esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_EXT0));
}
#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3)
static RTC_DATA_ATTR struct timeval start;
static void trigger_deepsleep(void)
@@ -527,4 +526,4 @@ static void check_time_deepsleep(void)
TEST_CASE_MULTIPLE_STAGES("check a time after wakeup from deep sleep", "[deepsleep][reset=DEEPSLEEP_RESET]", trigger_deepsleep, check_time_deepsleep);
#endif // #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#endif // #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3, ESP32S3)