Function nrfxlib_sys::nrf_modem_full_dfu_bl_write [−][src]
pub unsafe extern "C" fn nrf_modem_full_dfu_bl_write(
len: u32,
src: *mut c_void
) -> c_int
Expand description
Write a booloader chunk to the modem.
Call after nrf_modem_full_dfu_init() to upload modem bootloader segments. Bootloader segments are appended together, so the full bootloader may be uploaded with one or many call to this function. Once the full bootloader is uploaded, call nrf_modem_full_dfu_apply().
Firmware segments can be uploaded after successful bootloader upload.
On failure, errno is set to one of following values:
NRF_EINVAL
When src pointer is NULL or user tries to upload too big bootloader.NRF_EOPNOTSUPP
If the modem is not in a state to receive.NRF_EFAULT
When modem responded with error codes.NRF_EPERM
When modem did not accept the flash programming request.NRF_ENOEXEC
When flash programming failed.NRF_ETIMEDOUT
When modem did not respond.NRF_EIO
When incorrect response received from modem.
len
- Length of data to be written.src
- Pointer to the buffer where chunk data is stored.
Returns 0 if the procedure succeeds, -1 otherwise.