Header file containing functions prototypes of RNG HAL library. More...
Go to the source code of this file.
Classes | |
struct | _rng_init |
RNG init structure definition. More... | |
struct | _rng_handle |
RNG handle Structure definition. More... | |
struct | _hal_rng_callback |
HAL_RNG Callback function definition. More... | |
Macros | |
#define | RNG_SEED_FR0_S0 LL_RNG_SEED_FR0_S0 |
#define | RNG_SEED_USER LL_RNG_SEED_USER |
#define | RNG_LFSR_MODE_59BIT LL_RNG_LFSR_MODE_59BIT |
#define | RNG_LFSR_MODE_128BIT LL_RNG_LFSR_MODE_128BIT |
#define | RNG_POST_PRO_NOT LL_RNG_POST_PRO_NOT |
#define | RNG_POST_PRO_SKIPPING LL_RNG_POST_PRO_SKIPPING |
#define | RNG_POST_PRO_COUNTING LL_RNG_POST_PRO_COUNTING |
#define | RNG_POST_PRO_NEUMANN LL_RNG_POST_PRO_NEUMANN |
#define | RNG_OUTPUT_FR0_S0 LL_RNG_OUTPUT_FR0_S0 |
#define | RNG_OUTPUT_CYCLIC_PARITY LL_RNG_OUTPUT_CYCLIC_PARITY |
#define | RNG_OUTPUT_CYCLIC LL_RNG_OUTPUT_CYCLIC |
#define | RNG_OUTPUT_LFSR_RNG LL_RNG_OUTPUT_LFSR_RNG |
#define | RNG_OUTPUT_LFSR LL_RNG_OUTPUT_LFSR |
Typedefs | |
typedef struct _rng_init | rng_init_t |
RNG init structure definition. More... | |
typedef struct _rng_handle | rng_handle_t |
RNG handle Structure definition. More... | |
typedef struct _hal_rng_callback | hal_rng_callback_t |
HAL_RNG Callback function definition. More... | |
Enumerations | |
enum | hal_rng_state_t { HAL_RNG_STATE_RESET = 0x00, HAL_RNG_STATE_READY = 0x01, HAL_RNG_STATE_BUSY = 0x02, HAL_RNG_STATE_TIMEOUT = 0x03, HAL_RNG_STATE_ERROR = 0x04 } |
HAL RNG State Enumerations definition. More... | |
Functions | |
hal_status_t | hal_rng_init (rng_handle_t *p_rng) |
Initialize the RNG according to the specified parameters in the rng_init_t of associated handle. More... | |
hal_status_t | hal_rng_deinit (rng_handle_t *p_rng) |
De-initialize the RNG peripheral. More... | |
void | hal_rng_msp_init (rng_handle_t *p_rng) |
Initialize the RNG MSP. More... | |
void | hal_rng_msp_deinit (rng_handle_t *p_rng) |
De-initialize the RNG MSP. More... | |
hal_status_t | hal_rng_generate_random_number (rng_handle_t *p_rng, uint16_t *p_seed, uint32_t *p_random32bit) |
Generate a 32-bit random number. More... | |
hal_status_t | hal_rng_generate_random_number_it (rng_handle_t *p_rng, uint16_t *p_seed) |
Generate a 32-bit random number in interrupt mode. More... | |
uint32_t | hal_rng_read_last_random_number (rng_handle_t *p_rng) |
Read the latest generated random number. More... | |
void | hal_rng_irq_handler (rng_handle_t *p_rng) |
Handle RNG interrupt request. More... | |
__weak void | hal_rng_ready_data_callback (rng_handle_t *p_rng, uint32_t random32bit) |
Data Ready callback in non-blocking mode. More... | |
hal_rng_state_t | hal_rng_get_state (rng_handle_t *p_rng) |
Return the RNG handle state. More... | |
hal_status_t | hal_rng_suspend_reg (rng_handle_t *p_rng) |
Suspend some registers related to RNG configuration before sleep. More... | |
hal_status_t | hal_rng_resume_reg (rng_handle_t *p_rng) |
Restore some registers related to RNG configuration after sleep. This function must be used in conjunction with the hal_rng_resume_reg(). More... | |
Header file containing functions prototypes of RNG HAL library.
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_hal_rng.h.