2018-01-15 18:06:11 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Nordic Semiconductor ASA
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 17:12:04 +08:00
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/sys/reboot.h>
|
2018-12-18 16:55:28 +08:00
|
|
|
#include <openthread/instance.h>
|
2018-01-15 18:06:11 +08:00
|
|
|
#include <openthread/platform/misc.h>
|
|
|
|
|
|
|
|
#include "platform-zephyr.h"
|
|
|
|
|
|
|
|
void otPlatReset(otInstance *aInstance)
|
|
|
|
{
|
|
|
|
ARG_UNUSED(aInstance);
|
|
|
|
|
|
|
|
/* This function does nothing on the Posix platform. */
|
|
|
|
sys_reboot(SYS_REBOOT_WARM);
|
|
|
|
}
|
|
|
|
|
|
|
|
otPlatResetReason otPlatGetResetReason(otInstance *aInstance)
|
|
|
|
{
|
|
|
|
ARG_UNUSED(aInstance);
|
|
|
|
|
|
|
|
return OT_PLAT_RESET_REASON_POWER_ON;
|
|
|
|
}
|
2020-03-18 00:51:57 +08:00
|
|
|
|
|
|
|
void otPlatWakeHost(void)
|
|
|
|
{
|
|
|
|
/* TODO */
|
|
|
|
}
|
2021-06-30 18:24:18 +08:00
|
|
|
|
|
|
|
void otPlatAssertFail(const char *aFilename, int aLineNumber)
|
|
|
|
{
|
|
|
|
__ASSERT(false, "OpenThread ASSERT @ %s:%d", aFilename, aLineNumber);
|
|
|
|
}
|