[−][src]Function openthread_sys::otThreadSetMasterKey
pub unsafe extern "C" fn otThreadSetMasterKey(
aInstance: *mut otInstance,
aKey: *const otMasterKey
) -> otError
Set the thrMasterKey.
This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
@param[in] aInstance A pointer to an OpenThread instance. @param[in] aKey A pointer to a buffer containing the thrMasterKey.
@retval OT_ERROR_NONE Successfully set the thrMasterKey. @retval OT_ERROR_INVALID_ARGS If aKeyLength is larger than 16. @retval OT_ERROR_INVALID_STATE Thread protocols are enabled.
@sa otThreadGetMasterKey