esp_idf_hal::sys

Function esp_https_ota_get_img_desc

Source
pub unsafe extern "C" fn esp_https_ota_get_img_desc(
    https_ota_handle: *mut c_void,
    new_app_info: *mut esp_app_desc_t,
) -> i32
Expand description

@brief Reads app description from image header. The app description provides information like the “Firmware version” of the image.

@note This API can be called only after esp_https_ota_begin() and before esp_https_ota_perform(). Calling this API is not mandatory.

@param[in] https_ota_handle pointer to esp_https_ota_handle_t structure @param[out] new_app_info pointer to an allocated esp_app_desc_t structure

@return

  • ESP_ERR_INVALID_ARG: Invalid arguments
  • ESP_ERR_INVALID_STATE: Invalid state to call this API. esp_https_ota_begin() not called yet.
  • ESP_FAIL: Failed to read image descriptor
  • ESP_OK: Successfully read image descriptor