AVR C Runtime Library - Bugs: bug #33913, Make MCUSR an alias to MCUCSR on...
You are not allowed to post comments on this tracker with your current authentication level.
bug #33913: Make MCUSR an alias to MCUCSR on all devices
Submitter: | Daniel Willmann <asdfuser> | ||
Submitted: | Sun 31 Jul 2011 09:15:08 PM UTC | ||
Category: | Header | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | Wont Fix | Assigned to: | arcanum |
Percent Complete: | 0% | Open/Closed: | Closed |
Release: | 1.7.0 | Fixed Release: | None |
Sun 31 Jul 2011 09:30:39 PM UTC, comment #1: |
Eric Weddington <arcanum> |
Sun 31 Jul 2011 09:15:08 PM UTC, original submission:
On some devices (like atmega8) MCUSR is an alias to MCUCSR, but others lack this.
|
Daniel Willmann <asdfuser> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2011-07-31 | arcanum | Open/Closed | Open | Closed | |
2011-07-31 | arcanum | Status | None | Wont Fix | |
Assigned to | None | arcanum |
Powered by Savane 3.13-4448.
Corresponding source code
The I/O header files define the register names according to the XML device files that are shipped with AVR Studio.
There have been occasional device header files where the register names were changed after release, or there was a mistake in the creation of the header file. In these cases you may end up having both MCUSR and MCUCSR, but in reality only one name is correct. Where there is an alias, the alias name is deprecated.
One way to use either name in your application code is to check for both names and define a 3rd name to either one, or check for one name and define it to the other one. Do something like this in one of your header files:
#if defined(MCUCSR)
#define MCUSR MCUCSR
#endif
However, it is not guaranteed that the the bit definitions are exactly equal in both register definitions, or across AVR devices. There may (or may not) be variations that you might have to account for in your code.
But, we will not be adding aliases to the I/O header files. Each I/O header file is supposed to represent the XML device file (and by extension, the datasheet) only. It is best to build other systems, such as a Hardware Abstraction Layer, on top of these I/O header files.
Closing as wontfix.