mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
openthread: support updating RCP with OTA over spinel
This commit is contained in:
parent
579aa4bd90
commit
674a3ff878
50
components/openthread/include/esp_openthread_rcp_update.h
Normal file
50
components/openthread/include/esp_openthread_rcp_update.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "esp_openthread.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function triggers an RCP firmware update.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK
|
||||||
|
* - ESP_FAIL
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
esp_err_t esp_openthread_rcp_update_start(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function writes sequential firmware update data to the RCP.
|
||||||
|
*
|
||||||
|
* @param[in] data The firmware data slice
|
||||||
|
* @param[in] size The data slice size
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK
|
||||||
|
* - ESP_FAIL
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
esp_err_t esp_openthread_rcp_update_write(uint8_t *data, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function commits the firmware update and reboots the RCP.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK
|
||||||
|
* - ESP_FAIL
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
esp_err_t esp_openthread_rcp_update_commit(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
@ -1 +1 @@
|
|||||||
Subproject commit be71bb03345f963ee745f5e7c7e3fcdef24bf482
|
Subproject commit 27aede10c12614498e30151abc7117e07b3948b7
|
@ -1 +1 @@
|
|||||||
Subproject commit c36c0e77a2465355bcf13bd7dc718d8c9aa6ff64
|
Subproject commit 0298586f97889a6609acff35e94507d0bd5d9b37
|
@ -391,6 +391,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define OPENTHREAD_ENABLE_NCP_VENDOR_HOOK 1
|
||||||
|
|
||||||
#if CONFIG_OPENTHREAD_FTD
|
#if CONFIG_OPENTHREAD_FTD
|
||||||
#define OPENTHREAD_FTD 1
|
#define OPENTHREAD_FTD 1
|
||||||
#elif CONFIG_OPENTHREAD_MTD
|
#elif CONFIG_OPENTHREAD_MTD
|
||||||
|
@ -286,6 +286,8 @@
|
|||||||
*/
|
*/
|
||||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE 1
|
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE 1
|
||||||
|
|
||||||
|
#define OPENTHREAD_ENABLE_NCP_VENDOR_HOOK 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The configurable definitions via Kconfig
|
* The configurable definitions via Kconfig
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# Name, Type, SubType, Offset, Size, Flags
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||||
nvs, data, nvs, 0x9000, 0x6000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
phy_init, data, phy, 0xf000, 0x1000,
|
otadata, data, ota, , 0x2000,
|
||||||
factory, app, factory, 0x10000, 1M,
|
phy_init, data, phy, , 0x1000,
|
||||||
ot_storage, data, 0x3a, , 0x2000,
|
ot_storage, data, 0x3a, , 0x2000,
|
||||||
|
ota_0, app, ota_0, , 900K,
|
||||||
|
ota_1, app, ota_1, , 900K,
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user