![]() |
nRF Connect SDK API 3.4.99
|
| int dult_reset | ( | const struct dult_user * | user | ) |
#include <include/dult/dult.h>
Reset DULT.
This function can only be called by the DULT user previously registered with the dult_user_register function.
With the v1 API (
CONFIG_DULT_API_VARIANT_V1
), calling this function unregisters the registered DULT user structure and callbacks.
With the v2 API (
CONFIG_DULT_API_VARIANT_V2
), releases the currently associated user but keeps the DULT user and its callbacks registered, so the dult_enable function can be called again to re-enable the user. Use the dult_user_unregister function to fully unregister the DULT user and return it to the unregistered state.
With the v2 API, releasing the association triggers the dult_multi_user_cb::ownership_released notification for every registered user, mirroring the dult_multi_user_cb::ownership_claimed notification emitted by dult_enable. 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. |