[Top][All Lists]

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

Re: [avr-gcc-list] generic queue library for AVR GCC?

From: Ben L. Titzer
Subject: Re: [avr-gcc-list] generic queue library for AVR GCC?
Date: Wed, 17 Nov 2004 13:15:51 -0800

On Nov 17, 2004, at 11:44 AM, Bruce D. Lightner wrote:

address@hidden wrote:

Bruce is beating that poor dead horse with a wet noodle. ;)
   Date: Wed, 17 Nov 2004 12:47:42 -0600
   From: Andy Warner <address@hidden>
   To: "Bruce D. Lightner" <address@hidden>
   Subject: Re: [avr-gcc-list] generic queue library for AVR GCC?
   Cc: address@hidden
   Bruce D. Lightner wrote:
   > [...]
   > You all of course know that "," can be used in place of ";" to
   > separate C statements.  Therefore we can make a minor change to
   > the first macro definition...
   > [...]
   >       #define begin_critical_section()  SREG, cli()
   >       #define end_critical_section(val) SREG = val
   >       ....
   >       {
   >           unsigned char sreg = begin_critical_section();
   Is that going to work the way you expect it to ?
   I understood that the comma operator returns the type and
   value of the rightmost statement (which will be cli()
   in this example.)
   --    address@hidden
   Andy Warne  Voice: (612) 801-8549    Fax: (208) 575-5634

Well put!  Those in the IC design (*and* programming) busines know
the following Natural Law *aways* applies...

  If you don't test it, it won't work! (Guaranteed.)

I'm a clone for not testing...and should be beat with my own
"wet noodle". :-)

Best regards,


P.S.- I applaud Eric Weddington for his restraint in commenting
on the posts about using Java constructs!

  Now can somebody develop a Java run-time library to use on
  the 8-bit AVR, so we can use GCJ <http://gcc.gnu.org/java/>
  to compile Java to native AVR machine code? :-)

I know that we embedded 8-bit microcontroller programmers are
clamoring to switch to Java!  I just know in my heart that our
code will be "better", and also smaller!  :-)

BTW: I hope that he really *wasn't* serious!

I realize you are not serious, but let me clarify--my point is not that Java should be used, but rather, Java constructs might have a particular applicability in solving the problem--one can imagine a small addition to C where these particular constructs are both powerful and useful.


Opportunity is missed by most people because it is dressed in overalls and looks like work.
-- Thomas Edison

reply via email to

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