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 - 2025 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
13
14#ifndef NEORV32_TRNG_H
15#define NEORV32_TRNG_H
16
17#include <stdint.h>
18
19
20/**********************************************************************/
25typedef volatile struct __attribute__((packed,aligned(4))) {
26 uint32_t CTRL;
27 const uint32_t DATA;
29
31#define NEORV32_TRNG ((neorv32_trng_t*) (NEORV32_TRNG_BASE))
32
42
48
49
50
51/**********************************************************************/
56void neorv32_trng_enable(void);
57void neorv32_trng_disable(void);
61uint8_t neorv32_trng_data_get(void);
64
65
66#endif // NEORV32_TRNG_H
NEORV32_TRNG_CTRL_enum
Definition neorv32_trng.h:34
@ TRNG_CTRL_EN
Definition neorv32_trng.h:35
@ TRNG_CTRL_FIFO_LSB
Definition neorv32_trng.h:37
@ TRNG_CTRL_FIFO_MSB
Definition neorv32_trng.h:38
@ TRNG_CTRL_SIM_MODE
Definition neorv32_trng.h:39
@ TRNG_CTRL_FIFO_CLR
Definition neorv32_trng.h:36
@ TRNG_CTRL_AVAIL
Definition neorv32_trng.h:40
NEORV32_TRNG_DATA_enum
Definition neorv32_trng.h:44
@ TRNG_DATA_LSB
Definition neorv32_trng.h:45
@ TRNG_DATA_MSB
Definition neorv32_trng.h:46
void neorv32_trng_fifo_clear(void)
Definition neorv32_trng.c:57
int neorv32_trng_data_avail(void)
Definition neorv32_trng.c:80
int neorv32_trng_check_sim_mode(void)
Definition neorv32_trng.c:105
uint8_t neorv32_trng_data_get(void)
Definition neorv32_trng.c:92
int neorv32_trng_get_fifo_depth(void)
Definition neorv32_trng.c:68
void neorv32_trng_disable(void)
Definition neorv32_trng.c:48
int neorv32_trng_available(void)
Definition neorv32_trng.c:22
void neorv32_trng_enable(void)
Definition neorv32_trng.c:31
Definition neorv32_trng.h:25
const uint32_t DATA
Definition neorv32_trng.h:27
uint32_t CTRL
Definition neorv32_trng.h:26