Modules | |
Deprecated interrupt definitions | |
Functions | |
void | cpu_irq_enter_critical (void) |
void | cpu_irq_leave_critical (void) |
Variables | |
static volatile uint32_t | cpu_irq_critical_section_counter |
static volatile bool | cpu_irq_prev_interrupt_state |
volatile bool | g_interrupt_enabled |
Interrupt Service Routine definition | |
#define | ISR(func) void func (void) |
Define service routine. More... | |
#define | irq_initialize_vectors() |
Initialize interrupt vectors. More... | |
#define | irq_register_handler(int_num, int_prio) |
Register handler for interrupt. More... | |
Global interrupt flags | |
typedef uint32_t | irqflags_t |
Type used for holding state of interrupt flag. More... | |
static irqflags_t | cpu_irq_save (void) |
Get and clear the global interrupt flags. More... | |
static bool | cpu_irq_is_enabled_flags (irqflags_t flags) |
Check if interrupts are globally enabled in supplied flags. More... | |
static void | cpu_irq_restore (irqflags_t flags) |
Restore global interrupt flags. More... | |
#define | cpu_irq_enable() |
Enable interrupts globally. More... | |
#define | cpu_irq_disable() |
Disable interrupts globally. More... | |
#define | cpu_irq_is_enabled() (__get_PRIMASK() == 0) |
Check if interrupts are globally enabled. More... | |
Interrupt Service Routine definition | |
#define | Enable_global_interrupt() cpu_irq_enable() |
#define | Disable_global_interrupt() cpu_irq_disable() |
#define | Is_global_interrupt_enabled() cpu_irq_is_enabled() |
Usual Constants | |
#define | DISABLE 0 |
#define | ENABLE 1 |
#define | DISABLED 0 |
#define | ENABLED 1 |
#define | OFF 0 |
#define | ON 1 |
#define | FALSE 0 |
#define | TRUE 1 |
#define | false FALSE |
#define | true TRUE |
#define | KO 0 |
#define | OK 1 |
#define | PASS 0 |
#define | FAIL 1 |
#define | LOW 0 |
#define | HIGH 1 |
#define | CLR 0 |
#define | SET 1 |
This is a driver for global enabling and disabling of interrupts.
#define CLR 0 |
Definition at line 421 of file libchip_compiler.h.
#define cpu_irq_disable | ( | ) |
Disable interrupts globally.
#define cpu_irq_enable | ( | ) |
Enable interrupts globally.
#define cpu_irq_is_enabled | ( | ) | (__get_PRIMASK() == 0) |
Check if interrupts are globally enabled.
#define DISABLE 0 |
Definition at line 401 of file libchip_compiler.h.
#define Disable_global_interrupt | ( | ) | cpu_irq_disable() |
Definition at line 392 of file libchip_compiler.h.
#define DISABLED 0 |
Definition at line 403 of file libchip_compiler.h.
#define ENABLE 1 |
Definition at line 402 of file libchip_compiler.h.
#define Enable_global_interrupt | ( | ) | cpu_irq_enable() |
Definition at line 391 of file libchip_compiler.h.
#define ENABLED 1 |
Definition at line 404 of file libchip_compiler.h.
#define FAIL 1 |
Definition at line 418 of file libchip_compiler.h.
#define FALSE 0 |
Definition at line 407 of file libchip_compiler.h.
#define false FALSE |
Definition at line 411 of file libchip_compiler.h.
#define HIGH 1 |
Definition at line 420 of file libchip_compiler.h.
#define irq_initialize_vectors | ( | ) |
Initialize interrupt vectors.
For NVIC the interrupt vectors are put in vector table. So nothing to do to initialize them, except defined the vector function with right name.
This must be called prior to irq_register_handler.
Definition at line 89 of file interrupt_sam_nvic.h.
#define irq_register_handler | ( | int_num, | |
int_prio | |||
) |
Register handler for interrupt.
For NVIC the interrupt vectors are put in vector table. So nothing to do to register them, except defined the vector function with right name.
Usage:
Definition at line 110 of file interrupt_sam_nvic.h.
#define Is_global_interrupt_enabled | ( | ) | cpu_irq_is_enabled() |
Definition at line 393 of file libchip_compiler.h.
#define ISR | ( | func | ) | void func (void) |
Define service routine.
Usage:
func | Name for the function. |
Definition at line 77 of file interrupt_sam_nvic.h.
#define KO 0 |
Definition at line 415 of file libchip_compiler.h.
#define LOW 0 |
Definition at line 419 of file libchip_compiler.h.
#define OFF 0 |
Definition at line 405 of file libchip_compiler.h.
#define OK 1 |
Definition at line 416 of file libchip_compiler.h.
#define ON 1 |
Definition at line 406 of file libchip_compiler.h.
#define PASS 0 |
Definition at line 417 of file libchip_compiler.h.
#define SET 1 |
Definition at line 422 of file libchip_compiler.h.
#define TRUE 1 |
Definition at line 408 of file libchip_compiler.h.
#define true TRUE |
Definition at line 412 of file libchip_compiler.h.
Type used for holding state of interrupt flag.
Definition at line 130 of file interrupt_sam_nvic.h.
void cpu_irq_enter_critical | ( | void | ) |
Definition at line 47 of file interrupt_sam_nvic.c.
|
inlinestatic |
Check if interrupts are globally enabled in supplied flags.
flags | Currents state of interrupt flags. |
Definition at line 148 of file interrupt_sam_nvic.h.
void cpu_irq_leave_critical | ( | void | ) |
Definition at line 63 of file interrupt_sam_nvic.c.
|
inlinestatic |
Restore global interrupt flags.
Use in conjunction with cpu_irq_save.
flags | State to set interrupt flag to. |
Definition at line 153 of file interrupt_sam_nvic.h.
|
inlinestatic |
Get and clear the global interrupt flags.
Use in conjunction with cpu_irq_restore.
Definition at line 141 of file interrupt_sam_nvic.h.
|
static |
Definition at line 138 of file interrupt_sam_nvic.h.
|
static |
Definition at line 139 of file interrupt_sam_nvic.h.
volatile bool g_interrupt_enabled |
Definition at line 44 of file interrupt_sam_nvic.c.