|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Functions | |
| void | infuse_dfu_write_erase_start (const struct flash_area *fa) |
| Prepare a flash area for write/erase. | |
| void | infuse_dfu_write_erase_finish (const struct flash_area *fa) |
| Finalise a flash area write/erase. | |
| int | infuse_dfu_image_erase (const struct flash_area *fa, size_t image_len, infuse_progress_cb_t progress_cb, bool mcuboot_trailer) |
| Erase a flash area to be ready for a new image. | |
| int | infuse_dfu_image_metadata_clear (const struct flash_area *fa, size_t image_end) |
| Clear stale MCUboot metadata around an image already present in a flash area. | |
| int | infuse_dfu_nrf91_modem_delta_prepare (void) |
| Prepare the nRF91 modem for a delta image upgrade. | |
| int | infuse_dfu_nrf91_modem_delta_finish (void) |
| Finalise a nRF91 modem delta image upgrade. | |
| int infuse_dfu_image_erase | ( | const struct flash_area * | fa, |
| size_t | image_len, | ||
| infuse_progress_cb_t | progress_cb, | ||
| bool | mcuboot_trailer ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/dfu/helpers.h>
Erase a flash area to be ready for a new image.
If the flash device does not require an explicit erase, the image area is not erased. Stale MCUboot metadata (data before the image start offset and the trailer) is still cleared if mcuboot_trailer is set.
| fa | Flash area to erase (must be already opened) |
| image_len | Length of image, including any offset from the start of the area. Zero erases nothing beyond the MCUboot metadata. |
| progress_cb | Optional progress callback |
| mcuboot_trailer | Clear stale MCUboot metadata: the MCUboot trailer, and on flash that does not require an explicit erase, any data before the image start offset (see boot_get_image_start_offset) |
| 0 | On success |
| -errno | Error code from flash_get_page_info_by_offs or flash_area_flatten on failure |
| int infuse_dfu_image_metadata_clear | ( | const struct flash_area * | fa, |
| size_t | image_end ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/dfu/helpers.h>
Clear stale MCUboot metadata around an image already present in a flash area.
Clears any data before the image start offset (see boot_get_image_start_offset) and the MCUboot trailer, without modifying the image itself. Used when the image data already matches but an upgrade still needs to be requested.
| fa | Flash area containing the image (must be already opened) |
| image_end | Offset of the end of the image within the flash area |
| 0 | On success |
| -EINVAL | Image overlaps the MCUboot trailer, metadata cannot be cleared in place |
| -ENOTSUP | MCUboot trailer location unknown |
| -errno | Error code from flash_get_page_info_by_offs or flash_area_flatten on failure |
| int infuse_dfu_nrf91_modem_delta_finish | ( | void | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/dfu/helpers.h>
Finalise a nRF91 modem delta image upgrade.
| 0 | On success |
| -errno | Error code from nrf_modem_delta_dfu_write_done or nrf_modem_delta_dfu_update |
| int infuse_dfu_nrf91_modem_delta_prepare | ( | void | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/dfu/helpers.h>
Prepare the nRF91 modem for a delta image upgrade.
| 0 | On success |
| -errno | Error code from nrf_modem_delta_dfu_offset, nrf_modem_delta_dfu_erase or nrf_modem_delta_dfu_write_init |
| void infuse_dfu_write_erase_finish | ( | const struct flash_area * | fa | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/dfu/helpers.h>
Finalise a flash area write/erase.
Cleanup the infuse_dfu_write_erase_start call once complete.
| fa | Flash area (must be already opened) |
| void infuse_dfu_write_erase_start | ( | const struct flash_area * | fa | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/dfu/helpers.h>
Prepare a flash area for write/erase.
Prepare to erase or write to a flash area.
| fa | Flash area (must be already opened) |