Defines | |
#define | OS_PORT_CRITICAL_ENABLE() |
#define | OS_PORT_CRITICAL_BEGIN() |
#define | OS_PORT_CRITICAL_END() |
#define | OS_PORT_ISR_BEGIN() |
#define | OS_PORT_INT_ENABLE() |
#define | OS_PORT_INT_DISABLE() |
#define OS_PORT_CRITICAL_ENABLE | ( | ) |
Enable critical section calls in the the called function.
OS_PORT_CRITICAL_ENABLE() will be called at the beginning of any function that uses OS_CRITICAL_BEGIN or OS_CRITICAL_END. This will be the first call after variable declaration. This is a good place to define variables that may be used by OS_BEGIN_CRITICAL and OS_CRITICAL_END
Definition at line 176 of file template/tr_port.h.
#define OS_PORT_CRITICAL_BEGIN | ( | ) |
Begin a critical section A simple way to do this would be to disable interrupts.
However, it would be better if the current interrupt state were stored and then interrupts were disabled. Upon ending the critical section, the stored state should be restored. The stored state can be saved in a local variable, which can be defined within OS_PORT_CRITICAL_ENABLE()
Definition at line 185 of file template/tr_port.h.
#define OS_PORT_CRITICAL_END | ( | ) |
End a critical section This may be as simple as reenabling interrupts, but it is better to renable the interrupt state stored in OS_PORT_BEGIN_CRITICAL().
Definition at line 191 of file template/tr_port.h.
#define OS_PORT_ISR_BEGIN | ( | ) |
Value:
extern uint8_t os_isr_nesting; \ os_isr_nesting++;
Leave this as such
Definition at line 196 of file template/tr_port.h.
#define OS_PORT_INT_ENABLE | ( | void | ) |
Enable interrupts This allows the user to explicitly enable interrupts.
Definition at line 202 of file template/tr_port.h.
#define OS_PORT_INT_DISABLE | ( | void | ) |
Disable interrupts This allows the user to explicitly disable interrupts.
Definition at line 206 of file template/tr_port.h.