NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_trng.h
Go to the documentation of this file.
1// ================================================================================ //
2// The NEORV32 RISC-V Processor - https://github.com/stnolting/neorv32 //
3// Copyright (c) NEORV32 contributors. //
4// Copyright (c) 2020 - 2024 Stephan Nolting. All rights reserved. //
5// Licensed under the BSD-3-Clause license, see LICENSE for details. //
6// SPDX-License-Identifier: BSD-3-Clause //
7// ================================================================================ //
8
18#ifndef neorv32_trng_h
19#define neorv32_trng_h
20
21#include <stdint.h>
22
23
24/**********************************************************************/
29typedef volatile struct __attribute__((packed,aligned(4))) {
30 uint32_t CTRL;
32
34#define NEORV32_TRNG ((neorv32_trng_t*) (NEORV32_TRNG_BASE))
35
53/**********************************************************************/
58void neorv32_trng_enable(int irq_sel);
59void neorv32_trng_disable(void);
62int neorv32_trng_get(uint8_t *data);
67#endif // neorv32_trng_h
NEORV32_TRNG_CTRL_enum
Definition neorv32_trng.h:37
@ TRNG_CTRL_EN
Definition neorv32_trng.h:47
@ TRNG_CTRL_VALID
Definition neorv32_trng.h:48
@ TRNG_CTRL_DATA_LSB
Definition neorv32_trng.h:38
@ TRNG_CTRL_FIFO_LSB
Definition neorv32_trng.h:41
@ TRNG_CTRL_FIFO_MSB
Definition neorv32_trng.h:42
@ TRNG_CTRL_DATA_MSB
Definition neorv32_trng.h:39
@ TRNG_CTRL_IRQ_SEL
Definition neorv32_trng.h:44
@ TRNG_CTRL_SIM_MODE
Definition neorv32_trng.h:46
@ TRNG_CTRL_FIFO_CLR
Definition neorv32_trng.h:45
void neorv32_trng_fifo_clear(void)
Definition neorv32_trng.c:72
void neorv32_trng_enable(int irq_sel)
Definition neorv32_trng.c:42
int neorv32_trng_get(uint8_t *data)
Definition neorv32_trng.c:96
int neorv32_trng_check_sim_mode(void)
Definition neorv32_trng.c:117
int neorv32_trng_get_fifo_depth(void)
Definition neorv32_trng.c:83
void neorv32_trng_disable(void)
Definition neorv32_trng.c:63
int neorv32_trng_available(void)
Definition neorv32_trng.c:26
Definition neorv32_trng.h:29
uint32_t CTRL
Definition neorv32_trng.h:30