Smart Remote 3 nRF52 v1.2
Macros | Enumerations | Functions
Utility Functions and Definitions (Platform)

Various types and definitions available to all applications when using SoftDevice. More...

Macros

#define ANON_UNIONS_DISABLE
 Macro to disable anonymous unions from a certain point in the code. More...
 
#define ANON_UNIONS_ENABLE
 Macro to enable anonymous unions from a certain point in the code.
 
#define CONTROL_nPRIV_Msk   (1UL /*<< CONTROL_nPRIV_Pos*/)
 
#define CRITICAL_REGION_ENTER()   app_util_critical_region_enter(NULL)
 Macro for entering a critical region. More...
 
#define CRITICAL_REGION_EXIT()   app_util_critical_region_exit(0)
 Macro for leaving a critical region. More...
 
#define GCC_PRAGMA(v)
 Macro for adding pragma directive only for GCC.
 
#define IPSR_ISR_Msk   (0x1FFUL /*<< IPSR_ISR_Pos*/)
 
#define NRF_BREAKPOINT   __BKPT(0)
 Macro for setting a breakpoint.
 
#define NRF_BREAKPOINT_COND   NRF_BREAKPOINT
 Macro for setting a breakpoint. More...
 

Enumerations

enum  app_irq_priority_t { , APP_IRQ_PRIORITY_THREAD = _PRIO_THREAD }
 The interrupt priorities available to the application while the SoftDevice is active. More...
 

Functions

uint8_t current_int_priority_get (void)
 Function for finding the current interrupt level. More...
 
uint8_t privilege_level_get (void)
 Function for finding out the current privilege level. More...
 

Detailed Description

Various types and definitions available to all applications when using SoftDevice.

Macro Definition Documentation

#define ANON_UNIONS_DISABLE

Macro to disable anonymous unions from a certain point in the code.

Note
Call only after first calling ANON_UNIONS_ENABLE.
#define CONTROL_nPRIV_Msk   (1UL /*<< CONTROL_nPRIV_Pos*/)

CONTROL: nPRIV Mask

#define CRITICAL_REGION_ENTER ( )    app_util_critical_region_enter(NULL)

Macro for entering a critical region.

Note
Due to implementation details, there must exist one and only one call to CRITICAL_REGION_EXIT() for each call to CRITICAL_REGION_ENTER(), and they must be located in the same scope.
#define CRITICAL_REGION_EXIT ( )    app_util_critical_region_exit(0)

Macro for leaving a critical region.

Note
Due to implementation details, there must exist one and only one call to CRITICAL_REGION_EXIT() for each call to CRITICAL_REGION_ENTER(), and they must be located in the same scope.
#define IPSR_ISR_Msk   (0x1FFUL /*<< IPSR_ISR_Pos*/)

IPSR: ISR Mask

#define NRF_BREAKPOINT_COND   NRF_BREAKPOINT

Macro for setting a breakpoint.

If it is possible to detect debugger presence then it is set only in that case.

Enumeration Type Documentation

The interrupt priorities available to the application while the SoftDevice is active.

Enumerator
APP_IRQ_PRIORITY_THREAD 

"Interrupt level" when running in Thread Mode.

Function Documentation

uint8_t current_int_priority_get ( void  )

Function for finding the current interrupt level.

Returns
Current interrupt level.
Return values
APP_IRQ_PRIORITY_HIGHWe are running in Application High interrupt level.
APP_IRQ_PRIORITY_LOWWe are running in Application Low interrupt level.
APP_IRQ_PRIORITY_THREADWe are running in Thread Mode.
uint8_t privilege_level_get ( void  )

Function for finding out the current privilege level.

Returns
Current privilege level.
Return values
APP_LEVEL_UNPRIVILEGEDWe are running in unprivileged level.
APP_LEVEL_PRIVILEGEDWe are running in privileged level.

Documentation feedback | Developer Zone | Subscribe | Updated