English
Language : 

CC78K0S Datasheet, PDF (351/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(11) Interrupt functions
Interrupt Functions
#pragma DI
#pragma EI
FUNCTIONS
• The DI and EI codes are output to an object and an object file is created.
• If there is no #pragma directive, DI( ) and EI( ) are regarded as ordinary functions.
• If “DI( );” is described at the beginning of a function (except the declaration of an automatic variable,
comment, and preprocessing directive), the DI code is output before the preprocessing of the function
(immediately after the label of the function name).
• To output the DI code after the preprocessing of the function, open a new block before describing “DI( );”
(delimit this block with ‘{‘).
• If “EI( );” is described at the end of a function (except comments and preprocessing directives), the EI code is
output after the postprocessing of the function (immediately before the code RET).
• To output the EI code before the postprocessing of a function, close a new block after describing “EI( );”
(delimit this block with ‘}’).
EFFECT
• A function disabling interrupts can be created.
USAGE
• Describe the #pragma DI and #pragma EI directives at the beginning of the C source.
following items may precede the #pragma DI and #pragma EI directives.
• Comment statements
• Other #pragma directives
• Preprocessing directives that neither define nor reference variables or functions
• Describe DI( ); or EI( ); in the source in the same manner as a function call.
• DI and EI can be described in either uppercase or lowercase letters after #pragma.
However, the
User’s Manual U14872EJ1V0UM
351