File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
components/wear_levelling Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1212// limitations under the License.
1313
1414#include " crc32.h"
15- #include " esp32/ rom/crc.h"
15+ #include " rom/crc.h"
1616
1717unsigned int crc32::crc32_le (unsigned int crc, unsigned char const *buf, unsigned int len)
1818{
Original file line number Diff line number Diff line change 22#include <string.h>
33#include "unity.h"
44#include "wear_levelling.h"
5+ #include "esp_system.h"
6+ #include "esp_timer.h"
57#include "test_utils.h"
68#include "freertos/FreeRTOS.h"
7- #include "freertos/portable.h"
9+ // #include "freertos/portable.h"
810#include "freertos/task.h"
911#include "freertos/semphr.h"
1012#ifdef CONFIG_IDF_TARGET_ESP32
1113#include "esp32/clk.h"
14+ #include "soc/cpu.h"
1215#elif defined(CONFIG_IDF_TARGET_ESP32S2BETA )
1316#include "esp32s2beta/clk.h"
14- #endif
1517#include "soc/cpu.h"
18+ #elif CONFIG_IDF_TARGET_ESP8266
19+ #include "esp_clk.h"
20+ #endif
21+
22+ #define xPortGetFreeHeapSize () esp_get_free_heap_size()
23+ #define RSR (_c , _t ) _t = (uint32_t) esp_timer_get_time()
1624
1725TEST_CASE ("wl_unmount doesn't leak memory" , "[wear_levelling]" )
1826{
@@ -101,7 +109,7 @@ static void read_write_task(void* param)
101109 esp_err_t err ;
102110 srand (args -> seed );
103111 for (size_t i = 0 ; i < args -> word_count ; ++ i ) {
104- uint32_t val = rand () ;
112+ uint32_t val = i * 77 ;
105113 if (args -> write ) {
106114 err = wl_write (args -> handle , args -> offset + i * sizeof (val ), & val , sizeof (val ));
107115 if (err != ESP_OK ) {
You can’t perform that action at this time.
0 commit comments