[Top][All Lists]

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

[avr-libc-dev] Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi

From: E. Weddington
Subject: [avr-libc-dev] Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????
Date: Mon, 31 Jan 2005 14:36:16 -0700
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

Victoria Welch wrote:

I think some folks are missing the point here.

Had the sbi / cbi stuff not been there in the first place AND not been so HEAVILY used, this would hardly be an issue :-).

Academic purity is a fine thing, but there is a real world out there where everyone doesn't have a doctorate in C and (believe it or not :-) doesn't want one :-).

Most importantly there is the issue of backwards compatibility. This *IS* a serious real world consideration.

This might not be something the academics would encourage but in the real world usage it is IMNSHO indespensible given the existing conditions.

Whether we like it or not, all this is out in the real world with people using it. Maybe these people will learn regex and bit manipulation and replace them all if they don't get discouraged away from it assuming it is just broken.

Look. There's no *academic* anything going on here. We're "real world developers" just like you. Quit flaming.

There is a common protocol for dealing with breaking backwards compatiblity and it's called "deprecation", which means that it's there but it really shouldn't be used because other, more desirable methods are available. Eventually, deprecated items are removed.

Remember, these items were deprecated a long time ago and they were marked that way in the avr-libc user manual. How hard is it to read it?

I'm sorry you got a hold of some bad examples and you started to write your code that way.

Not everyone is a C guru. I, for one, started out that way and moved on to a better knowlege of C (Still Not A C Guru(TM) ;-).
Geez, you don't have to be a "guru" to understand this stuff. There are a class of operators in the C language that deal with bit manipulation. They are a standard part of the language. They are used heavily and extensively by any C code that interacts with hardware, i.e. embedded systems and operating systems. It is to be somewhat expected that you learn those operators when writing for an embedded microcontroller such as the AVR.

A guru would know how to read trigraphs without having to look it up. ;-)

but I hope some consideration to "legacy" code and potential newbies figures into the decision.
Hence my proposal for a Bit Operations API. Joerg probably thinks that it is unnecessary. I do too. But I can also see where it could be useful (and more useful than just the two cbi() and sbi() macros), and it would make newbie's lives easier.


reply via email to

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