use next update partition

This commit is contained in:
microDev 2022-10-04 19:32:56 +05:30
parent 9fe7308b88
commit 2618e11002
No known key found for this signature in database
GPG Key ID: 2C0867BE60967730
1 changed files with 3 additions and 4 deletions

View File

@ -37,7 +37,8 @@
#include "py/runtime.h"
#include "lib/oofatfs/ff.h"
#include "components/spi_flash/include/esp_partition.h"
#include "esp_ota_ops.h"
#include "esp_partition.h"
#include "supervisor/flash.h"
#include "supervisor/usb.h"
@ -60,9 +61,7 @@ void supervisor_flash_init(void) {
ESP_PARTITION_SUBTYPE_DATA_FAT,
NULL);
#if CIRCUITPY_STORAGE_EXTEND
_partition[1] = esp_partition_find_first(ESP_PARTITION_TYPE_APP,
ESP_PARTITION_SUBTYPE_APP_OTA_1,
NULL);
_partition[1] = esp_ota_get_next_update_partition(NULL);
#endif
}