[auto-start] remove auto-start feature (#3920)

This commit is contained in:
Jonathan Hui
2019-06-14 12:40:30 -07:00
committed by GitHub
parent b4c56c447e
commit 6dfd716da1
9 changed files with 6 additions and 178 deletions
-32
View File
@@ -459,38 +459,6 @@ exit:
return error;
}
bool otThreadGetAutoStart(otInstance *aInstance)
{
#if OPENTHREAD_CONFIG_ENABLE_AUTO_START_SUPPORT
uint8_t autoStart = 0;
Instance &instance = *static_cast<Instance *>(aInstance);
if (instance.Get<Settings>().ReadThreadAutoStart(autoStart) != OT_ERROR_NONE)
{
autoStart = 0;
}
return autoStart != 0;
#else
OT_UNUSED_VARIABLE(aInstance);
return false;
#endif
}
otError otThreadSetAutoStart(otInstance *aInstance, bool aStartAutomatically)
{
#if OPENTHREAD_CONFIG_ENABLE_AUTO_START_SUPPORT
uint8_t autoStart = aStartAutomatically ? 1 : 0;
Instance &instance = *static_cast<Instance *>(aInstance);
return instance.Get<Settings>().SaveThreadAutoStart(autoStart);
#else
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aStartAutomatically);
return OT_ERROR_NOT_IMPLEMENTED;
#endif
}
bool otThreadIsSingleton(otInstance *aInstance)
{
Instance &instance = *static_cast<Instance *>(aInstance);