partition: use esp_partition_munmap instead of spi_flash_munmap

This commit is contained in:
Armando
2022-11-09 20:15:17 +08:00
parent 5bed8fab49
commit aba9f80cd2
9 changed files with 35 additions and 38 deletions
@@ -126,14 +126,14 @@ TEST_CASE("Spiram cache flush on write/read", "[spiram]")
char buf[512];
const void *out;
spi_flash_mmap_handle_t handle;
esp_partition_mmap(part, 0, 512, SPI_FLASH_MMAP_DATA, &out, &handle);
esp_partition_mmap_handle_t handle;
esp_partition_mmap(part, 0, 512, ESP_PARTITION_MMAP_DATA, &out, &handle);
for (int i=0; i<CYCLES; i++) {
esp_partition_write(part, 0, buf, 512);
esp_partition_read(part, 0, buf, 512);
vTaskDelay(1);
}
spi_flash_munmap(handle);
esp_partition_munmap(handle);
printf("Checked memory %d and %d times.\n", res[0], res[1]);