libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
Cortex Core Defines

libopencm3 Defined Constants and Types for the Cortex Core More...

Collaboration diagram for Cortex Core Defines:

Modules

 Cortex Core Atomic support Defines
 Atomic operation support.
 

Functions

static void cm_enable_interrupts (void)
 Cortex M Enable interrupts. More...
 
static void cm_disable_interrupts (void)
 Cortex M Disable interrupts. More...
 
static void cm_enable_faults (void)
 Cortex M Enable faults. More...
 
static void cm_disable_faults (void)
 Cortex M Disable faults. More...
 
static bool cm_is_masked_interrupts (void)
 Cortex M Check if interrupts are masked. More...
 
static bool cm_is_masked_faults (void)
 Cortex M Check if Fault interrupt is masked. More...
 
static uint32_t cm_mask_interrupts (uint32_t mask)
 Cortex M Mask interrupts. More...
 
static uint32_t cm_mask_faults (uint32_t mask)
 Cortex M Mask HardFault interrupt. More...
 

Detailed Description

libopencm3 Defined Constants and Types for the Cortex Core

Version
1.0.0

LGPL License Terms libopencm3 License

Function Documentation

◆ cm_disable_faults()

static void cm_disable_faults ( void  )
inlinestatic

Cortex M Disable faults.

Mask the HardFault interrupt globally

Definition at line 74 of file cortex.h.

◆ cm_disable_interrupts()

static void cm_disable_interrupts ( void  )
inlinestatic

Cortex M Disable interrupts.

Mask all interrupts globally

Definition at line 54 of file cortex.h.

◆ cm_enable_faults()

static void cm_enable_faults ( void  )
inlinestatic

Cortex M Enable faults.

Disable the HardFault mask and enable fault interrupt globally

Definition at line 64 of file cortex.h.

◆ cm_enable_interrupts()

static void cm_enable_interrupts ( void  )
inlinestatic

Cortex M Enable interrupts.

Disable the interrupt mask and enable interrupts globally

Definition at line 44 of file cortex.h.

◆ cm_is_masked_faults()

static bool cm_is_masked_faults ( void  )
inlinestatic

Cortex M Check if Fault interrupt is masked.

Checks, if HardFault interrupt is masked (disabled).

Returns
bool true, if HardFault interrupt is disabled.

Definition at line 103 of file cortex.h.

◆ cm_is_masked_interrupts()

static bool cm_is_masked_interrupts ( void  )
inlinestatic

Cortex M Check if interrupts are masked.

Checks, if interrupts are masked (disabled).

Returns
true, if interrupts are disabled.

Definition at line 87 of file cortex.h.

◆ cm_mask_faults()

static uint32_t cm_mask_faults ( uint32_t  mask)
inlinestatic

Cortex M Mask HardFault interrupt.

This function switches the mask of the HardFault interrupt. If mask is true, the HardFault interrupt will be disabled. The result of this function can be used for restoring previous state of the mask.

Parameters
[in]maskuint32_t New state of the HardFault interrupt mask
Returns
uint32_t old state of the HardFault interrupt mask

Definition at line 143 of file cortex.h.

◆ cm_mask_interrupts()

static uint32_t cm_mask_interrupts ( uint32_t  mask)
inlinestatic

Cortex M Mask interrupts.

This function switches the mask of the interrupts. If mask is true, the interrupts will be disabled. The result of this function can be used for restoring previous state of the mask.

Parameters
[in]maskuint32_t New state of the interrupt mask
Returns
uint32_t old state of the interrupt mask

Definition at line 122 of file cortex.h.

Referenced by __cm_atomic_set().

Here is the caller graph for this function: