Loading...
Searching...
No Matches

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 "os/os_task.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 os_task_func_t dpl_task_func_t
 dpl task function
 

Functions

static 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.
 
static int dpl_task_remove (struct dpl_task *t)
 removes specified task
 
static uint8_t dpl_task_count (void)
 Return the number of tasks initialized.
 
static void dpl_task_yield (void)
 Lets current thread yield.
 

Typedef Documentation

◆ dpl_task_func_t

typedef os_task_func_t dpl_task_func_t

dpl task function

Definition at line 39 of file dpl_tasks.h.

Function Documentation

◆ dpl_task_count()

static uint8_t dpl_task_count ( void  )
inlinestatic

Return the number of tasks initialized.

Returns
number of tasks initialized

Definition at line 81 of file dpl_tasks.h.

◆ dpl_task_init()

static 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 
)
inlinestatic

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.

Definition at line 60 of file dpl_tasks.h.

◆ dpl_task_remove()

static int dpl_task_remove ( struct dpl_task t)
inlinestatic

removes specified task

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

Definition at line 71 of file dpl_tasks.h.

◆ dpl_task_yield()

static void dpl_task_yield ( void  )
inlinestatic

Lets current thread yield.

Definition at line 89 of file dpl_tasks.h.