diff include/BeagleRT.h @ 174:1e629f126322

AuxiliaryTask can now be scheduled from setup(). Closes #1373
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 28 Dec 2015 13:53:11 +0100
parents 2877bc2cd449
children 9bfe04d184fb d7148d21aaa5
line wrap: on
line diff
--- a/include/BeagleRT.h	Mon Dec 28 04:11:59 2015 +0100
+++ b/include/BeagleRT.h	Mon Dec 28 13:53:11 2015 +0100
@@ -437,6 +437,7 @@
  * This function will stop the BeagleRT audio/sensor system. After this function returns, no further
  * calls to render() will be issued.
  */
+int BeagleRT_startAuxiliaryTask(AuxiliaryTask it);
 void BeagleRT_stopAudio();
 
 /**
@@ -580,6 +581,21 @@
 AuxiliaryTask BeagleRT_createAuxiliaryTask(void (*functionToCall)(void), int priority, const char *name);
 
 /**
+ * \brief Start an auxiliary task so that it can be run.
+ *
+ * This function will start an auxiliary task but will NOT schedule it.
+ * It will also set a flag in the associate InternalAuxiliaryTask to flag the
+ * task as "started", so that successive calls to the same function for a given AuxiliaryTask
+ * have no effect.
+ * The user should never be required to call this function directly, as it is called
+ * by BeagleRT_scheduleAuxiliaryTask if needed (e.g.: if a task is scheduled in setup() )
+ * or immediately after starting the audio thread.
+ *
+* \param task Task to start.
+ */
+
+int BeagleRT_startAuxiliaryTask(AuxiliaryTask task);
+/**
  * \brief Run an auxiliary task which has previously been created.
  *
  * This function will schedule an auxiliary task to run. When the task runs, the function in the first