pub unsafe extern "C" fn otPlatSettingsSet(
aInstance: *mut otInstance,
aKey: u16,
aValue: *const u8,
aValueLength: u16,
) -> otError
Expand description
Sets or replaces the value of a setting.
Sets or replaces the value of a setting identified by @p aKey.
Calling this function successfully may cause unrelated settings with multiple values to be reordered.
OpenThread stack guarantees to use otPlatSettingsSet()
method for a @p aKey that was either previously set using
otPlatSettingsSet()
(i.e., contains a single value) or
is empty and/or fully deleted (contains no value).
Platform layer can rely and use this fact for optimizing its implementation.
@param[in] aInstance The OpenThread instance structure. @param[in] aKey The key associated with the setting to change. @param[in] aValue A pointer to where the new value of the setting should be read from. MUST NOT be NULL if @p aValueLength is non-zero. @param[in] aValueLength The length of the data pointed to by aValue. May be zero.
@retval OT_ERROR_NONE The given setting was changed or staged. @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented on this platform. @retval OT_ERROR_NO_BUFS No space remaining to store the given setting.