freertos: deprecate XT_CLOCK_FREQ

- freertos: add deprecated definition for XT_CLOCK_FREQ
- flash_ops: don't use XT_CLOCK_FREQ
- unity: don't use XT_CLOCK_FREQ
- hw_random: don't use XT_CLOCK_FREQ
- core_dump: don't use XT_CLOCK_FREQ
- app_trace: don't use XT_CLOCK_FREQ
- xtensa_init: init xt_tick_divisor
This commit is contained in:
Ivan Grokhotkov
2017-09-22 23:09:16 +08:00
parent df3c857a30
commit bfeecd2b56
9 changed files with 44 additions and 33 deletions
@@ -8,6 +8,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "esp_clk.h"
#include "soc/cpu.h"
#include "esp_heap_caps.h"
#include "test_utils.h"
@@ -150,7 +151,7 @@ static void unity_run_single_test_by_index_parse(const char* filter, int index_m
unity_run_single_test_by_index(test_index - 1);
uint32_t end;
RSR(CCOUNT, end);
uint32_t ms = (end - start) / (XT_CLOCK_FREQ / 1000);
uint32_t ms = (end - start) / (esp_clk_cpu_freq() / 1000);
printf("Test ran in %dms\n", ms);
}
}