Mercurial > hg > beaglert
comparison core/RTAudio.cpp @ 47:643cbee74eda newapi
First draft of Doxygen documentation
author | andrewm |
---|---|
date | Thu, 28 May 2015 17:06:03 -0400 |
parents | 579c86316008 |
children | be427da6fb9c |
comparison
equal
deleted
inserted
replaced
46:eac5d8f40b48 | 47:643cbee74eda |
---|---|
273 | 273 |
274 // Create a calculation loop which can run independently of the audio, at a different | 274 // Create a calculation loop which can run independently of the audio, at a different |
275 // (equal or lower) priority. Audio priority is defined in BEAGLERT_AUDIO_PRIORITY; | 275 // (equal or lower) priority. Audio priority is defined in BEAGLERT_AUDIO_PRIORITY; |
276 // priority should be generally be less than this. | 276 // priority should be generally be less than this. |
277 // Returns an (opaque) pointer to the created task on success; 0 on failure | 277 // Returns an (opaque) pointer to the created task on success; 0 on failure |
278 AuxiliaryTask createAuxiliaryTaskLoop(void (*functionToCall)(void), int priority, const char *name) | 278 AuxiliaryTask BeagleRT_createAuxiliaryTask(void (*functionToCall)(void), int priority, const char *name) |
279 { | 279 { |
280 InternalAuxiliaryTask *newTask = (InternalAuxiliaryTask*)malloc(sizeof(InternalAuxiliaryTask)); | 280 InternalAuxiliaryTask *newTask = (InternalAuxiliaryTask*)malloc(sizeof(InternalAuxiliaryTask)); |
281 | 281 |
282 // Attempt to create the task | 282 // Attempt to create the task |
283 if(rt_task_create(&(newTask->task), name, 0, priority, T_JOINABLE | T_FPU)) { | 283 if(rt_task_create(&(newTask->task), name, 0, priority, T_JOINABLE | T_FPU)) { |
296 return (AuxiliaryTask)newTask; | 296 return (AuxiliaryTask)newTask; |
297 } | 297 } |
298 | 298 |
299 // Schedule a previously created auxiliary task. It will run when the priority rules next | 299 // Schedule a previously created auxiliary task. It will run when the priority rules next |
300 // allow it to be scheduled. | 300 // allow it to be scheduled. |
301 void scheduleAuxiliaryTask(AuxiliaryTask task) | 301 void BeagleRT_scheduleAuxiliaryTask(AuxiliaryTask task) |
302 { | 302 { |
303 InternalAuxiliaryTask *taskToSchedule = (InternalAuxiliaryTask *)task; | 303 InternalAuxiliaryTask *taskToSchedule = (InternalAuxiliaryTask *)task; |
304 | 304 |
305 rt_task_resume(&taskToSchedule->task); | 305 rt_task_resume(&taskToSchedule->task); |
306 } | 306 } |