mirror of https://github.com/meshcore-dev/MeshCore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.5 KiB
52 lines
1.5 KiB
#include <Arduino.h>
|
|
#include "defines.h"
|
|
#include "tasks.h"
|
|
//#include <MyDebug.h>
|
|
#include "vars.h"
|
|
|
|
// Tasks
|
|
TaskHandle_t t_core1_lvgl;
|
|
//TaskHandle_t t_core1_clock;
|
|
#ifdef USE_OPEN_WEATHER
|
|
TaskHandle_t t_core1_openWeather;
|
|
#endif
|
|
|
|
void createTasks() {
|
|
Serial.println("Creating Tasks...");
|
|
|
|
xTaskCreatePinnedToCore(
|
|
lvgl_task, // Task function.
|
|
"LVGL_Manager", // Name of task.
|
|
10000, // Stack size of task
|
|
NULL, // Parameter of the task
|
|
5, // Priority of the task
|
|
&t_core1_lvgl, // Task handle to keep track of created task
|
|
0); // Pin task to core 0
|
|
|
|
// xTaskCreatePinnedToCore(
|
|
// clock_task, // Task function.
|
|
// "CLOCK_Manager", // Name of task.
|
|
// 10000, // Stack size of task
|
|
// NULL, // Parameter of the task
|
|
// 4, // Priority of the task
|
|
// &t_core1_clock, // Task handle to keep track of created task
|
|
// 1); // Pin task to core 0
|
|
|
|
#ifdef USE_OPEN_WEATHER
|
|
xTaskCreatePinnedToCore(
|
|
openWeather_task, // Task function.
|
|
"OpenWeather_Manager", // Name of task.
|
|
10000, // Stack size of task
|
|
NULL, // Parameter of the task
|
|
3, // Priority of the task
|
|
&t_core1_openWeather, // Task handle to keep track of created task
|
|
1); // Pin task to core 0
|
|
|
|
#endif
|
|
|
|
Serial.println("All tasks created\nStarting tasks...");
|
|
|
|
vTaskResume(t_core1_lvgl);
|
|
//vTaskResume(t_core1_clock);
|
|
|
|
}
|
|
|