ソースを参照

Erase flash before the first use added.

 Пожалуйста, введите сообщение коммита для ваших изменений. Строки,
Dmitry 7 年 前
コミット
76ee450c3d
1 ファイル変更5 行追加0 行削除
  1. 5 0
      components/fatfs/test/test_fatfs_sdmmc.c

+ 5 - 0
components/fatfs/test/test_fatfs_sdmmc.c

@@ -214,6 +214,11 @@ TEST_CASE("(SD) mount two FAT partitions, SDMMC and WL, at the same time", "[fat
     const char* str_sd = "this is sd\n";
     const char* str_wl = "this is spiflash\n";
 
+    /* Erase flash before the firs use */
+    const esp_partition_t *test_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, "flash_test");
+    esp_partition_erase_range(test_partition, 0, test_partition->size);
+    printf("Partition erased: addr- 0x%08x, size- 0x%08x\n", test_partition->address, test_partition->size);
+
     /* Mount FATFS in SD can WL at the same time. Create a file on each FS */
     wl_handle_t wl_handle = WL_INVALID_HANDLE;
     test_setup();