mirror of
https://github.com/espressif/openthread.git
synced 2026-08-05 02:17:47 +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
@@ -379,13 +379,23 @@ otLogLevel otGetDynamicLogLevel(otInstance *aInstance);
|
||||
otError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel);
|
||||
|
||||
/**
|
||||
* Get the OpenThread version string.
|
||||
* This function gets the OpenThread version string.
|
||||
*
|
||||
* @returns A pointer to the OpenThread version.
|
||||
*
|
||||
*/
|
||||
OTAPI const char *OTCALL otGetVersionString(void);
|
||||
|
||||
/**
|
||||
* This function gets the OpenThread radio version string.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
* @returns A pointer to the OpenThread radio version.
|
||||
*
|
||||
*/
|
||||
const char *otGetRadioVersionString(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
@@ -634,6 +634,19 @@ int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance);
|
||||
*/
|
||||
extern void otPlatRadioFrameUpdated(otInstance *aInstance, otRadioFrame *aFrame);
|
||||
|
||||
/**
|
||||
* Get the radio version string.
|
||||
*
|
||||
* This is an optional radio driver platform function. If not provided by platform radio driver, OpenThread uses
|
||||
* the OpenThread version instead (@sa otGetVersionString()).
|
||||
*
|
||||
* @param[in] aInstance The OpenThread instance structure.
|
||||
*
|
||||
* @returns A pointer to the OpenThread radio version.
|
||||
*
|
||||
*/
|
||||
const char *otPlatRadioGetVersionString(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user