Added thread rework, and cleaned up Tacos startup

This commit is contained in:
dario
2023-10-27 12:44:23 +02:00
parent 4efc0382f8
commit 5e23008b78
17 changed files with 194 additions and 52 deletions

View File

@@ -61,13 +61,16 @@ namespace sta
/**
* @brief This function is executed first when this thread is started.
*/
virtual void init() = 0;
virtual void init();
/**
* @brief The body of the thread's loop. Has to be implemented by the user.
*/
virtual void func() = 0;
virtual void cleanup();
private:
/**
@@ -75,8 +78,10 @@ namespace sta
*/
static void entry_point(void* arg);
private:
osThreadId_t instance_;
osThreadAttr_t attribs_;
bool running_;
};
}
}