Function esp_idf_sys::esp_partition_register_external
source · pub unsafe extern "C" fn esp_partition_register_external(
flash_chip: *mut esp_flash_t,
offset: usize,
size: usize,
label: *const c_char,
type_: esp_partition_type_t,
subtype: esp_partition_subtype_t,
out_partition: *mut *const esp_partition_t,
) -> esp_err_t
Expand description
@brief Register a partition on an external flash chip
This API allows designating certain areas of external flash chips (identified by the esp_flash_t structure) as partitions. This allows using them with components which access SPI flash through the esp_partition API.
@param flash_chip Pointer to the structure identifying the flash chip @param offset Address in bytes, where the partition starts @param size Size of the partition in bytes @param label Partition name @param type One of the partition types (ESP_PARTITION_TYPE_), or an integer. Note that applications can not be booted from external flash chips, so using ESP_PARTITION_TYPE_APP is not supported. @param subtype One of the partition subtypes (ESP_PARTITION_SUBTYPE_), or an integer. @param[out] out_partition Output, if non-NULL, receives the pointer to the resulting esp_partition_t structure @return - ESP_OK on success - ESP_ERR_NO_MEM if memory allocation has failed - ESP_ERR_INVALID_ARG if the new partition overlaps another partition on the same flash chip - ESP_ERR_INVALID_SIZE if the partition doesn’t fit into the flash chip size