[][src]Function esp_idf_bindgen::nvs_set_i8

pub unsafe extern "C" fn nvs_set_i8(
    handle: nvs_handle_t,
    key: *const c_char,
    value: i8
) -> esp_err_t

@{*/ @brief set value for given key

This family of functions set value for the key, given its name. Note that actual storage will not be updated until nvs_commit function is called.

@param[in] handle Handle obtained from nvs_open function. Handles that were opened read only cannot be used. @param[in] key Key name. Maximal length is determined by the underlying implementation, but is guaranteed to be at least 15 characters. Shouldn't be empty. @param[in] value The value to set. For strings, the maximum length (including null character) is 4000 bytes.

@return - ESP_OK if value was set successfully - ESP_ERR_NVS_INVALID_HANDLE if handle has been closed or is NULL - ESP_ERR_NVS_READ_ONLY if storage handle was opened as read only - ESP_ERR_NVS_INVALID_NAME if key name doesn't satisfy constraints - ESP_ERR_NVS_NOT_ENOUGH_SPACE if there is not enough space in the underlying storage to save the value - ESP_ERR_NVS_REMOVE_FAILED if the value wasn't updated because flash write operation has failed. The value was written however, and update will be finished after re-initialization of nvs, provided that flash operation doesn't fail again. - ESP_ERR_NVS_VALUE_TOO_LONG if the string value is too long