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

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

Re: [avr-gcc-list] avr-gcc/avr-binutils/avr-libc and the ATMega168 - wh


From: Erik Walthinsen
Subject: Re: [avr-gcc-list] avr-gcc/avr-binutils/avr-libc and the ATMega168 - what am I doing wrong, tnx!
Date: Sun, 30 Jan 2005 15:47:35 -0800
User-agent: Debian Thunderbird 1.0 (X11/20050116)

E. Weddington wrote:
Go look at the implementation of the sbi and cbi macros and you'll see why. ;-)

#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))

Yes, I understand that it seems to be a big deal that the compiler is now smart enough to interpret

DDRB &= ~(1<<4);
PORTB |= (1<<4);

but I really think that

cbi(DDRB,4);
sbi(PORTB,4);

is vastly easier to understand when both reading and writing code, those being functions of humans, not compilers. If there is no other reason than showing off a smart compiler, I fail to understand why removing exceedingly useful *convenience* macros that make the code several times easier to read is a good thing.

Again, I don't get it. And it really annoys me, as I am being forced to include my own deprecated.h in every one of my existing projects.


FWIW, I am unable to send *any* mail to avr1.org, as per:

----- Transcript of session follows -----
<address@hidden>... Deferred: Connection refused by avr1.org.
Warning: message still undelivered after 4 hours
...
Reporting-MTA: dns; mail.omegacs.net

mail.omegacs.net is 216.99.212.251, a home DSL connection that's been otherwise handling mail properly for 5+ years. Can the owner of avr1.org's mail server please check to see if something's wrong? Especially since I can ping 202.37.230.18 just fine from here.


reply via email to

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