mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 04:57:38 +00:00
ota ops: Verify partition argument passed to esp_ota_begin()
This commit is contained in:
@@ -165,6 +165,26 @@ esp_partition_iterator_t esp_partition_next(esp_partition_iterator_t iterator);
|
||||
*/
|
||||
void esp_partition_iterator_release(esp_partition_iterator_t iterator);
|
||||
|
||||
/**
|
||||
* @brief Verify partition data
|
||||
*
|
||||
* Given a pointer to partition data, verify this partition exists in the partition table (all fields match.)
|
||||
*
|
||||
* This function is also useful to take partition data which may be in a RAM buffer and convert it to a pointer to the
|
||||
* permanent partition data stored in flash.
|
||||
*
|
||||
* Pointers returned from this function can be compared directly to the address of any pointer returned from
|
||||
* esp_partition_get(), as a test for equality.
|
||||
*
|
||||
* @param partition Pointer to partition data to verify. Must be non-NULL. All fields of this structure must match the
|
||||
* partition table entry in flash for this function to return a successful match.
|
||||
*
|
||||
* @return
|
||||
* - If partition not found, returns NULL.
|
||||
* - If found, returns a pointer to the esp_partition_t structure in flash. This pointer is always valid for the lifetime of the application.
|
||||
*/
|
||||
const esp_partition_t *esp_partition_verify(const esp_partition_t *partition);
|
||||
|
||||
/**
|
||||
* @brief Read data from the partition
|
||||
*
|
||||
|
Reference in New Issue
Block a user