esp_openthread_rcp_update.h 882 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_openthread.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @brief This function triggers an RCP firmware update.
  13. *
  14. * @return
  15. * - ESP_OK
  16. * - ESP_FAIL
  17. *
  18. */
  19. esp_err_t esp_openthread_rcp_update_start(void);
  20. /**
  21. * @brief This function writes sequential firmware update data to the RCP.
  22. *
  23. * @param[in] data The firmware data slice
  24. * @param[in] size The data slice size
  25. *
  26. * @return
  27. * - ESP_OK
  28. * - ESP_FAIL
  29. *
  30. */
  31. esp_err_t esp_openthread_rcp_update_write(uint8_t *data, size_t size);
  32. /**
  33. * @brief This function commits the firmware update and reboots the RCP.
  34. *
  35. * @return
  36. * - ESP_OK
  37. * - ESP_FAIL
  38. *
  39. */
  40. esp_err_t esp_openthread_rcp_update_commit(void);
  41. #ifdef __cplusplus
  42. }
  43. #endif