This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debug function can't work

I wan't toggle a pluse on P2.7
I've wrote a debug ini file to load in keil uVDebuger.
It compiled with no error.

but when i invoke one of the user function in command window error occured
: *** function 'IrKey', error 99, line 41: signal() already activated

my ini file list below,can anyone help?

SIGNAL void IrStart(void)
{
 P2&=0x7f;
 swatch(0.009);
 P2|=0x80;
 swatch(0.0045);
}

SIGNAL void IrDat0(void)
{
 P2&=0x7f;
 swatch(0.00056);
 P2|=0x80;
 swatch(0.000565);
}

SIGNAL void IrDat1(void)
{
 P2&=0x7f;
 swatch(0.00056);
 P2|=0x80;
 swatch(0.001685);
}

signal void IrStop(void)
{
 P2&=0x7f;
 swatch(0.00056);
 P2|=0x80;
 swatch(0.000565);
}

FUNC void IrKey(unsigned char key)
{
 unsigned char i;
 IrStart();
 for(i=0;i<8;i++)
     {if(key&0x7f)
         IrDat1();
      else IrDat0();
         key=key<<1;
     }
 IrStop();
}

0