| ||||||||
Technical Support Support Resources Product Information | C166: DISABLING INTERRUPTS IN A FUNCTIONInformation in this article applies to:
QUESTIONHow do I disable interrupts in a function? ANSWERUse #pragma disable to disable interrupts for the duration of a function. For example:
#pragma disable
void function (void)
{
if (flag == 0)
{
flag = 1;
flag2 = 1;
}
}
This disables interrupts on entry to function and restores interrupts when exiting. MORE INFORMATION
SEE ALSOLast Reviewed: Friday, July 15, 2005 | |||||||
| ||||||||