| ??? 05/01/02 11:41 Read: times |
#22349 - RE: passing port pin to a function |
Dear,
may your function call be like this ? DGIO_setDiscrete(Port,Pin,State) ? The most easiest way to code your problem can be done like this : TASKING : sfrbit RedLed _atbit(P1,3); sfrbit GreenLed _atbit(P1,4); sfrbit Yellowled _atbit(P2,6); KEIL : Sbit (RedLed, P1, 3); Sbit (Greenled, P1, 4); Sbit (YellowLed,P2, 6); Then in your main code #define ON 1 #define OFF 0 RedLed = ON; GreenLed = OFF; YellowLed = ON; Bert Regards. |



