[U-Boot-Users] RFC: Common bitshifts
Grant Likely
grant.likely at secretlab.ca
Mon Mar 12 20:26:23 CET 2007
On 3/12/07, Wolfgang Denk <wd at denx.de> wrote:
> In message <000001c7649a$41f7f9a0$9a4d010a at Emea.Arm.com> you wrote:
> > #define BIT0 (1<<0)
> > #define BIT1 (1<<1)
> > #define BIT2 (1<<2)
> > #define BIT3 (1<<3)
> > #define BIT4 (1<<4)
> > #define BIT5 (1<<5)
>
> I really dislike definitions like these, as they basicly make the
> code unreadable. You always have to look up the definition in a
> gazillion of herader files (and make your to catch the right one) to
> be able to see what the code actually does.
I strongly agree (just my $0.02)
g.
More information about the U-Boot
mailing list