refactor: remove dependency on spi_flash include for sector size

This commit is contained in:
Sonika Rathi
2024-09-26 13:01:24 +08:00
parent f18eb5a4c6
commit d5da858cd9
42 changed files with 198 additions and 136 deletions

View File

@@ -8,7 +8,6 @@
#include <string.h>
#include <assert.h>
#include "esp_partition.h"
#include "spi_flash_mmap.h"
#include "esp_log.h"
static const char *TAG = "example";
@@ -46,7 +45,7 @@ void app_main(void)
// Erase the area where the data was written. Erase size should be a multiple of SPI_FLASH_SEC_SIZE
// and also be SPI_FLASH_SEC_SIZE aligned
ESP_ERROR_CHECK(esp_partition_erase_range(partition, 0, SPI_FLASH_SEC_SIZE));
ESP_ERROR_CHECK(esp_partition_erase_range(partition, 0, partition->erase_size));
// Read back the data (should all now be 0xFF's)
memset(store_data, 0xFF, sizeof(read_data));