Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Some C help please !

2007-03-13 by kernels_nz

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
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.