Peripheral Control functions.
More...
Peripheral Control functions.
==============================================================================
##### Peripheral Control functions #####
==============================================================================
[..]
This section provides functions allowing to:
(+) Generate Random Number.
(+) Handle RNG interrupt request and associated function callback.
◆ hal_rng_generate_random_number()
Generate a 32-bit random number.
- Parameters
-
[in] | p_rng | Pointer to a RNG handle which contains the configuration information for the specified RNG module. |
[in] | p_seed | user configured seeds. the seed is valid when seed_mode member of rng_init_t is configured as RNG_SEED_USER. If 59-bit random number is selected, the seed need to provide [0~58] bit spaces. If 128-bit random number is selected, the seed need to provide [0~127] bit spaces. |
[out] | p_random32bit | Pointer to generated random number variable if successful. |
- Return values
-
◆ hal_rng_generate_random_number_it()
Generate a 32-bit random number in interrupt mode.
- Parameters
-
[in] | p_rng | Pointer to a RNG handle which contains the configuration information for the specified RNG module. |
[in] | p_seed | user configured seeds. the seed is valid when seed_mode member of rng_init_t is configured as RNG_SEED_USER. If 59-bit random number is selected, the seed need to provide [0~58] bit spaces. If 128-bit random number is selected, the seed need to provide [0~127] bit spaces. |
- Return values
-
◆ hal_rng_read_last_random_number()
uint32_t hal_rng_read_last_random_number |
( |
rng_handle_t * |
p_rng | ) |
|
Read the latest generated random number.
- Parameters
-
[in] | p_rng | Pointer to a RNG handle which contains the configuration information for the specified RNG module. |
- Return values
-