diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ch.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/ch.hpp b/src/lib/ch.hpp index 177e9bb46..4b4ef196e 100644 --- a/src/lib/ch.hpp +++ b/src/lib/ch.hpp @@ -195,11 +195,26 @@ namespace chibios_rt { public:
const char *name;
+ /**
+ * Full constructor. It allows to set a priority level for the new thread
+ * and specify the special option flags.
+ */
EnhancedThread(const char *tname, tprio_t prio, tmode_t mode) :
BaseThread(prio, mode, wa, sizeof wa) {
name = tname;
}
+
+ /**
+ * Simplified constructor, it allows to create a thread by simply
+ * specifying a name. In is assumed /p NORMALPRIO as initial priority
+ * and no special option flags.
+ */
+ EnhancedThread(const char *tname) :
+ BaseThread(NORMALPRIO, 0, wa, sizeof wa) {
+
+ name = tname;
+ }
};
#ifdef CH_USE_SEMAPHORES
|