From 08a1bf5ec394084a0a7cad27c47856fe9eed290d Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Tue, 14 Jan 2025 02:18:29 +0800 Subject: [PATCH] [radio] implement the function `otPlatDiagRadioTransmitCarrier()` (#964) --- src/src/diag.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/src/diag.c b/src/src/diag.c index f56b4fd..5930a3c 100644 --- a/src/src/diag.c +++ b/src/src/diag.c @@ -446,6 +446,23 @@ void otPlatDiagAlarmCallback(otInstance *aInstance) } } +otError otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable) +{ + otError error = OT_ERROR_NONE; + + if (aEnable) + { + otEXPECT_ACTION(startCarrierTransmision(), error = OT_ERROR_FAILED); + } + else + { + otPlatRadioReceive(aInstance, sChannel); + } + +exit: + return error; +} + otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue) { otError error = OT_ERROR_NONE;