Select one of the symbols to view example projects that use it.
 
Outline
#define __ESP_RANDOM_H__
#include <stddef.h>
#include <stdint.h>
esp_random();
esp_fill_random(void *, size_t);
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/esp_hw_support/include/esp_random.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #ifndef __ESP_RANDOM_H__ #define __ESP_RANDOM_H__ #include <stddef.h> #include <stdint.h> #ifdef __cplusplus extern "C" { #endif /** * @brief Get one random 32-bit word from hardware RNG * * If Wi-Fi or Bluetooth are enabled, this function returns true random numbers. In other * situations, if true random numbers are required then consult the ESP-IDF Programming * Guide "Random Number Generation" section for necessary prerequisites. * * This function automatically busy-waits to ensure enough external entropy has been * introduced into the hardware RNG state, before returning a new random number. * This delay makes sure the reading frequency does not exceed 15-75 KHz. The actual * value is dependent on the specific chip. More information on this can be found in * components/esp_hw_support/hw_random.c. * * @return Random value between 0 and UINT32_MAX *//* ... */ uint32_t esp_random(void); /** * @brief Fill a buffer with random bytes from hardware RNG * * @note This function is implemented via calls to esp_random(), so the same * constraints apply. * * @param buf Pointer to buffer to fill with random numbers. * @param len Length of buffer in bytes *//* ... */ void esp_fill_random(void *buf, size_t len); #ifdef __cplusplus }{...} #endif /* ... */ #endif /* __ESP_RANDOM_H__ */
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.