5.4 __disable_interrupt Intrinsic Function
The IAR __disable_interrupt
intrinsic function disables interrupts with the
relevant instructions.
Suggested Replacement
There is an MPLAB XC8 macro that performs a similar task.
Use
the di()
macro to disable interrupts.
Caveats
The Common C Interface must be enabled using -mext=cci
to use the
macro replacement.
Examples
Consider migrating IAR code such as:
__disable_interrupt();
to
MPLAB XC8 code similar to:di();
and build with the
-mext=cci
option.Further Information
See the Enabling Interrupts section in the MPLAB XC8 C Compiler User's Guide for AVR MCUs for more information on this macro.