11.07.2015 Views

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INTERRUPTS API FUNCTION OVERVIEWRoutineOS_EnterInterrupt()OS_LeaveInterrupt()OS_LeaveInterruptNoSwitch()OS_IncDI()OS_DecRI()OS_DI()OS_EI()OS_RestoreI()OS_EnterNestableInterrupt()OS_LeaveNestableInterrupt()OS_LeaveNestableInterruptNoSwitch()Table 114: Interrupt API overviewDescriptionInforms <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> that interrupt code is executing.Informs <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> that the end of the interruptroutine has been reached; executes task switching within ISR.Informs <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> that the end of the interruptroutine has been reached but does not execute task switchingwithin ISR.Increments the interrupt disable counter (OS_DICnt) anddisables interrupts.Decrements the counter and enables interrupts if the counterreaches 0.Disables interrupts. Does not change the interrupt disablecounter.Unconditionally enables Interrupt.Restores the status of the interrupt flag, based on theinterrupt disable counter.Re-enables interrupts and increments the <strong>IAR</strong> <strong>PowerPac</strong><strong>RTOS</strong> internal critical region counter, thus disabling furthertask switches.Disables further interrupts.Disables further interrupts, informs <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> thatthe end of ISR is reached, but does not perform a task switch.OS_EnterInterrupt()DescriptionInforms <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> that interrupt code is executing.Prototypevoid OS_EnterInterrupt (void);Additional InformationIf OS_EnterInterrupt() is used, it should be the first function to be called in the interrupt handler. It must be usedwith either OS_LeaveInterrupt() or OS_LeaveInterruptNoSwitch() as the last function called.The use of this function has the following effects, it:●●disables task switcheskeeps interrupts in internal routines disabled.OS_LeaveInterrupt()DescriptionInforms <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> that the end of the interrupt routine has been reached; executes task switching withinISR.Prototypevoid OS_LeaveInterrupt (void);Additional InformationIf OS_LeaveInterrupt() is used, it should be the last function to be called in the interrupt handler. If the interrupthas caused a task switch, it will be executed (unless the program which was interrupted was in a critical region).102<strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>for ARM CoresPP<strong>RTOS</strong>-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!