#include <lib/bin/lwm2m_carrier/include/lwm2m_os.h>
Start a firmware upgrade.
- Parameters
-
| [in] | img_type | DFU target type to be initialized. |
| [in] | max_file_size | Estimate of the new firmware image to be received. May be greater than or equal to the actual image size received by the end. |
| [in] | crc_validate | Flag to indicate whether to validate the incoming image fragments by means of IEEE CRC32. |
- Return values
-
| 0 | Ready to start a new firmware upgrade. |
- Returns
- A positive number of bytes written so far, if the previous upgrade was not completed. In this case, the upgrade will resume from this offset.
- Return values
-
| -EBUSY | Another firmware upgrade is already ongoing. |
| -EFBIG | File size exceeds the DFU area size. |
| -ENOTSUP | Firmware image not supported or unknown. |
| -EIO | Internal error. |