mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-12-17 06:38:03 +00:00
Added basic task creating in manager task
This commit is contained in:
@@ -16,8 +16,17 @@
|
||||
|
||||
typedef StaticTask_t osStaticThreadDef_t;
|
||||
|
||||
|
||||
extern "C" void outputTask(void *);
|
||||
|
||||
|
||||
void startWorker(void *arg)
|
||||
{
|
||||
STA_DEBUG_PRINTLN("STARTED WORKER!");
|
||||
|
||||
osThreadExit();
|
||||
}
|
||||
|
||||
extern "C" void startManagerTask(void *)
|
||||
{
|
||||
STA_DEBUG_PRINTLN("INITIALIZED MANAGER TASK");
|
||||
@@ -40,9 +49,17 @@ extern "C" void startManagerTask(void *)
|
||||
STA_ASSERT_MSG(outputTaskHandle != nullptr, "outputTask initialization failed");
|
||||
*/
|
||||
|
||||
// Create thread using static allocation
|
||||
const osThreadAttr_t workerAttributes = {};
|
||||
|
||||
for (uint8_t i = 0; i < 5; i++)
|
||||
{
|
||||
osThreadNew(startWorker, NULL, &workerAttributes);
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
STA_DEBUG_PRINTLN("PING!");
|
||||
// STA_DEBUG_PRINTLN("MANAGING!");
|
||||
}
|
||||
|
||||
osThreadExit();
|
||||
|
||||
Reference in New Issue
Block a user