Skip to content

Commit 2618e11

Browse files
committed
use next update partition
1 parent 9fe7308 commit 2618e11

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ports/espressif/supervisor/internal_flash.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
#include "py/runtime.h"
3838
#include "lib/oofatfs/ff.h"
3939

40-
#include "components/spi_flash/include/esp_partition.h"
40+
#include "esp_ota_ops.h"
41+
#include "esp_partition.h"
4142

4243
#include "supervisor/flash.h"
4344
#include "supervisor/usb.h"
@@ -60,9 +61,7 @@ void supervisor_flash_init(void) {
6061
ESP_PARTITION_SUBTYPE_DATA_FAT,
6162
NULL);
6263
#if CIRCUITPY_STORAGE_EXTEND
63-
_partition[1] = esp_partition_find_first(ESP_PARTITION_TYPE_APP,
64-
ESP_PARTITION_SUBTYPE_APP_OTA_1,
65-
NULL);
64+
_partition[1] = esp_ota_get_next_update_partition(NULL);
6665
#endif
6766
}
6867

0 commit comments

Comments
 (0)