DisableInterrupts

From chipKIT
Jump to: navigation, search

Synopsis

 uint32_t disableInterrupts(void)

Description

'disableInterrupts() completely turns off the interrupt system preventing any interrupts from being serviced. Interrupt flags will still be set and interrupts may still be serviced once interrupts have been re-enabled with either enableInterrupts() or restoreInterrupts().

Return Value

The previous state of the interrupt system which may be used with restoreInterrupts() to return the interrupt system to the previous settings.

Conforming To

disableInterrupts() does not conform to any external API, it is unique to the chipKIT system.

Examples

Disable and restore interrupts:

 uint32_t s = disableInterrupts();
 // Perform sensitive operations
 restoreInterrupts(s);

See Also

attachInterrupt(), detachInterrupt(), clearIntEnable(), clearIntFlag(), clearIntVector(), enableInterrupts(), getIntFlag(), getIntPriority(), getIntVector(), restoreIntEnable(), restoreInterrupts(), setIntEnable(), setIntPriority(), setIntVector()