Header file containing functions prototypes of RNG LL library. More...
#include "gr55xx.h"
Go to the source code of this file.
Classes | |
struct | _ll_rng_init |
LL RNG Init Structure definition. More... | |
Macros | |
#define | LL_RNG_SEED_FR0_S0 (4UL << RNG_CONFIG_LFSR_SEED_SEL_Pos) |
LFSR seed is from the switching oscillator s0. More... | |
#define | LL_RNG_SEED_USER (6UL << RNG_CONFIG_LFSR_SEED_SEL_Pos) |
LFSR seed is configured by users. More... | |
#define | LL_RNG_LFSR_MODE_59BIT (0x00000000UL) |
59 bit LFSR. More... | |
#define | LL_RNG_LFSR_MODE_128BIT (1UL << RNG_CONFIG_LFSR_MODE_Pos) |
128 bit LFSR. More... | |
#define | LL_RNG_POST_PRO_NOT (0x00000000UL) |
No post process. More... | |
#define | LL_RNG_POST_PRO_SKIPPING (1UL << RNG_CONFIG_POST_MODE_Pos) |
bit skipping. More... | |
#define | LL_RNG_POST_PRO_COUNTING (2UL << RNG_CONFIG_POST_MODE_Pos) |
bit counting. More... | |
#define | LL_RNG_POST_PRO_NEUMANN (3UL << RNG_CONFIG_POST_MODE_Pos) |
Von-Neumann. More... | |
#define | LL_RNG_IT_DISABLE (0x00000000UL) |
Disable RNG interrupt. More... | |
#define | LL_RNG_IT_ENABLE (1UL << RNG_CONFIG_IRQ_EN_Pos) |
Enable RNG interrupt. More... | |
#define | LL_RNG_OUTPUT_FR0_S0 (4UL << RNG_CONFIG_OUT_MODE_Pos) |
Digital RNG direct output, ring oscillator s0. More... | |
#define | LL_RNG_OUTPUT_CYCLIC_PARITY (6UL << RNG_CONFIG_OUT_MODE_Pos) |
LFSR and RNG cyclic sampling and parity generation. More... | |
#define | LL_RNG_OUTPUT_CYCLIC (7UL << RNG_CONFIG_OUT_MODE_Pos) |
LFSR and RNG cyclic sampling. More... | |
#define | LL_RNG_OUTPUT_LFSR_RNG (8UL << RNG_CONFIG_OUT_MODE_Pos) |
LFSR ⊕ RNG. More... | |
#define | LL_RNG_OUTPUT_LFSR (9UL << RNG_CONFIG_OUT_MODE_Pos) |
LFSR direct output. More... | |
#define | LL_RNG_WriteReg(__instance__, __REG__, __VALUE__) WRITE_REG(__instance__->__REG__, (__VALUE__)) |
Write a value in RNG register. More... | |
#define | LL_RNG_ReadReg(__instance__, __REG__) READ_REG(__instance__->__REG__) |
Read a value in RNG register. More... | |
Typedefs | |
typedef struct _ll_rng_init | ll_rng_init_t |
LL RNG Init Structure definition. More... | |
Functions | |
__STATIC_INLINE void | ll_rng_enable (rng_regs_t *RNGx) |
Enable Random Number Generation. More... | |
__STATIC_INLINE void | ll_rng_disable (rng_regs_t *RNGx) |
Disable Random Number Generation. More... | |
__STATIC_INLINE uint32_t | ll_rng_is_enabled (rng_regs_t *RNGx) |
Check if Random Number Generator is enabled. More... | |
__STATIC_INLINE void | ll_rng_enable_fro (rng_regs_t *RNGx) |
Enable Ring oscillator TRNG enabled signal. More... | |
__STATIC_INLINE void | ll_rng_disable_fro (rng_regs_t *RNGx) |
Disable Ring oscillator TRNG enabled signal. More... | |
__STATIC_INLINE uint32_t | ll_rng_fro_is_enabled (rng_regs_t *RNGx) |
Check if Ring oscillator TRNG enabled signal is enabled. More... | |
__STATIC_INLINE void | ll_rng_set_lfsr_seed (rng_regs_t *RNGx, uint32_t seed) |
Set source of LFSR seed. More... | |
__STATIC_INLINE uint32_t | ll_rng_get_lfsr_seed (rng_regs_t *RNGx) |
Get source of LFSR seed. More... | |
__STATIC_INLINE void | ll_rng_set_lfsr_mode (rng_regs_t *RNGx, uint32_t mode) |
Set LFSR configuration mode. More... | |
__STATIC_INLINE uint32_t | ll_rng_get_lfsr_mode (rng_regs_t *RNGx) |
Get LFSR configuration mode. More... | |
__STATIC_INLINE void | ll_rng_set_post_mode (rng_regs_t *RNGx, uint32_t post) |
Set RNG post-process configuration. More... | |
__STATIC_INLINE uint32_t | ll_rng_get_post_mode (rng_regs_t *RNGx) |
Get RNG post-process configuration. More... | |
__STATIC_INLINE void | ll_rng_set_output_mode (rng_regs_t *RNGx, uint32_t mode) |
set RNG output mode. More... | |
__STATIC_INLINE uint32_t | ll_rng_get_output_mode (rng_regs_t *RNGx) |
get RNG output mode. More... | |
__STATIC_INLINE void | ll_rng_set_trdy_time (rng_regs_t *RNGx, uint32_t time) |
set the waiting time that RNG input reaches stable. More... | |
__STATIC_INLINE uint32_t | ll_rng_get_trdy_time (rng_regs_t *RNGx) |
get the waiting time that RNG input reaches stable. More... | |
__STATIC_INLINE void | ll_rng_set_user_seed (rng_regs_t *RNGx, uint32_t seed) |
set RNG seed configured by user. More... | |
__STATIC_INLINE uint32_t | ll_rng_is_active_flag_lr (rng_regs_t *RNGx) |
Indicate if the Flag of RNG long run test is set or not. More... | |
__STATIC_INLINE uint32_t | ll_rng_is_active_flag_sts (rng_regs_t *RNGx) |
Indicate if the RNG Status Flag is set or not. More... | |
__STATIC_INLINE void | ll_rng_clear_flag_sts (rng_regs_t *RNGx) |
Clear RNG Status flag. More... | |
__STATIC_INLINE void | ll_rng_enable_it (rng_regs_t *RNGx) |
Enable Random Number Generator Interrupt. More... | |
__STATIC_INLINE void | ll_rng_disable_it (rng_regs_t *RNGx) |
Disable Random Number Generator Interrupt. More... | |
__STATIC_INLINE uint32_t | ll_rng_is_enabled_it (rng_regs_t *RNGx) |
Check if Random Number Generator Interrupt is enabled. More... | |
__STATIC_INLINE uint32_t | ll_rng_read_random_data32 (rng_regs_t *RNGx) |
Return32-bit Random Number value. More... | |
__STATIC_INLINE uint32_t | ll_rng_read_lr_count (rng_regs_t *RNGx) |
Return8-bit RNG Long Run Test counts. More... | |
error_status_t | ll_rng_deinit (rng_regs_t *RNGx) |
De-initialize the RNG registers to their default reset values. More... | |
error_status_t | ll_rng_init (rng_regs_t *RNGx, ll_rng_init_t *p_rng_init) |
Initialize RNG registers according to the specified parameters in p_rng_init. More... | |
void | ll_rng_struct_init (ll_rng_init_t *p_rng_init) |
Set each field of a ll_rng_init_t type structure to default value. More... | |
Header file containing functions prototypes of RNG LL library.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file gr55xx_ll_rng.h.