Macros

RTOS macros. More...

Macros

#define GOS_INTERRUPT_CONTEXT ()   PLATFORM_INTERRUPT_CONTEXT()
#define GOS_DISABLE_INTERRUPTS ()   PLATFORM_DISABLE_INTERRUPTS()
#define GOS_ENABLE_INTERRUPTS ()   PLATFORM_ENABLE_INTERRUPTS()
#define GOS_TRIGGER_BREAKPOINT ()   PLATFORM_TRIGGER_BREAKPOINT()
#define GOS_RTOS_ISR (function)   __gos_ ## function
#define GOS_RTOS_DEFINE_ISR (function)
This macro allows for an interrupt callback to use RTOS structures such as semaphores and event flags. More...

Detailed Description

RTOS macros.

Macro Definition Documentation

GOS_DISABLE_INTERRUPTS

#define GOS_DISABLE_INTERRUPTS ( ) PLATFORM_DISABLE_INTERRUPTS()

Disable global interrupts

GOS_INTERRUPT_CONTEXT() should be declared before using this.

GOS_ENABLE_INTERRUPTS() MUST be called to re-enable interrupts.

Note
This is a low-level API and should be used with extreme caution!

GOS_ENABLE_INTERRUPTS

#define GOS_ENABLE_INTERRUPTS ( ) PLATFORM_ENABLE_INTERRUPTS()

Re-enable global interrupts

This MUST be called after using GOS_DISABLE_INTERRUPTS()

Note
This is a low-level API and should be used with extreme caution!

GOS_INTERRUPT_CONTEXT

#define GOS_INTERRUPT_CONTEXT ( ) PLATFORM_INTERRUPT_CONTEXT()

Context used to store the interrupt context

This should be declared locally before GOS_DISABLE_INTERRUPTS() and GOS_ENABLE_INTERRUPTS() are used

Note
This is a low-level API and should be used with extreme caution!

GOS_RTOS_DEFINE_ISR

#define GOS_RTOS_DEFINE_ISR ( function )
Value:
void __gos_ ## function ( void ); \
void function ( void ); \
RTOS_MAKE_IRQ_THREAD_SAFE( function )

This macro allows for an interrupt callback to use RTOS structures such as semaphores and event flags.

Note
This is a low-level API and should be used with extreme caution!

GOS_RTOS_ISR

#define GOS_RTOS_ISR ( function ) __gos_ ## function

This is used to reference an ISR function defined with GOS_RTOS_DEFINE_ISR()

Note
This is a low-level API and should be used with extreme caution!

GOS_TRIGGER_BREAKPOINT

#define GOS_TRIGGER_BREAKPOINT ( ) PLATFORM_TRIGGER_BREAKPOINT()

Trigger a debugger breakpoint

Note
This will always trigger a breakpoint regardless of build type.
This is a low-level API and should be used with extreme caution!