From 86831e0a07b35ac513daf834d9563cedbdd4c140 Mon Sep 17 00:00:00 2001 From: Mason Tran Date: Fri, 13 Oct 2023 15:51:25 -0400 Subject: [PATCH] [posix] implement `otPlatResetToBootloader()` --- src/posix/platform/radio.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/posix/platform/radio.cpp b/src/posix/platform/radio.cpp index aafe9b502007..05c21ef42902 100644 --- a/src/posix/platform/radio.cpp +++ b/src/posix/platform/radio.cpp @@ -978,6 +978,15 @@ otError otPlatRadioReceiveAt(otInstance *aInstance, uint8_t aChannel, uint32_t a return OT_ERROR_NOT_IMPLEMENTED; } +#if OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE +void otPlatResetToBootloader(otInstance *aInstance) +{ + OT_UNUSED_VARIABLE(aInstance); + + IgnoreError(GetRadioSpinel().SendReset(SPINEL_RESET_BOOTLOADER)); +} +#endif + const otRadioSpinelMetrics *otSysGetRadioSpinelMetrics(void) { return GetRadioSpinel().GetRadioSpinelMetrics(); } const otRcpInterfaceMetrics *otSysGetRcpInterfaceMetrics(void)