You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* - ESP_ERR_NOT_SUPPORTED: Partition address or size (sector count) exceeds 32-bit limit of MBR.
124
-
* - Other error codes from `esp_ext_part_list_insert` or related routines.
124
+
* - Other error codes from `esp_ext_part_list_signature_get` or `esp_mbr_partition_set`.
125
125
*/
126
126
esp_err_tesp_mbr_generate(mbr_t*mbr,
127
127
esp_ext_part_list_t*part_list,
128
128
esp_mbr_generate_extra_args_t*extra_args);
129
129
130
+
/**
131
+
* @brief Sets a partition entry in the MBR (Master Boot Record).
132
+
*
133
+
* This function updates the specified partition entry in the provided MBR structure
134
+
* with the information from the given partition list item. Additional arguments for
135
+
* partition generation must be supplied via the extra_args parameter.
136
+
*
137
+
* @note This function is not thread-safe.
138
+
*
139
+
* @warning If the partition entry is empty (i.e., `item->info.type` is `ESP_EXT_PART_TYPE_NONE`), it will be cleared in the MBR.
140
+
* If there is an empty gap between partition entries, partition entries after the gap will most likely be ignored when the MBR is parsed (MBR does not allow gaps in the partition table).
141
+
* To avoid this, you can use `esp_mbr_remove_gaps_between_partiton_entries()` function to remove gaps in the MBR partition table.
142
+
*
143
+
* @param[in,out] mbr Pointer to the MBR structure to be updated.
144
+
* @param[in] partition_index Index of the partition entry to set (0-3).
145
+
* @param[in] item Pointer to the partition list item structure containing partition information.
146
+
* @param[in] extra_args Extra arguments for partiton entry setting (required).
147
+
*
148
+
* @return
149
+
* - ESP_OK: Success.
150
+
* - ESP_ERR_INVALID_ARG: Invalid arguments were provided.
0 commit comments