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 as parameter to a function

Is it possible to define a sbit variable

e.g.
sbit port0_0 = P0 ^ 0;

and to call a function with this sbit-definition as a parameter?

e.g.
setPortPin(port0_0);

And how does the declaration of this function looks like, if possible?

Would be great if anyone could help me in this thread.

Thanks Benny

Parents
  • no,

    to use that you would have self-modifying code, and with flash that is impossibhle (leaving alone the screams you would hear if you did it where possible)

    as there are no indirect bit instructions in the '51 the only method availble is to transfer address and mask.
    Erik

Reply
  • no,

    to use that you would have self-modifying code, and with flash that is impossibhle (leaving alone the screams you would hear if you did it where possible)

    as there are no indirect bit instructions in the '51 the only method availble is to transfer address and mask.
    Erik

Children
No data