2016-10-06 13:21:30 +02:00
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
2016-12-12 01:12:13 +01:00
|
|
|
#include "Arduino.h"
|
2016-10-06 13:21:30 +02:00
|
|
|
|
2016-11-18 14:07:25 +01:00
|
|
|
#if CONFIG_AUTOSTART_ARDUINO
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
void loopTask(void *pvParameters)
|
|
|
|
{
|
2016-12-12 01:12:13 +01:00
|
|
|
setup();
|
2016-10-06 13:21:30 +02:00
|
|
|
for(;;) {
|
|
|
|
loop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void app_main()
|
|
|
|
{
|
2016-11-18 14:07:25 +01:00
|
|
|
initArduino();
|
2016-10-06 17:16:00 +02:00
|
|
|
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, 1);
|
2016-10-06 13:21:30 +02:00
|
|
|
}
|
|
|
|
|
2016-11-18 14:07:25 +01:00
|
|
|
#endif
|
2017-01-17 11:45:03 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
** Block below to be removed with next toolchain
|
|
|
|
*/
|
|
|
|
void *operator new(size_t size)
|
|
|
|
{
|
|
|
|
return malloc(size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void *operator new[](size_t size)
|
|
|
|
{
|
|
|
|
return malloc(size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void operator delete(void * ptr)
|
|
|
|
{
|
|
|
|
free(ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
void operator delete[](void * ptr)
|
|
|
|
{
|
|
|
|
free(ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
|
|
|
|
extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
|
|
|
|
|
|
|
|
void __cxa_pure_virtual(void)
|
|
|
|
{
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
|
|
|
void __cxa_deleted_virtual(void)
|
|
|
|
{
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|