idf5_main.c 671 B

12345678910111213141516171819202122232425262728
  1. /* Esptouch example
  2. This example code is in the Public Domain (or CC0 licensed, at your option.)
  3. Unless required by applicable law or agreed to in writing, this
  4. software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied.
  6. */
  7. #include <string.h>
  8. #include <stdlib.h>
  9. #include "esp_event.h"
  10. #include "esp_system.h"
  11. #include "nvs_flash.h"
  12. extern int luat_main (void);
  13. extern void bootloader_random_enable(void);
  14. extern void luat_heap_init(void);
  15. void app_main(void)
  16. {
  17. bootloader_random_enable();
  18. nvs_flash_init();
  19. luat_heap_init();
  20. esp_event_loop_create_default();
  21. luat_main();
  22. }