mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(partitions): Adds new partition types and subtypes for bootloader and partition_table
This commit is contained in:
@@ -67,6 +67,8 @@ const char *esp_partition_type_to_str(const uint32_t type)
|
||||
switch (type) {
|
||||
case PART_TYPE_APP: return "app";
|
||||
case PART_TYPE_DATA: return "data";
|
||||
case PART_TYPE_BOOTLOADER: return "bootloader";
|
||||
case PART_TYPE_PARTITION_TABLE: return "partition_table";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
@@ -74,6 +76,18 @@ const char *esp_partition_type_to_str(const uint32_t type)
|
||||
const char *esp_partition_subtype_to_str(const uint32_t type, const uint32_t subtype)
|
||||
{
|
||||
switch (type) {
|
||||
case PART_TYPE_BOOTLOADER:
|
||||
switch (subtype) {
|
||||
case PART_SUBTYPE_BOOTLOADER_PRIMARY: return "primary";
|
||||
case PART_SUBTYPE_BOOTLOADER_OTA: return "ota";
|
||||
default: return "unknown";
|
||||
}
|
||||
case PART_TYPE_PARTITION_TABLE:
|
||||
switch (subtype) {
|
||||
case PART_SUBTYPE_PARTITION_TABLE_PRIMARY: return "primary";
|
||||
case PART_SUBTYPE_PARTITION_TABLE_OTA: return "ota";
|
||||
default: return "unknown";
|
||||
}
|
||||
case PART_TYPE_APP:
|
||||
switch (subtype) {
|
||||
case PART_SUBTYPE_FACTORY: return "factory";
|
||||
|
Reference in New Issue
Block a user