esp_random.c 500 B

123456789101112131415161718192021
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * This is a STUB FILE used when compiling ESP-IDF to run tests on the host system.
  7. * The source file used normally for ESP-IDF has the same name but is located elsewhere.
  8. */
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <stdarg.h>
  12. #include <time.h>
  13. #include <string.h>
  14. #include <stddef.h>
  15. #include "esp_system.h"
  16. uint32_t esp_random(void)
  17. {
  18. return (uint32_t)rand();
  19. }