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

sbit with macro define

Hi all,
I just want to ask why I cannot use this in C51:

...
sbit INPUT1 = P0 ^ 0;
sbit INPUT2 = P0 ^ 1;

#define CHECK_INPUT    ((INPUT1 << 7) | (INPUT2 << 6))

When try using it:

while(1)
{
    ...

    unsigned char temp;
    temp = CHECK_INPUT;

    ...
}

When compiled, the error:
*** ERROR C193 IN LINE 40 OF xxx.c: '<<' : bad operand type

What should be the best thing to do?
And why the error occur?

regards
gee

0