mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 21:30:24 +00:00
[auto-start] remove auto-start feature (#3920)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user