Juergen Marsch bae5e8256a Revert "Merge pull request #983 from jumjum123/ESP32"
This reverts commit 3d464618227d8d6f5040bff6c8e41a447a6d6f25, reversing
changes made to 1d8fd4aa72e99a875eb7efe70c3d4700dd0d27b1.

merge was done with "old changes"
2016-12-01 17:15:50 +01:00

40 lines
889 B
C

#include "freertos/FreeRTOS.h"
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include <stdio.h>
#include <jsdevices.h>
#include <jsinteractive.h>
extern void jswrap_ESP32_wifi_restore(void) ;
static void espruinoTask(void *data) {
vTaskDelay(1000 / portTICK_PERIOD_MS);
printf("Espruino on ESP32 starting ...\n");
jshInit(); // Initialize the hardware
jsvInit(); // Initialize the variables
jsiInit(true); // Initialize the interactive subsystem
jswrap_ESP32_wifi_restore();
while(1) {
jsiLoop(); // Perform the primary loop processing
}
}
/**
* The main entry point into Espruino on an ESP32.
*/
int app_main(void)
{
nvs_flash_init();
system_init();
tcpip_adapter_init();
xTaskCreatePinnedToCore(&espruinoTask, "espruinoTask", 10000, NULL, 5, NULL, 0);
return 0;
}