15 #ifndef ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_
16#define ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_
37#define ENTROPY_BUSYWAIT BIT(0)
95static inline int z_impl_entropy_get_entropy(
const struct device *dev,
102 __ASSERT(api->get_entropy !=
NULL,
103 "Callback pointer should not be NULL");
104 return api->get_entropy(dev, buffer, length);
142#include <zephyr/syscalls/entropy.h>
int entropy_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length)
Fills a buffer with entropy.
int(* entropy_get_entropy_t)(const struct device *dev, uint8_t *buffer, uint16_t length)
@def_driverbackendgroup{Entropy,entropy_interface}
Definition entropy.h:54
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.
Definition entropy.h:118
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:64
#define ENOSYS
Function not implemented.
Definition errno.h:82
#define NULL
Definition iar_missing_defs.h:20
flags
Definition parser.h:97
__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:513
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:519
@driver_ops{Entropy}
Definition entropy.h:72
entropy_get_entropy_t get_entropy
@driver_ops_mandatory Fills a buffer with entropy.
Definition entropy.h:74
entropy_get_entropy_isr_t get_entropy_isr
@driver_ops_optional Fills a buffer with entropy in a non-blocking or busy-wait manner.
Definition entropy.h:76