avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Set/clear bit?


From: Pat Deegan
Subject: [avr-gcc-list] Set/clear bit?
Date: Tue, 29 Jun 2004 20:03:24 -0400

Hi,

It seems sbi/cbi are deprecated
(http://www.nongnu.org/avr-libc/user-manual/group__avr__sfr.html#a6)
but couldn't find what we're supposed to use...

As a side note, I've got a register with both in and out pins (PORTD,
which is also using the UART).  I'm looking to set the upper four bits
(which are output pins) in the most efficient manner without messing
with the input pins.  If I just:

newbits = blah << 4;
PORTD =  (PORTD & 0x0F) | newbits;

will it mess with the uart or something?

Thanks,
-- 
Pat Deegan
http://www.psychogenic.com/
PGP Key: http://www.keyserver.net 0x03F86A50



reply via email to

[Prev in Thread] Current Thread [Next in Thread]