ci(adc): print adc efuse calib version in test

pull/12384/head
laokaiyao 2023-09-26 12:08:51 +08:00
rodzic c018dc9d77
commit 464bec8ac6
3 zmienionych plików z 14 dodań i 2 usunięć

Wyświetl plik

@ -9,5 +9,5 @@ set(srcs "test_app_main.c"
# In order for the cases defined by `TEST_CASE` to be linked into the final elf, # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
# the component can be registered as WHOLE_ARCHIVE # the component can be registered as WHOLE_ARCHIVE
idf_component_register(SRCS ${srcs} idf_component_register(SRCS ${srcs}
PRIV_REQUIRES driver esp_wifi nvs_flash esp_adc test_utils PRIV_REQUIRES driver esp_wifi nvs_flash esp_adc test_utils efuse
WHOLE_ARCHIVE) WHOLE_ARCHIVE)

Wyświetl plik

@ -7,6 +7,16 @@
#include "unity.h" #include "unity.h"
#include "unity_test_utils.h" #include "unity_test_utils.h"
#include "esp_heap_caps.h" #include "esp_heap_caps.h"
#include "soc/soc_caps.h"
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32S2
#include "esp_efuse_rtc_table.h"
#define esp_efuse_rtc_calib_get_ver() esp_efuse_rtc_table_read_calib_version()
#elif SOC_ADC_CALIBRATION_V1_SUPPORTED
#include "esp_efuse_rtc_calib.h"
#else
#define esp_efuse_rtc_calib_get_ver() -1 // Not support calibration
#endif
#define TEST_MEMORY_LEAK_THRESHOLD (600) #define TEST_MEMORY_LEAK_THRESHOLD (600)
@ -33,5 +43,7 @@ void app_main(void)
printf(" | |/ _ \\/ __| __| / _ \\ | | | | | \n"); printf(" | |/ _ \\/ __| __| / _ \\ | | | | | \n");
printf(" | | __/\\__ \\ |_ / ___ \\| |_| | |___ \n"); printf(" | | __/\\__ \\ |_ / ___ \\| |_| | |___ \n");
printf(" |_|\\___||___/\\__| /_/ \\_\\____/ \\____|\n"); printf(" |_|\\___||___/\\__| /_/ \\_\\____/ \\____|\n");
printf("\nADC eFuse Calibration Version %d\n", esp_efuse_rtc_calib_get_ver());
unity_run_menu(); unity_run_menu();
} }

Wyświetl plik

@ -49,7 +49,7 @@ static inline void analog_cmpr_ll_set_internal_ref_voltage(analog_cmpr_dev_t *hw
*/ */
static inline uint32_t analog_cmpr_ll_get_internal_ref_voltage(analog_cmpr_dev_t *hw) static inline uint32_t analog_cmpr_ll_get_internal_ref_voltage(analog_cmpr_dev_t *hw)
{ {
return hw->pad_comp_config.dref_comp; return hw->pad_comp_config->dref_comp;
} }
/** /**