avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] [bugs #12134] ADC register name definitions


From: anonymous
Subject: [avr-libc-dev] [bugs #12134] ADC register name definitions
Date: Thu, 17 Mar 2005 07:31:38 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2)

Follow-up Comment #2, bugs #12134 (project avr-libc):

Comments forwarded from the debian Bug#299881:

The Analog to Digital Converter registers are defined like so:

#define ADC      _SFR_IO16(0x04)
#define ADCL     _SFR_IO8(0x04)
#define ADCH     _SFR_IO8(0x05)

This is somewhat unfortunate, because "ADC" is also the ADd with Carry
instruction in assembly.  This breaks preprocessed assembly files
which use capital instruction mnemonics.  (ADCL and ADCH do not
conflict with anything).

Perhaps the 16-bit ADC register could be renamed, or simply not
defined when __ASSEMBLY__ is defined.  Whatever solution is
implemented should probably be tested with a C program with inline
assembly as well.

I filed this as "minor" because it's easy to work around by undefining
ADC again after including the header.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=12134>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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