| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Global Interrupt Macros
Common Utility Headers - LPCUSBlib/Common/Common.h

## Detailed Description

Convenience macros for the management of interrupts globally within the device.

Macros and functions to create and control global interrupts within the device.

## Functions
static PRAGMA_ALWAYS_INLINE uint_reg_t | GetGlobalInterruptMask (void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT
static PRAGMA_ALWAYS_INLINE void | SetGlobalInterruptMask (const uint_reg_t GlobalIntState) ATTR_ALWAYS_INLINE
static PRAGMA_ALWAYS_INLINE void | GlobalInterruptEnable (void) ATTR_ALWAYS_INLINE
static PRAGMA_ALWAYS_INLINE void | GlobalInterruptDisable (void) ATTR_ALWAYS_INLINE

## Function Documentation

static uint_reg_t GetGlobalInterruptMask | ( | void |  | ) |
| inline static

Retrieves a mask which contains the current state of the global interrupts for the device. This value can be stored before altering the global interrupt enable state, before restoring the flag(s) back to their previous values after a critical section using SetGlobalInterruptMask().

Returns
  Mask containing the current Global Interrupt Enable Mask bit(s).

Definition at line 205 of file Common.h.

static void GlobalInterruptDisable | ( | void |  | ) |
| inline static

Disabled global interrupt handling for the device, preventing interrupts from being handled.

Definition at line 249 of file Common.h.

static void GlobalInterruptEnable | ( | void |  | ) |
| inline static

Enables global interrupt handling for the device, allowing interrupts to be handled.

Definition at line 236 of file Common.h.

static void SetGlobalInterruptMask | ( | const uint_reg_t | GlobalIntState | ) |
| inline static

Sets the global interrupt enable state of the microcontroller to the mask passed into the function. This can be combined with GetGlobalInterruptMask() to save and restore the Global Interrupt Enable Mask bit(s) of the device after a critical section has completed.

Parameters

  GlobalIntState | Global Interrupt Enable Mask value to use

Definition at line 223 of file Common.h.