SUIT secure firmware updates worker thread. More...
SUIT secure firmware updates worker thread.
SUIT CoAP helper API
Functions | |
| bool | suit_worker_trigger (const char *url, size_t len) |
| Trigger a SUIT update via a worker thread. More... | |
| void | suit_worker_trigger_prepared (const uint8_t *manifest, size_t size) |
| Trigger a SUIT update via a worker thread. More... | |
| int | suit_worker_try_prepare (uint8_t **buffer, size_t *size) |
| Prepare for a worker run with a preloaded manifest. More... | |
| void | suit_worker_done_cb (int res) |
| Callback that is executed after the SUIT process has finished. More... | |
| int | suit_handle_url (const char *url) |
| Trigger a SUIT update. More... | |
| int | suit_handle_manifest_buf (const uint8_t *buffer, size_t size) |
| Trigger a SUIT update on an in-memory manifest. More... | |
| int suit_handle_manifest_buf | ( | const uint8_t * | buffer, |
| size_t | size | ||
| ) |
Trigger a SUIT update on an in-memory manifest.
This function accesses global state shared with suit_handle_url; only one of those may be called at the same time. You may use suit_worker_try_prepare / suit_worker_trigger_prepared instead, which manage locking and also do away with the stack space requirement by being executed on an own stack.
| [in] | buffer | Memory area containing a SUIT manifest. |
| [in] | size | Size of the manifest in buffer. |
| int suit_handle_url | ( | const char * | url | ) |
Trigger a SUIT update.
This function accesses global state shared with suit_handle_manifest_buf; only one of those may be called at the same time. You may use suit_worker_trigger instead, which manages locking and also does away with the stack space requirement by being executed on an own stack.
| [in] | url | url pointer containing the full coap url to the manifest |
| void suit_worker_done_cb | ( | int | res | ) |
Callback that is executed after the SUIT process has finished.
| [in] | res | Result of the SUIT update, 0 on success |
By default this will reboot the board, can be overwritten by the application.
| bool suit_worker_trigger | ( | const char * | url, |
| size_t | len | ||
| ) |
Trigger a SUIT update via a worker thread.
| [in] | url | url pointer containing the full coap url to the manifest |
| [in] | len | length of the url |
| true | if the worker was triggered |
| false | if the worker is already busy |
| void suit_worker_trigger_prepared | ( | const uint8_t * | manifest, |
| size_t | size | ||
| ) |
Trigger a SUIT update via a worker thread.
buf, and populated size bytes into it.This can be called with a size of 0 when writing a manifest was started, but could not be completed.
| [in] | manifest | Pointer to the manifest. This must be the return value of a previous call to suit_worker_try_prepare, and is invalidated at some point during or after the call. |
| [in] | size | Number of bytes that have been prepared in the buffer before the call. |
| int suit_worker_try_prepare | ( | uint8_t ** | buffer, |
| size_t * | size | ||
| ) |
Prepare for a worker run with a preloaded manifest.
This obtains a lock on the SUIT worker, and provides a pointer to a memory area into which the manifest is to be written. The lock must be released by calling suit_worker_trigger_prepared later.
| [out] | buffer | On success, buffer into which the image may be written. |
| [in,out] | size | Requested buffer size. On some errors, this will be decreased to a size that would be acceptable. |