Loading...
Searching...
No Matches

uwb-core DPL (Decawave Porting Layer) os abstraction layer More...

Detailed Description

uwb-core DPL (Decawave Porting Layer) os abstraction layer

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_os.h.

#include "os/os.h"
+ Include dependency graph for dpl_os.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef os_sr_t dpl_sr_t
 CPU status register.
 

Functions

static uint32_t dpl_hw_enter_critical (void)
 Disable ISRs.
 
static void dpl_hw_exit_critical (uint32_t ctx)
 Restores ISR context.
 
static bool dpl_hw_is_in_critical (void)
 Check if is in critical section.
 

Entering and exiting critical section defines

#define DPL_ENTER_CRITICAL(_sr)   (_sr = os_hw_enter_critical())
 
#define DPL_EXIT_CRITICAL(_sr)   (os_hw_exit_critical(_sr))
 
#define DPL_ASSERT_CRITICAL()   assert(os_hw_is_in_critical())
 

Macro Definition Documentation

◆ DPL_ASSERT_CRITICAL

#define DPL_ASSERT_CRITICAL ( )    assert(os_hw_is_in_critical())

Definition at line 35 of file dpl_os.h.

◆ DPL_ENTER_CRITICAL

#define DPL_ENTER_CRITICAL (   _sr)    (_sr = os_hw_enter_critical())

Definition at line 33 of file dpl_os.h.

◆ DPL_EXIT_CRITICAL

#define DPL_EXIT_CRITICAL (   _sr)    (os_hw_exit_critical(_sr))

Definition at line 34 of file dpl_os.h.

Typedef Documentation

◆ dpl_sr_t

typedef os_sr_t dpl_sr_t

CPU status register.

Definition at line 41 of file dpl_os.h.

Function Documentation

◆ dpl_hw_enter_critical()

static uint32_t dpl_hw_enter_critical ( void  )
inlinestatic

Disable ISRs.

Returns
current isr context

Definition at line 48 of file dpl_os.h.

◆ dpl_hw_exit_critical()

static void dpl_hw_exit_critical ( uint32_t  ctx)
inlinestatic

Restores ISR context.

Parameters
[in]ctxISR context to restore.

Definition at line 58 of file dpl_os.h.

◆ dpl_hw_is_in_critical()

static bool dpl_hw_is_in_critical ( void  )
inlinestatic

Check if is in critical section.

Returns
true, if in critical section, false otherwise

Definition at line 68 of file dpl_os.h.