13#ifndef ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_
14#define ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_
70static inline int z_impl_entropy_get_entropy(
const struct device *dev,
78 "Callback pointer should not be NULL");
83#define ENTROPY_BUSYWAIT BIT(0)
119#include <syscalls/entropy.h>
int entropy_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length)
Fills a buffer with entropy. Blocks if required in order to generate the necessary random data.
int(* entropy_get_entropy_t)(const struct device *dev, uint8_t *buffer, uint16_t length)
Callback API to get entropy.
Definition: entropy.h:38
static int entropy_get_entropy_isr(const struct device *dev, uint8_t *buffer, uint16_t length, uint32_t flags)
Fills a buffer with entropy in a non-blocking or busy-wait manner. Callable from ISRs.
Definition: entropy.h:95
int(* entropy_get_entropy_isr_t)(const struct device *dev, uint8_t *buffer, uint16_t length, uint32_t flags)
Callback API to get entropy from an ISR.
Definition: entropy.h:47
#define ENOTSUP
Definition: errno.h:115
flags
Definition: parser.h:96
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition: device.h:378
const void * api
Definition: device.h:384
entropy_get_entropy_t get_entropy
Definition: entropy.h:52
entropy_get_entropy_isr_t get_entropy_isr
Definition: entropy.h:53
static ZTEST_BMEM char buffer[8]
Definition: test_mbox_api.c:551