[cli] get preferred and supported channel mask (#4253)

This commit is contained in:
Yakun Xu
2019-10-25 13:30:35 +08:00
committed by Jonathan Hui
parent 7fddb6c9db
commit 9cb3fa50ef
2 changed files with 28 additions and 0 deletions
+8
View File
@@ -460,6 +460,14 @@ void Interpreter::ProcessChannel(int argc, char *argv[])
{
mServer->OutputFormat("%d\r\n", otLinkGetChannel(mInstance));
}
else if (strcmp(argv[0], "supported") == 0)
{
mServer->OutputFormat("0x%x\r\n", otPlatRadioGetSupportedChannelMask(mInstance));
}
else if (strcmp(argv[0], "preferred") == 0)
{
mServer->OutputFormat("0x%x\r\n", otPlatRadioGetPreferredChannelMask(mInstance));
}
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
else if (strcmp(argv[0], "monitor") == 0)
{