mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(rng): move rng read data function to rng_ll.h and update docs of RNG source
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "soc/soc.h"
|
||||
#include "soc/lpperi_reg.h"
|
||||
#include "soc/lpperi_struct.h"
|
||||
#include "hal/lp_clkrst_ll.h"
|
||||
|
||||
@@ -17,6 +19,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Read random data from RNG
|
||||
*
|
||||
* @return 32-bit random data
|
||||
*/
|
||||
static inline uint32_t rng_ll_read_data(void)
|
||||
{
|
||||
return REG_READ(LPPERI_RNG_DATA_SYNC_REG);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable or disable RNG sampling.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user