<< is a lshift left
>> is a shift right
www.ckp-railways.talktalk.net/pcbcad21.htm
kernels_nz <kernels@slingshot.co.nz> wrote: Hi Alex,
Thanks for the quick response, I understand what the code does, just
not why a bitwise AND is performed and what (1<<UDRE) "means". In my
baby-C, I would probably have written
while (UCSRA.x != 0);
where x is the UDRE bit. Any advantages to the way it's done below ?
cheers
Hein B
--- In AVR-Chat@yahoogroups.com, "Alex Shepherd" <lists06@...> wrote:
>
> > while ((UCSRA & (1<<UDRE))==0);
>
> Loop around checking the state of the UDRE bit in the UCSRA port
until the
> bit value is NOT 0
>
---------------------------------
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
[Non-text portions of this message have been removed]Message
Re: [AVR-Chat] Re: Some C help please !
2007-03-13 by np np
Attachments
- No local attachments were found for this message.