[radio] only allow disable in sleep state (#3733)

There's missing error definition for otPlatRadioDisable(). This commit adds
an error case OT_ERROR_INVALID_STATE to make sure this is only called
when the radio is in sleep mode.
This commit is contained in:
Yakun Xu
2019-04-08 21:24:52 -07:00
committed by Jonathan Hui
parent 5d2e6cd0d9
commit bbb19c2aa2
3 changed files with 23 additions and 21 deletions
+2 -1
View File
@@ -422,7 +422,8 @@ otError otPlatRadioEnable(otInstance *aInstance);
*
* @param[in] aInstance The OpenThread instance structure.
*
* @retval OT_ERROR_NONE Successfully transitioned to Disabled.
* @retval OT_ERROR_NONE Successfully transitioned to Disabled.
* @retval OT_ERROR_INVALID_STATE The radio was not in sleep state.
*
*/
otError otPlatRadioDisable(otInstance *aInstance);