mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
esp32: move sleep test to esp_system
This commit is contained in:
3
components/esp_system/test/CMakeLists.txt
Normal file
3
components/esp_system/test/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
idf_component_register(SRC_DIRS .
|
||||
PRIV_INCLUDE_DIRS .
|
||||
PRIV_REQUIRES unity test_utils)
|
5
components/esp_system/test/component.mk
Normal file
5
components/esp_system/test/component.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
#Component Makefile
|
||||
#
|
||||
|
||||
COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive
|
@@ -2,7 +2,6 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/param.h>
|
||||
#include "esp_sleep.h"
|
||||
#include "esp32/clk.h"
|
||||
#include "driver/rtc_io.h"
|
||||
#include "esp_rom_uart.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@@ -14,13 +13,22 @@
|
||||
#include "soc/rtc.h" // for wakeup trigger defines
|
||||
#include "soc/rtc_periph.h" // for read rtc registers directly (cause)
|
||||
#include "soc/soc.h" // for direct register read macros
|
||||
#include "esp32/rom/rtc.h"
|
||||
#include "hal/rtc_cntl_ll.h"
|
||||
#include "esp_newlib.h"
|
||||
#include "test_utils.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_rom_sys.h"
|
||||
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/clk.h"
|
||||
#include "esp32/rom/rtc.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "esp32s2/clk.h"
|
||||
#include "esp32s2/rom/rtc.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define ESP_EXT0_WAKEUP_LEVEL_LOW 0
|
||||
#define ESP_EXT0_WAKEUP_LEVEL_HIGH 1
|
||||
|
||||
@@ -127,7 +135,7 @@ TEST_CASE("light sleep stress test with periodic esp_timer", "[deepsleep]")
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS
|
||||
#if defined(CONFIG_ESP_SYSTEM_RTC_EXT_XTAL)
|
||||
#define MAX_SLEEP_TIME_ERROR_US 200
|
||||
#else
|
||||
#define MAX_SLEEP_TIME_ERROR_US 100
|
Reference in New Issue
Block a user