I'm not following the distinction between esp_partition_find() and esp_partition_find_first(). When would I use one vs the other? What does it mean to create an iterator for partitions that doesn't point to the "first" in the set of possibilities?
Later ... got it ...
esp_partition_find() returns an iterator which can then be used to get the partition and then we dispose of the iterator while esp_partition_find_first() returns the partition and NOT the iterator ... presumably doing the equivalent of a find_first() a get() and an iterator_release() all in a convenience.
[Solved] Distinction between esp_partition_find() and esp_partition_find_first()
[Solved] Distinction between esp_partition_find() and esp_partition_find_first()
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Distinction between esp_partition_find() and esp_partition_find_first()
Find returns an iterator (which references the first partition that meets criteria). Find_first returns a pointer to the partition structure for the first partition which meets criteria, or NULL if such partition does not exist. It is a shorthand for 'find' followed by 'get'. It is intended to be used when you don't plan to iterate multiple partitions, and expect to find one and only partition of a specific type.
Who is online
Users browsing this forum: No registered users and 156 guests