|
SAM4SD32 (SAM4S-EK2)
|
This is a driver for global enabling and disabling of interrupts. More...
Topics | |
| Deprecated interrupt definitions | |
Macros | |
| #define | CONFIG_INTERRUPT_FORCE_INTC |
| Force usage of the ASF INTC driver. | |
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 |
Global interrupt flags | |
| typedef uint32_t | irqflags_t |
| Type used for holding state of interrupt flag. | |
| static irqflags_t | cpu_irq_save (void) |
| Get and clear the global interrupt flags. | |
| static bool | cpu_irq_is_enabled_flags (irqflags_t flags) |
| Check if interrupts are globally enabled in supplied flags. | |
| static void | cpu_irq_restore (irqflags_t flags) |
| Restore global interrupt flags. | |
| #define | cpu_irq_enable() |
| Enable interrupts globally. | |
| #define | cpu_irq_disable() |
| Disable interrupts globally. | |
| #define | cpu_irq_is_enabled() |
| Check if interrupts are globally enabled. | |
Interrupt Service Routine definition | |
| #define | ISR(func) |
| Define service routine. | |
| #define | irq_initialize_vectors() |
| Initialize interrupt vectors. | |
| #define | irq_register_handler(int_num, int_prio) |
| Register handler for interrupt. | |
This is a driver for global enabling and disabling of interrupts.
| #define CONFIG_INTERRUPT_FORCE_INTC |
Force usage of the ASF INTC driver.
Predefine this symbol when preprocessing to force the use of the ASF INTC driver. This is useful to ensure compatibility across compilers and shall be used only when required by the application needs.
Definition at line 68 of file interrupt.h.
| #define cpu_irq_disable | ( | ) |
Disable interrupts globally.
Definition at line 123 of file interrupt_sam_nvic.h.
Referenced by cpu_irq_enter_critical(), and cpu_irq_save().
| #define cpu_irq_enable | ( | ) |
Enable interrupts globally.
Definition at line 117 of file interrupt_sam_nvic.h.
Referenced by cpu_irq_leave_critical(), and cpu_irq_restore().
| #define cpu_irq_is_enabled | ( | ) |
Check if interrupts are globally enabled.
Definition at line 136 of file interrupt_sam_nvic.h.
Referenced by cpu_irq_enter_critical(), and cpu_irq_save().
| #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 ISR | ( | func | ) |
Define service routine.
Usage:
| func | Name for the function. |
Definition at line 77 of file interrupt_sam_nvic.h.
| typedef uint32_t irqflags_t |
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.
References cpu_irq_critical_section_counter, cpu_irq_disable, cpu_irq_is_enabled, and cpu_irq_prev_interrupt_state.
|
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.
Referenced by cpu_irq_restore().
| void cpu_irq_leave_critical | ( | void | ) |
Definition at line 63 of file interrupt_sam_nvic.c.
References cpu_irq_critical_section_counter, cpu_irq_enable, and cpu_irq_prev_interrupt_state.
|
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.
References cpu_irq_enable, and cpu_irq_is_enabled_flags().
|
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.
References cpu_irq_disable, and cpu_irq_is_enabled.
|
static |
Definition at line 138 of file interrupt_sam_nvic.h.
Referenced by cpu_irq_enter_critical(), and cpu_irq_leave_critical().
|
static |
Definition at line 139 of file interrupt_sam_nvic.h.
Referenced by cpu_irq_enter_critical(), and cpu_irq_leave_critical().