Function esp_idf_sys::nvs_erase_key

source ·
pub unsafe extern "C" fn nvs_erase_key(
    handle: nvs_handle_t,
    key: *const c_char
) -> esp_err_t
Expand description

@brief Erase key-value pair with given key name.

Note that actual storage may not be updated until nvs_commit function is called.

@param[in] handle Storage handle obtained with nvs_open. Handles that were opened read only cannot be used.

@param[in] key Key name. Maximum length is (NVS_KEY_NAME_MAX_SIZE-1) characters. Shouldn’t be empty.

@return - ESP_OK if erase operation was successful - ESP_FAIL if there is an internal error; most likely due to corrupted NVS partition (only if NVS assertion checks are disabled) - ESP_ERR_NVS_INVALID_HANDLE if handle has been closed or is NULL - ESP_ERR_NVS_READ_ONLY if handle was opened as read only - ESP_ERR_NVS_NOT_FOUND if the requested key doesn’t exist - other error codes from the underlying storage driver