![]() |
nRF Connect SDK API 3.4.99
|
| int dult_enable | ( | const struct dult_user * | user | ) |
#include <include/dult/dult.h>
Enable DULT.
This function shall be used only after calling the dult_user_register and registering all of the required callbacks.
With the v2 API (
CONFIG_DULT_API_VARIANT_V2
), enabling one user first evicts every other registered user. This is done to ensure that only one user is enabled at a time. The DULT notifies every registered user about the arbitration outcome (including the evicted ones) via the dult_multi_user_cb::ownership_claimed callback. These notifications are delivered asynchronously. Toggling the association (repeated dult_enable / dult_reset) multiple times within a single execution context without yielding may drop cancelling transitions, so intermediate states can be lost. However, even in such a case, the end association state will still be reported correctly, and the callback listener will never get two consecutive dult_multi_user_cb::ownership_claimed or two consecutive dult_multi_user_cb::ownership_released callbacks. Toggling the association states with the dult_enable and dult_reset functions in a single execution context without yielding is strongly discouraged.
| user | User structure used to authenticate the user. |