zephyr/subsys/net/lib/openthread/platform/diag.c
Piotr Szkotak a6b0a3a263 net: openthread: make diag compile
Fix compilation error when the DIAG module is enabled.
All core functionalities are provided.

Signed-off-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
2020-07-20 14:40:29 +03:00

67 lines
1.1 KiB
C

/*
* Copyright (c) 2018 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <openthread/platform/diag.h>
#include "platform-zephyr.h"
/**
* Diagnostics mode variables.
*
*/
static bool sDiagMode;
otError otPlatDiagProcess(otInstance *aInstance,
uint8_t argc,
char *argv[],
char *aOutput,
size_t aOutputMaxLen)
{
ARG_UNUSED(argc);
ARG_UNUSED(aInstance);
/* Add more plarform specific diagnostics features here. */
snprintk(aOutput, aOutputMaxLen,
"diag feature '%s' is not supported\r\n", argv[0]);
return OT_ERROR_NOT_IMPLEMENTED;
}
void otPlatDiagModeSet(bool aMode)
{
sDiagMode = aMode;
}
bool otPlatDiagModeGet(void)
{
return sDiagMode;
}
void otPlatDiagChannelSet(uint8_t aChannel)
{
ARG_UNUSED(aChannel);
}
void otPlatDiagTxPowerSet(int8_t aTxPower)
{
ARG_UNUSED(aTxPower);
}
void otPlatDiagRadioReceived(otInstance *aInstance,
otRadioFrame *aFrame,
otError aError)
{
ARG_UNUSED(aInstance);
ARG_UNUSED(aFrame);
ARG_UNUSED(aError);
}
void otPlatDiagAlarmCallback(otInstance *aInstance)
{
ARG_UNUSED(aInstance);
}