chipKIT® Development Platform

Inspired by Arduino™

Last edit: 2021-03-21 22:34 by Majenko

DisableInterrupts

  1. Synopsis

  2. Description

  3. Return Value

  4. Conforming To

  5. Examples

  6. See Also

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()