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;
31 const uint32_t DATA;
33
35#define NEORV32_TRNG ((neorv32_trng_t*) (NEORV32_TRNG_BASE))
36
46
55/**********************************************************************/
60void neorv32_trng_enable(void);
61void neorv32_trng_disable(void);
64int neorv32_trng_get(uint8_t *data);
69#endif // neorv32_trng_h
NEORV32_TRNG_CTRL_enum
Definition neorv32_trng.h:38
@ TRNG_CTRL_EN
Definition neorv32_trng.h:39
@ TRNG_CTRL_FIFO_LSB
Definition neorv32_trng.h:41
@ TRNG_CTRL_FIFO_MSB
Definition neorv32_trng.h:42
@ TRNG_CTRL_SIM_MODE
Definition neorv32_trng.h:43
@ TRNG_CTRL_FIFO_CLR
Definition neorv32_trng.h:40
@ TRNG_CTRL_AVAIL
Definition neorv32_trng.h:44
NEORV32_TRNG_DATA_enum
Definition neorv32_trng.h:48
@ TRNG_DATA_LSB
Definition neorv32_trng.h:49
@ TRNG_DATA_MSB
Definition neorv32_trng.h:50
void neorv32_trng_fifo_clear(void)
Definition neorv32_trng.c:66
int neorv32_trng_get(uint8_t *data)
Definition neorv32_trng.c:90
int neorv32_trng_check_sim_mode(void)
Definition neorv32_trng.c:109
int neorv32_trng_get_fifo_depth(void)
Definition neorv32_trng.c:77
void neorv32_trng_disable(void)
Definition neorv32_trng.c:57
int neorv32_trng_available(void)
Definition neorv32_trng.c:26
void neorv32_trng_enable(void)
Definition neorv32_trng.c:40
Definition neorv32_trng.h:29
const uint32_t DATA
Definition neorv32_trng.h:31
uint32_t CTRL
Definition neorv32_trng.h:30