Function esp_idf_sys::esp_random
source · pub unsafe extern "C" fn esp_random() -> u32
Expand description
@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 is very short (always less than 100 CPU cycles).
@return Random value between 0 and UINT32_MAX