> -----Original Message-----
>    You can build a generic bit set-reset function if not
> already provided by your compiler like:
.....
> void SetResetBit(unsigned char Port, unsigned char Bit, bool Value);
>
> // Add to .c file
> void SetResetBit(unsigned char Port, unsigned char Bit, bool Value) {

Note that Port is passed as usigned char into function

>    if(Value == SetBit)
>       Port |= Bit;

How/why would that affect real hardware port??? Or anything outside
the function for this matter?

>    else if(Value == ResetBit)
>       Port &= ~Bit;
> }
>
> When you call the routine, use
>
> SetResetBit(Portname, Bit2, SetBit);
>

Sergei

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

Reply via email to