mirror of
https://github.com/espressif/openthread.git
synced 2026-10-04 23:07:37 +00:00
[diag] add gpio diag command support (#8316)
This commit is contained in:
@@ -85,8 +85,13 @@ otError otDiagProcessCmd(otInstance *aInstance,
|
||||
* @param[out] aOutput The diagnostics execution result.
|
||||
* @param[in] aOutputMaxLen The output buffer size.
|
||||
*
|
||||
* @retval OT_ERROR_NONE The command is successfully process.
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported.
|
||||
* @retval OT_ERROR_NO_BUFS The command string is too long.
|
||||
*
|
||||
*/
|
||||
void otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOutputMaxLen);
|
||||
otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOutputMaxLen);
|
||||
|
||||
/**
|
||||
* This function indicates whether or not the factory diagnostics mode is enabled.
|
||||
|
||||
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (256)
|
||||
#define OPENTHREAD_API_VERSION (257)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -129,6 +129,32 @@ void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otErro
|
||||
*/
|
||||
void otPlatDiagAlarmCallback(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function sets the gpio value.
|
||||
*
|
||||
* @param[in] aGpio The gpio number.
|
||||
* @param[in] aValue true to set the gpio to high level, or false otherwise.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Successfully set the gpio.
|
||||
* @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented on the platform.
|
||||
*
|
||||
*/
|
||||
otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue);
|
||||
|
||||
/**
|
||||
* This function gets the gpio value.
|
||||
*
|
||||
* @param[in] aGpio The gpio number.
|
||||
* @param[out] aValue A pointer where to put gpio value.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Successfully got the gpio value.
|
||||
* @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported or @p aValue is NULL.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented on the platform.
|
||||
*
|
||||
*/
|
||||
otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user