27 lines
898 B
C
27 lines
898 B
C
#include "main.h"
|
|
|
|
#include "FreeRTOS.h"
|
|
#include "task.h"
|
|
|
|
#include "tasks/heartbeat_task.h"
|
|
#include "tasks/sensor_task.h"
|
|
#include "tasks/requester_task.h"
|
|
#include "libshunt/shunt_task.h"
|
|
|
|
int my_main()
|
|
{
|
|
// Init
|
|
libshunt_task_preinit();
|
|
|
|
// Create tasks
|
|
xTaskCreateStatic(heartbeat_task_main, "heartbeat", HEARTBEAT_TASK_STACK_DEPTH, NULL, HEARTBEAT_TASK_PRIORITY, _heartbeat_task_stack, &_heartbeat_task);
|
|
xTaskCreateStatic(sensor_task_main, "sensor", SENSOR_TASK_STACK_DEPTH, NULL, SENSOR_TASK_PRIORITY, _sensor_task_stack, &_sensor_task);
|
|
xTaskCreateStatic(requester_task_main, "requester", REQUESTER_TASK_STACK_DEPTH, NULL, REQUESTER_TASK_PRIORITY, _requester_task_stack, &_requester_task);
|
|
xTaskCreateStatic(libshunt_task_main, "shunt", LIBSHUNT_TASK_STACK_DEPTH, NULL, LIBSHUNT_TASK_PRIORITY, _libshunt_task_stack, &_libshunt_task);
|
|
|
|
// Run
|
|
vTaskStartScheduler();
|
|
|
|
return 0;
|
|
}
|