mirror of
https://github.com/espressif/openthread.git
synced 2026-07-16 00:54:09 +00:00
Change API name: otNetworkSettingErase -> otPersistentInfoErase (#1126)
This commit is contained in:
committed by
Jonathan Hui
parent
8198e8794f
commit
6db94b6c27
@@ -1675,7 +1675,10 @@ OTAPI ThreadError OTCALL otGetAssignLinkQuality(otInstance *aInstance, const uin
|
||||
OTAPI void OTCALL otSetAssignLinkQuality(otInstance *aInstance, const uint8_t *aExtAddr, uint8_t aLinkQuality);
|
||||
|
||||
/**
|
||||
* This method triggers platform reset.
|
||||
* This method triggers a platform reset.
|
||||
*
|
||||
* The reset process ensures that all the OpenThread state/info (stored in volatile memory) is erased. Note that the
|
||||
* `otPlatformReset` does not erase any persistent state/info saved in non-volatile memory.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*/
|
||||
@@ -1689,15 +1692,16 @@ OTAPI void OTCALL otPlatformReset(otInstance *aInstance);
|
||||
OTAPI void OTCALL otFactoryReset(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This method erases all the settings stored on non-volatile memory.
|
||||
* This function erases all the OpenThread persistent info (network settings) stored on non-volatile memory.
|
||||
* Erase is successful only if the device is in `disabled` state/role.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @retval kThreadError_None All data was wiped successfully.
|
||||
* @retval kThreadError_None All persistent info/state was erased successfully.
|
||||
* @retval kThreadError_InvalidState Device is not in `disabled` state/role.
|
||||
*
|
||||
*/
|
||||
ThreadError otNetworkSettingsErase(otInstance *aInstance);
|
||||
ThreadError otPersistentInfoErase(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* Get the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Router role.
|
||||
|
||||
@@ -703,7 +703,7 @@ void otFactoryReset(otInstance *aInstance)
|
||||
otPlatReset(aInstance);
|
||||
}
|
||||
|
||||
ThreadError otNetworkSettingsErase(otInstance *aInstance)
|
||||
ThreadError otPersistentInfoErase(otInstance *aInstance)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
|
||||
@@ -1439,7 +1439,7 @@ ThreadError NcpBase::CommandHandler_NET_CLEAR(uint8_t header, unsigned int comma
|
||||
(void)arg_ptr;
|
||||
(void)arg_len;
|
||||
|
||||
return SendLastStatus(header, ThreadErrorToSpinelStatus(otNetworkSettingsErase(mInstance)));
|
||||
return SendLastStatus(header, ThreadErrorToSpinelStatus(otPersistentInfoErase(mInstance)));
|
||||
}
|
||||
|
||||
ThreadError NcpBase::CommandHandler_NET_RECALL(uint8_t header, unsigned int command, const uint8_t *arg_ptr,
|
||||
|
||||
Reference in New Issue
Block a user