Microchip® Advanced Software Framework

system_interrupt.h File Reference

SAM System Interrupt Driver.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>
#include <core_cm0plus.h>
#include "system_interrupt_features.h"

Enumerations

enum  system_interrupt_priority_level {
  SYSTEM_INTERRUPT_PRIORITY_LEVEL_0 = 0,
  SYSTEM_INTERRUPT_PRIORITY_LEVEL_1 = 1,
  SYSTEM_INTERRUPT_PRIORITY_LEVEL_2 = 2,
  SYSTEM_INTERRUPT_PRIORITY_LEVEL_3 = 3
}
 Table of possible system interrupt/exception vector priorities. More...
 

Functions

Critical Section Management
static void system_interrupt_enter_critical_section (void)
 Enters a critical section. More...
 
static void system_interrupt_leave_critical_section (void)
 Leaves a critical section. More...
 
Interrupt Enabling/Disabling
static bool system_interrupt_is_global_enabled (void)
 Check if global interrupts are enabled. More...
 
static void system_interrupt_enable_global (void)
 Enables global interrupts. More...
 
static void system_interrupt_disable_global (void)
 Disables global interrupts. More...
 
static bool system_interrupt_is_enabled (const enum system_interrupt_vector vector)
 Checks if an interrupt vector is enabled or not. More...
 
static void system_interrupt_enable (const enum system_interrupt_vector vector)
 Enable interrupt vector. More...
 
static void system_interrupt_disable (const enum system_interrupt_vector vector)
 Disable interrupt vector. More...
 
Interrupt State Management
static enum system_interrupt_vector system_interrupt_get_active (void)
 Get active interrupt (if any). More...
 
bool system_interrupt_is_pending (const enum system_interrupt_vector vector)
 Check if a interrupt line is pending. More...
 
enum status_code system_interrupt_set_pending (const enum system_interrupt_vector vector)
 Set a interrupt vector as pending. More...
 
enum status_code system_interrupt_clear_pending (const enum system_interrupt_vector vector)
 Clear pending interrupt vector. More...
 
Interrupt Priority Management
enum status_code system_interrupt_set_priority (const enum system_interrupt_vector vector, const enum system_interrupt_priority_level priority_level)
 Set interrupt vector priority level. More...
 
enum
system_interrupt_priority_level 
system_interrupt_get_priority (const enum system_interrupt_vector vector)
 Get interrupt vector priority level. More...