mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-06 08:37:29 +02:00
tools: Mass fixing of empty prototypes (for -Wstrict-prototypes)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
static const char TAG[] = "test_psram";
|
||||
|
||||
#ifdef CONFIG_ESP32_SPIRAM_SUPPORT
|
||||
static void test_psram_content()
|
||||
static void test_psram_content(void)
|
||||
{
|
||||
const int test_size = 2048;
|
||||
uint32_t *test_area = heap_caps_malloc(test_size, MALLOC_CAP_SPIRAM);
|
||||
|
||||
@@ -31,7 +31,7 @@ to copy bytes over from one memory location to another. DO NOT USE the i2s routi
|
||||
the point where they happened to do what I want.
|
||||
*/
|
||||
|
||||
static void lcdIfaceInit()
|
||||
static void lcdIfaceInit(void)
|
||||
{
|
||||
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_I2S0_CLK_EN);
|
||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_I2S0_RST);
|
||||
@@ -99,7 +99,7 @@ static void lcdIfaceInit()
|
||||
|
||||
static volatile lldesc_t dmaDesc[2];
|
||||
|
||||
static void finishDma()
|
||||
static void finishDma(void)
|
||||
{
|
||||
//No need to finish if no DMA transfer going on
|
||||
if (!(READ_PERI_REG(I2S_FIFO_CONF_REG(0))&I2S_DSCR_EN)) {
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
#define WITH_PROFILING 1
|
||||
#endif
|
||||
|
||||
extern uint32_t esp_timer_impl_get_overflow_val();
|
||||
extern uint32_t esp_timer_impl_get_overflow_val(void);
|
||||
extern void esp_timer_impl_set_overflow_val(uint32_t overflow_val);
|
||||
|
||||
static uint32_t s_old_overflow_val;
|
||||
|
||||
static void setup_overflow()
|
||||
static void setup_overflow(void)
|
||||
{
|
||||
s_old_overflow_val = esp_timer_impl_get_overflow_val();
|
||||
/* Overflow every 0.1 sec.
|
||||
@@ -31,7 +31,7 @@ static void setup_overflow()
|
||||
esp_timer_impl_set_overflow_val(8000000);
|
||||
}
|
||||
|
||||
static void teardown_overflow()
|
||||
static void teardown_overflow(void)
|
||||
{
|
||||
esp_timer_impl_set_overflow_val(s_old_overflow_val);
|
||||
}
|
||||
@@ -409,7 +409,7 @@ TEST_CASE("esp_timer_get_time call takes less than 1us", "[esp_timer]")
|
||||
TEST_PERFORMANCE_LESS_THAN(ESP_TIMER_GET_TIME_PER_CALL, "%dns", ns_per_call);
|
||||
}
|
||||
|
||||
static int64_t IRAM_ATTR __attribute__((noinline)) get_clock_diff()
|
||||
static int64_t IRAM_ATTR __attribute__((noinline)) get_clock_diff(void)
|
||||
{
|
||||
uint64_t hs_time = esp_timer_get_time();
|
||||
uint64_t ref_time = ref_clock_get();
|
||||
|
||||
@@ -144,7 +144,7 @@ void int_timer_handler(void *arg) {
|
||||
int_timer_ctr++;
|
||||
}
|
||||
|
||||
void local_timer_test()
|
||||
void local_timer_test(void)
|
||||
{
|
||||
intr_handle_t ih;
|
||||
esp_err_t r;
|
||||
|
||||
@@ -58,7 +58,7 @@ TEST_CASE("Can switch frequency using esp_pm_configure", "[pm]")
|
||||
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
|
||||
static void light_sleep_enable()
|
||||
static void light_sleep_enable(void)
|
||||
{
|
||||
const esp_pm_config_esp32_t pm_config = {
|
||||
.max_cpu_freq = rtc_clk_cpu_freq_get(),
|
||||
@@ -68,7 +68,7 @@ static void light_sleep_enable()
|
||||
ESP_ERROR_CHECK( esp_pm_configure(&pm_config) );
|
||||
}
|
||||
|
||||
static void light_sleep_disable()
|
||||
static void light_sleep_disable(void)
|
||||
{
|
||||
const esp_pm_config_esp32_t pm_config = {
|
||||
.max_cpu_freq = rtc_clk_cpu_freq_get(),
|
||||
|
||||
@@ -24,7 +24,7 @@ static RTC_FAST_ATTR uint32_t s_rtc_force_fast_val;
|
||||
static RTC_SLOW_ATTR uint32_t s_rtc_force_slow_val;
|
||||
|
||||
|
||||
static void setup_values()
|
||||
static void setup_values(void)
|
||||
{
|
||||
s_noinit_val = CHECK_VALUE;
|
||||
s_rtc_noinit_val = CHECK_VALUE;
|
||||
@@ -44,14 +44,14 @@ TEST_CASE("reset reason ESP_RST_POWERON", "[reset][ignore]")
|
||||
TEST_ASSERT_EQUAL(ESP_RST_POWERON, esp_reset_reason());
|
||||
}
|
||||
|
||||
static void do_deep_sleep()
|
||||
static void do_deep_sleep(void)
|
||||
{
|
||||
setup_values();
|
||||
esp_sleep_enable_timer_wakeup(10000);
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
static void check_reset_reason_deep_sleep()
|
||||
static void check_reset_reason_deep_sleep(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason());
|
||||
|
||||
@@ -67,19 +67,19 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_DEEPSLEEP", "[reset_reason][rese
|
||||
do_deep_sleep,
|
||||
check_reset_reason_deep_sleep);
|
||||
|
||||
static void do_exception()
|
||||
static void do_exception(void)
|
||||
{
|
||||
setup_values();
|
||||
*(int*) (0x40000001) = 0;
|
||||
}
|
||||
|
||||
static void do_abort()
|
||||
static void do_abort(void)
|
||||
{
|
||||
setup_values();
|
||||
abort();
|
||||
}
|
||||
|
||||
static void check_reset_reason_panic()
|
||||
static void check_reset_reason_panic(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_PANIC, esp_reset_reason());
|
||||
|
||||
@@ -100,14 +100,14 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_PANIC after abort", "[reset_reas
|
||||
do_abort,
|
||||
check_reset_reason_panic);
|
||||
|
||||
static void do_restart()
|
||||
static void do_restart(void)
|
||||
{
|
||||
setup_values();
|
||||
esp_restart();
|
||||
}
|
||||
|
||||
#if portNUM_PROCESSORS > 1
|
||||
static void do_restart_from_app_cpu()
|
||||
static void do_restart_from_app_cpu(void)
|
||||
{
|
||||
setup_values();
|
||||
xTaskCreatePinnedToCore((TaskFunction_t) &do_restart, "restart", 2048, NULL, 5, NULL, 1);
|
||||
@@ -115,7 +115,7 @@ static void do_restart_from_app_cpu()
|
||||
}
|
||||
#endif
|
||||
|
||||
static void check_reset_reason_sw()
|
||||
static void check_reset_reason_sw(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_SW, esp_reset_reason());
|
||||
|
||||
@@ -139,21 +139,21 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_SW after restart from APP CPU",
|
||||
#endif
|
||||
|
||||
|
||||
static void do_int_wdt()
|
||||
static void do_int_wdt(void)
|
||||
{
|
||||
setup_values();
|
||||
portENTER_CRITICAL_NESTED();
|
||||
while(1);
|
||||
}
|
||||
|
||||
static void do_int_wdt_hw()
|
||||
static void do_int_wdt_hw(void)
|
||||
{
|
||||
setup_values();
|
||||
XTOS_SET_INTLEVEL(XCHAL_NMILEVEL);
|
||||
while(1);
|
||||
}
|
||||
|
||||
static void check_reset_reason_int_wdt()
|
||||
static void check_reset_reason_int_wdt(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_INT_WDT, esp_reset_reason());
|
||||
TEST_ASSERT_EQUAL_HEX32(CHECK_VALUE, s_rtc_noinit_val);
|
||||
@@ -169,7 +169,7 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_INT_WDT after interrupt watchdog
|
||||
do_int_wdt_hw,
|
||||
check_reset_reason_int_wdt);
|
||||
|
||||
static void do_task_wdt()
|
||||
static void do_task_wdt(void)
|
||||
{
|
||||
setup_values();
|
||||
esp_task_wdt_init(1, true);
|
||||
@@ -177,7 +177,7 @@ static void do_task_wdt()
|
||||
while(1);
|
||||
}
|
||||
|
||||
static void check_reset_reason_task_wdt()
|
||||
static void check_reset_reason_task_wdt(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_TASK_WDT, esp_reset_reason());
|
||||
|
||||
@@ -195,7 +195,7 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_TASK_WDT after task watchdog",
|
||||
do_task_wdt,
|
||||
check_reset_reason_task_wdt);
|
||||
|
||||
static void do_rtc_wdt()
|
||||
static void do_rtc_wdt(void)
|
||||
{
|
||||
setup_values();
|
||||
WRITE_PERI_REG(RTC_CNTL_WDTWPROTECT_REG, RTC_CNTL_WDT_WKEY_VALUE);
|
||||
@@ -206,7 +206,7 @@ static void do_rtc_wdt()
|
||||
while(1);
|
||||
}
|
||||
|
||||
static void check_reset_reason_any_wdt()
|
||||
static void check_reset_reason_any_wdt(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_WDT, esp_reset_reason());
|
||||
TEST_ASSERT_EQUAL_HEX32(CHECK_VALUE, s_rtc_noinit_val);
|
||||
@@ -218,14 +218,14 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_WDT after RTC watchdog",
|
||||
check_reset_reason_any_wdt);
|
||||
|
||||
|
||||
static void do_brownout()
|
||||
static void do_brownout(void)
|
||||
{
|
||||
setup_values();
|
||||
printf("Manual test: lower the supply voltage to cause brownout\n");
|
||||
vTaskSuspend(NULL);
|
||||
}
|
||||
|
||||
static void check_reset_reason_brownout()
|
||||
static void check_reset_reason_brownout(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_BROWNOUT, esp_reset_reason());
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void deep_sleep_task(void *arg)
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
static void do_deep_sleep_from_app_cpu()
|
||||
static void do_deep_sleep_from_app_cpu(void)
|
||||
{
|
||||
xTaskCreatePinnedToCore(&deep_sleep_task, "ds", 2048, NULL, 5, NULL, 1);
|
||||
|
||||
@@ -204,20 +204,20 @@ TEST_CASE("enter deep sleep on APP CPU and wake up using timer", "[deepsleep][re
|
||||
}
|
||||
#endif
|
||||
|
||||
static void do_deep_sleep()
|
||||
static void do_deep_sleep(void)
|
||||
{
|
||||
esp_sleep_enable_timer_wakeup(100000);
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
static void check_sleep_reset_and_sleep()
|
||||
static void check_sleep_reset_and_sleep(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason());
|
||||
esp_sleep_enable_timer_wakeup(100000);
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
static void check_sleep_reset()
|
||||
static void check_sleep_reset(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason());
|
||||
}
|
||||
@@ -228,12 +228,12 @@ TEST_CASE_MULTIPLE_STAGES("enter deep sleep more than once", "[deepsleep][reset=
|
||||
check_sleep_reset_and_sleep,
|
||||
check_sleep_reset);
|
||||
|
||||
static void do_abort()
|
||||
static void do_abort(void)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
static void check_abort_reset_and_sleep()
|
||||
static void check_abort_reset_and_sleep(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_PANIC, esp_reset_reason());
|
||||
esp_sleep_enable_timer_wakeup(100000);
|
||||
@@ -247,20 +247,20 @@ TEST_CASE_MULTIPLE_STAGES("enter deep sleep after abort", "[deepsleep][reset=abo
|
||||
|
||||
static RTC_DATA_ATTR uint32_t s_wake_stub_var;
|
||||
|
||||
static RTC_IRAM_ATTR void wake_stub()
|
||||
static RTC_IRAM_ATTR void wake_stub(void)
|
||||
{
|
||||
esp_default_wake_deep_sleep();
|
||||
s_wake_stub_var = (uint32_t) &wake_stub;
|
||||
}
|
||||
|
||||
static void prepare_wake_stub()
|
||||
static void prepare_wake_stub(void)
|
||||
{
|
||||
esp_set_deep_sleep_wake_stub(&wake_stub);
|
||||
esp_sleep_enable_timer_wakeup(100000);
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
static void check_wake_stub()
|
||||
static void check_wake_stub(void)
|
||||
{
|
||||
TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason());
|
||||
TEST_ASSERT_EQUAL_HEX32((uint32_t) &wake_stub, s_wake_stub_var);
|
||||
@@ -336,7 +336,7 @@ static float get_time_ms(void)
|
||||
return fabs(dt);
|
||||
}
|
||||
|
||||
static uint32_t get_cause()
|
||||
static uint32_t get_cause(void)
|
||||
{
|
||||
uint32_t wakeup_cause = REG_GET_FIELD(RTC_CNTL_WAKEUP_STATE_REG, \
|
||||
RTC_CNTL_WAKEUP_CAUSE);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#if CONFIG_COMPILER_STACK_CHECK
|
||||
|
||||
static void recur_and_smash()
|
||||
static void recur_and_smash(void)
|
||||
{
|
||||
static int cnt;
|
||||
volatile uint8_t buf[50];
|
||||
|
||||
Reference in New Issue
Block a user