15 #ifndef ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_
16#define ZEPHYR_INCLUDE_DRIVERS_ENTROPY_H_
40#define ENTROPY_BUSYWAIT BIT(0)
98#ifdef CONFIG_ARCH_HAS_ENTROPY
100 extern const struct device *
const z_arch_entropy_dev;
102 device = z_arch_entropy_dev;
123static inline int z_impl_entropy_get_entropy(
const struct device *dev,
130 "Callback pointer should not be NULL");
168#include <zephyr/syscalls/entropy.h>
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition device.h:1449
#define DEVICE_DT_GET_OR_NULL(node_id)
Utility macro to obtain an optional reference to a device.
Definition device.h:382
#define DT_CHOSEN(prop)
Get a node identifier for a /chosen node property.
Definition devicetree.h:3507
int(* entropy_get_entropy_t)(const struct device *dev, uint8_t *buffer, uint16_t length)
Callback API to get entropy.
Definition entropy.h:56
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:65
int entropy_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length)
Fills a buffer with entropy.
static const struct device * entropy_get_default_device(void)
Return the default entropy device if available.
Definition entropy.h:94
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:145
#define ENOSYS
Function not implemented.
Definition errno.h:83
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
<span class="mlabel">Driver Operations</span> Entropy driver operations
Definition entropy.h:73
entropy_get_entropy_t get_entropy
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition entropy.h:75
entropy_get_entropy_isr_t get_entropy_isr
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition entropy.h:77