[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????
From: |
Victoria Welch |
Subject: |
Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros???? |
Date: |
Mon, 31 Jan 2005 14:25:57 -0800 |
User-agent: |
KMail/1.7.2 |
On Monday 31 January 2005 13:36, you wrote:
> > [ ... ]
> >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.
Wasn't intending to flame, just that all the similar
arguments I have seen along these lines in the past have
come from, predominately, academics and were generally
opposed by people working in industry. If this is not the
case, then it is a wonderful break in the chain (no pun
intended :-).
> 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?
Once I found it, not too bad ;-). By that time I had
accumulated piles of code with that stuff already in there.
> I'm sorry you got a hold of some bad examples and you
> started to write your code that way.
Well, me too, but am I going to be the only one? With all
the code out there using those I'd bet not :-).
> >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. ;-)
LOL, only knew one person who could do that kind of thing
and it was NOT me :-).
When I first wandered into this wonderful world, I had not a
clue about bit manipulation in C. The sbi/cbi stuff was
there in the examples I found to do things I wanted, it
worked and made sense. I've since learned other ways to do
things. It was the fact that I found things that did what
I wanted / needed, made sense to me and worked at the time
that encouraged me to move on :-).
I'd venture to say that because of this wonderful work and
availability of the avr toolchain that a lot of people will
fall into it and, as I did, snarf code that they find
because of something they want to do, not because they are
a 30 year+ veterans of embedded systems and C.
> >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.
Completely agree, it looks good to me, even if I still have
to change all my sbi/cbi code <GD&R> :-).
Thanks & take care, V.
--
Victoria Welch, WV9K/7. "Engineering is the art of making
what you want from things you can get."- Jerry Avins
"Learning about the U.S. from the mainstream media is like
learning about plumbing by sitting in a cesspool." --
Michael Phelps
- [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, (continued)
- [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Joerg Wunsch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Joerg Wunsch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Ned Konz, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Ned Konz, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Ned Konz, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Victoria Welch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Christopher X. Candreva, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Joerg Wunsch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????,
Victoria Welch <=
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Joerg Wunsch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Victoria Welch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Joerg Wunsch, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Ned Konz, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, E. Weddington, 2005/01/31
- Re: [avr-gcc-list] Re: What Happened to the sbi() and cbi() Macros????, Ned Konz, 2005/01/31
- [avr-gcc-list] Re: [avr-libc-dev] Re: What Happened to the sbi() and cbi() Macros????, Björn Haase, 2005/01/31