mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
refactor: remove dependency on spi_flash include for sector size
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user