 | Cx51 User's Guide |  |
|
|
| DISABLE Compiler Directive| Abbreviation | None. | | Arguments | None. | | Default | None. | | µVision | This directive may not be specified on the command line. | | Description | The DISABLE directive instructs the compiler to generate code that disables all interrupts for the duration of a function. This directive must be specified with #pragma immediately before the function declaration. The DISABLE directive applies to one function only and must be re-specified for each new function. Note - The DISABLE directive must be specified using #pragma only and may not be specified on the command line.
- The DISABLE directive may be specified more than once in a source file but must be specified for each function that is to execute with interrupts disabled.
- A function with disabled interrupts may not have a return type of bit.
- The DISABLE directive has no impact on the main function, since typically all interrupts are disabled and no function return occurs.
| | Example | |
Related Knowledgebase Articles |
|