Interfaces for entropy hardware.
More...
|
| file | entropy.h |
| | Main header file for entropy driver API.
|
| |
Interfaces for entropy hardware.
- Since
- 1.10
- Version
- 1.0.0
◆ ENTROPY_BUSYWAIT
| #define ENTROPY_BUSYWAIT BIT(0) |
◆ entropy_get_entropy()
#include <zephyr/drivers/entropy.h>
Fills a buffer with entropy.
Blocks if required in order to generate the necessary random data.
- Parameters
-
| dev | Pointer to the entropy device. |
| buffer | Buffer to fill with entropy. |
| length | Buffer length. |
- Return values
-
| 0 | on success. |
| -ERRNO | errno code on error. |
◆ entropy_get_entropy_isr()
#include <zephyr/drivers/entropy.h>
Fills a buffer with entropy in a non-blocking or busy-wait manner.
Callable from ISRs.
- Parameters
-
| dev | Pointer to the device structure. |
| buffer | Buffer to fill with entropy. |
| length | Buffer length. |
| flags | Flags to modify the behavior of the call. |
- Returns
- number of bytes filled with entropy or -error.
- Return values
-
| -ENOSYS | Driver does not implement the function |