I have the following routine. When complied the input_b(); it optimizes away. Without it the RBIF flag is not cleared. I would prefer not to turn optimization off for the whole project. Any suggestions on a simple clean way to prevent it from optimizing away?
Right now I am just assigning it to a global. but I am already low on ram. I suppose I could code a section in assembly, but I am looking for a cleaner way of doing it.
Code:
//----------------------------------------------------------------------------
// First stage of keypad routine - key press has been detected, start timer
// to call keypad scanning (debouce key).
//----------------------------------------------------------------------------
#INT_RB
void keypadIsr (void)
{
disable_interrupts(INT_RB);
input_b();
keypadTimerStart();
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum