VSF Documented
|
Declaration of low level functions. More...
#include "hal/arch/vsf_arch.h"
Go to the source code of this file.
Macros | |
#define | GLOBAL_INT_START() vsf_enable_interrupt() |
Enable interrupts globally in the system. This macro must be used when the initialization phase is over and the interrupts can start being handled by the system. | |
#define | GLOBAL_INT_STOP() vsf_disable_interrupt() |
Disable interrupts globally in the system. This macro must be used when the system wants to disable all the interrupt it could handle. | |
#define | GLOBAL_INT_DISABLE() |
Disable interrupts globally in the system. This macro must be used in conjunction with the GLOBAL_INT_RESTORE macro since this last one will close the brace that the current macro opens. This means that both macros must be located at the same scope level. | |
#define | GLOBAL_INT_RESTORE() |
Restore interrupts from the previous global disable. | |
#define | WFI() |
Invoke the wait for interrupt procedure of the processor. | |
Functions | |
__STATIC_FORCEINLINE uint32_t | global_irq_lock (void) |
__STATIC_FORCEINLINE void | global_irq_unlock (uint32_t pmask) |
void | critical_section_start (void) |
void | critical_section_end (void) |
Declaration of low level functions.
#define GLOBAL_INT_START | ( | ) | vsf_enable_interrupt() |
Enable interrupts globally in the system. This macro must be used when the initialization phase is over and the interrupts can start being handled by the system.
#define GLOBAL_INT_STOP | ( | ) | vsf_disable_interrupt() |
Disable interrupts globally in the system. This macro must be used when the system wants to disable all the interrupt it could handle.
#define GLOBAL_INT_DISABLE | ( | ) |
Disable interrupts globally in the system. This macro must be used in conjunction with the GLOBAL_INT_RESTORE macro since this last one will close the brace that the current macro opens. This means that both macros must be located at the same scope level.
#define GLOBAL_INT_RESTORE | ( | ) |
Restore interrupts from the previous global disable.
#define WFI | ( | ) |
Invoke the wait for interrupt procedure of the processor.
__STATIC_FORCEINLINE uint32_t global_irq_lock | ( | void | ) |
__STATIC_FORCEINLINE void global_irq_unlock | ( | uint32_t | pmask | ) |
void critical_section_start | ( | void | ) |
Mark the start of a critical section
On the first call to enter a critical section this function MUST store the state of any interrupts or other application settings it will modify to facilitate the critical section.
void critical_section_end | ( | void | ) |
Mark the end of a critical section.
The purpose of this function is to restore any state that was modified upon entering the critical section, allowing other threads or interrupts to change the processor control.