[simulation] remove use of internal definitions/headers in radio platform (#6766)

This commit updates the `simulation/radio.c` and removes the uses of
core internal macro `VerifyOfExit()` and replaces them with
`otEXPECT_ACTION()`. This ensures that radio platform layer does not
include the internal OT header like "common/code_utils.hpp".
This commit is contained in:
Abtin Keshavarzian
2021-06-28 09:45:01 -07:00
committed by GitHub
parent 2752365e03
commit 2db3ddca33
+2 -3
View File
@@ -39,7 +39,6 @@
#include <openthread/platform/radio.h>
#include <openthread/platform/time.h>
#include "common/code_utils.hpp"
#include "utils/code_utils.h"
#include "utils/link_metrics.h"
#include "utils/mac_frame.h"
@@ -1230,7 +1229,7 @@ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aCh
otError error = OT_ERROR_NONE;
VerifyOrExit(aChannel >= kMinChannel && aChannel <= kMaxChannel, error = OT_ERROR_INVALID_ARGS);
otEXPECT_ACTION(aChannel >= kMinChannel && aChannel <= kMaxChannel, error = OT_ERROR_INVALID_ARGS);
sChannelMaxTransmitPower[aChannel - kMinChannel] = aMaxPower;
exit:
@@ -1262,7 +1261,7 @@ otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode)
OT_UNUSED_VARIABLE(aInstance);
otError error = OT_ERROR_NONE;
VerifyOrExit(aRegionCode != NULL, error = OT_ERROR_INVALID_ARGS);
otEXPECT_ACTION(aRegionCode != NULL, error = OT_ERROR_INVALID_ARGS);
*aRegionCode = sRegionCode;
exit: