uwb-core DPL (Decawave Porting Layer) thread/task wrappers More...

Detailed Description

uwb-core DPL (Decawave Porting Layer) thread/task wrappers

Author
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr

Definition in file dpl_tasks.h.

#include "dpl_types.h"
#include "sched.h"
#include "thread.h"
+ Include dependency graph for dpl_tasks.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dpl_task
 dpl task wrapper More...
 

Typedefs

typedef thread_task_func_t dpl_task_func_t
 dpl task function
 

Functions

int dpl_task_init (struct dpl_task *t, const char *name, dpl_task_func_t func, void *arg, uint8_t prio, dpl_time_t sanity_itvl, dpl_stack_t *stack_bottom, uint16_t stack_size)
 Initialize a task. More...
 
int dpl_task_remove (struct dpl_task *t)
 removes specified task More...
 
uint8_t dpl_task_count (void)
 Return the number of tasks initialized. More...
 
void dpl_task_yield (void)
 Lets current thread yield.
 

Function Documentation

◆ dpl_task_count()

uint8_t dpl_task_count ( void  )

Return the number of tasks initialized.

Returns
number of tasks initialized

◆ dpl_task_init()

int dpl_task_init ( struct dpl_task t,
const char *  name,
dpl_task_func_t  func,
void *  arg,
uint8_t  prio,
dpl_time_t  sanity_itvl,
dpl_stack_t stack_bottom,
uint16_t  stack_size 
)

Initialize a task.

This function initializes the task structure pointed to by t, clearing and setting it's stack pointer, provides sane defaults and sets the task as ready to run, and inserts it into the operating system scheduler.

Parameters
[in]tthe task to initialize
[in]nametask name
[in]functask function to call
[in]argargument to pass in task init function
[in]priotask priority
[in]sanity_itvlUNUSED
[in]stack_bottompointer to bottom of the stack
[in]stack_sizetask stack size
Returns
0 on success, non-zero on failure.

◆ dpl_task_remove()

int dpl_task_remove ( struct dpl_task t)

removes specified task

NOTE: This interface is currently experimental and not ready for common use