[][src]Function esp_idf_bindgen::nvs_open

pub unsafe extern "C" fn nvs_open(
    name: *const c_char,
    open_mode: nvs_open_mode_t,
    out_handle: *mut nvs_handle_t
) -> esp_err_t

@brief Open non-volatile storage with a given namespace from the default NVS partition

Multiple internal ESP-IDF and third party application modules can store their key-value pairs in the NVS module. In order to reduce possible conflicts on key names, each module can use its own namespace. The default NVS partition is the one that is labelled "nvs" in the partition table.

@param[in] name Namespace name. Maximal length is determined by the underlying implementation, but is guaranteed to be at least 15 characters. Shouldn't be empty. @param[in] open_mode NVS_READWRITE or NVS_READONLY. If NVS_READONLY, will open a handle for reading only. All write requests will be rejected for this handle. @param[out] out_handle If successful (return code is zero), handle will be returned in this argument.

@return - ESP_OK if storage handle was opened successfully - ESP_ERR_NVS_NOT_INITIALIZED if the storage driver is not initialized - ESP_ERR_NVS_PART_NOT_FOUND if the partition with label "nvs" is not found - ESP_ERR_NVS_NOT_FOUND id namespace doesn't exist yet and mode is NVS_READONLY - ESP_ERR_NVS_INVALID_NAME if namespace name doesn't satisfy constraints - other error codes from the underlying storage driver