Robobo
Interrupt_group

Modules

 Interrupt_deprecated_group
 

Macros

#define cpu_irq_enable()
 
#define cpu_irq_disable()
 
#define cpu_irq_is_enabled()   g_interrupt_enabled
 

Typedefs

typedef uint32_t irqflags_t
 

Variables

int g_interrupt_enabled
 Global NVIC interrupt enable status (by default it's 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(...)
 Register handler for interrupt. More...
 

Detailed Description

Macro Definition Documentation

#define cpu_irq_disable ( )
Value:
do { \
__disable_irq(); \
__DMB(); \
} while (0)
int g_interrupt_enabled
Global NVIC interrupt enable status (by default it's enabled)
Definition: interrupt_sam_nvic.c:33
#define cpu_irq_enable ( )
Value:
do { \
__DMB(); \
__enable_irq(); \
} while (0)
int g_interrupt_enabled
Global NVIC interrupt enable status (by default it's enabled)
Definition: interrupt_sam_nvic.c:33
#define irq_initialize_vectors ( )
Value:
do { \
} while(0)

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.

#define irq_register_handler (   ...)
Value:
do { \
} while(0)

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:

1 irq_initialize_vectors();
2 irq_register_handler(foo_irq_handler);
Note
The function func must be defined with the ISR macro.
The functions prototypes can be found in the device exception header files (exceptions.h).
#define ISR (   func)    void func (void)

Define service routine.

Note
For NVIC devices the interrupt service routines are predefined to add to vector table in binary generation, so there is no service register at run time. The routine collections are in exceptions.h.

Usage:

1 ISR(foo_irq_handler)
2 {
3  // Function definition
4  ...
5 }
Parameters
funcName for the function.