mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
[posix-app] get RCP (NCP in radio mode) version (#3140)
This commit contains the following changes: - It adds `otPlatRadioGetVersionString()` as an optional radio platform API. If the radio platform does not implement this function, OpenThread core provides a default weak implementation of this function which return the OpenThread version. - A public OpenThread API `otGetRadioVersionString()` is added which provides the radio version string. - POSIX App is updated to get the version from its RCP and provide `otPlatRadioGetVersionString()` - A new spinel capability `SPINEL_CAP_POSIX_APP` is added which corresponds to `ENABLE_POSIX_APP` configuration. - A new spinel property `SPINEL_PROP_RCP_VERSION` (only available in POSIX_APP) is added which gets the RCP version.
This commit is contained in:
committed by
Jonathan Hui
parent
2457aa1864
commit
7c8a37263b
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <openthread/instance.h>
|
||||
#include <openthread/platform/misc.h>
|
||||
#include <openthread/platform/radio.h>
|
||||
|
||||
#include "common/instance.hpp"
|
||||
#include "common/logging.hpp"
|
||||
@@ -183,3 +184,14 @@ const char *otGetVersionString(void)
|
||||
|
||||
return sVersion;
|
||||
}
|
||||
|
||||
const char *otGetRadioVersionString(otInstance *aInstance)
|
||||
{
|
||||
return otPlatRadioGetVersionString(aInstance);
|
||||
}
|
||||
|
||||
OT_TOOL_WEAK const char *otPlatRadioGetVersionString(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
return otGetVersionString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user