From 3630099d29f20f6e68c141b118294a9333a9b9c9 Mon Sep 17 00:00:00 2001 From: Jiacheng Guo Date: Mon, 22 Mar 2021 16:06:33 +0800 Subject: [PATCH] openthread: add radio api for Thread 1.2 to work --- .../openthread/port/esp_openthread_radio_uart.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/openthread/port/esp_openthread_radio_uart.cpp b/components/openthread/port/esp_openthread_radio_uart.cpp index 86c8e93d8d..d89e0d4ba3 100644 --- a/components/openthread/port/esp_openthread_radio_uart.cpp +++ b/components/openthread/port/esp_openthread_radio_uart.cpp @@ -223,6 +223,21 @@ int8_t otPlatRadioGetReceiveSensitivity(otInstance *instance) return s_radio.GetReceiveSensitivity(); } +void otPlatRadioSetMacKey(otInstance *aInstance, + uint8_t aKeyIdMode, + uint8_t aKeyId, + const otMacKey *aPrevKey, + const otMacKey *aCurrKey, + const otMacKey *aNextKey) +{ + SuccessOrDie(s_radio.SetMacKey(aKeyIdMode, aKeyId, *aPrevKey, *aCurrKey, *aNextKey)); +} + +void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter) +{ + SuccessOrDie(s_radio.SetMacFrameCounter(aMacFrameCounter)); +} + #if OPENTHREAD_CONFIG_DIAG_ENABLE otError otPlatDiagProcess(otInstance *instance, int argc, char *argv[], char *output, size_t output_max_len) {