|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
Nordic CRACEN peripheral. More...
Functions | |
| int | nordic_cracen_acquire (const struct device *dev, k_timeout_t timeout) |
| Acquire exclusive access to the CRACEN. | |
| void | nordic_cracen_release (const struct device *dev) |
| Release access to the CRACEN. | |
Nordic CRACEN peripheral.
| int nordic_cracen_acquire | ( | const struct device * | dev, |
| k_timeout_t | timeout ) |
#include <zephyr/drivers/misc/nordic_cracen/nordic_cracen.h>
Acquire exclusive access to the CRACEN.
The synchronisation mechanism is selected with Kconfig:
CONFIG_NORDIC_CRACEN_SYNC_NONE: no synchronisation is performed. timeout is ignored and the call always succeeds. The application must guarantee that the CRACEN is never used concurrently.CONFIG_NORDIC_CRACEN_SYNC_IRQ_LOCK: interrupts are locked until nordic_cracen_release is called. timeout is ignored and the call always succeeds. Usable from any context.CONFIG_NORDIC_CRACEN_SYNC_SEMAPHORE: a semaphore is taken until nordic_cracen_release is called. From interrupt context, or before the kernel has started, timeout is treated as K_NO_WAIT.Access is not recursive, nordic_cracen_release must be called before the CRACEN is acquired again.
Power for the individual CRACEN modules is managed by the nrfx CRACEN library around each hardware operation.
| dev | CRACEN device |
| timeout | Time to wait for the CRACEN to become available |
| 0 | on success |
| -EBUSY | CRACEN is in use and timeout is K_NO_WAIT |
| -EAGAIN | Waiting for the CRACEN timed out |
| void nordic_cracen_release | ( | const struct device * | dev | ) |
#include <zephyr/drivers/misc/nordic_cracen/nordic_cracen.h>
Release access to the CRACEN.
| dev | CRACEN device |