AVR C Runtime Library - Bugs: bug #30552, Missing definition ADCW
You are not allowed to post comments on this tracker with your current authentication level.
bug #30552: Missing definition ADCW
Submitter: | Frédéric Nadeau <fnadeau> | ||
Submitted: | Mon 26 Jul 2010 03:55:52 PM UTC | ||
Category: | Header | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | Fixed | Assigned to: | aboyapati |
Percent Complete: | 100% | Open/Closed: | Closed |
Release: | 1.7.0 | Fixed Release: | 1.6.1 |
Wed 22 Sep 2010 06:51:53 AM UTC, comment #2: |
Anitha Boyapati <aboyapati> |
Tue 21 Sep 2010 11:37:55 AM UTC, comment #1: A patch has been submitted for bug 30569 and covers the issue. https://savannah.nongnu.org/bugs/?30569 |
Frédéric Nadeau <fnadeau> |
Mon 26 Jul 2010 03:55:52 PM UTC, original submission:
Found in SVN revision 2179
|
Frédéric Nadeau <fnadeau> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-09-22 | aboyapati | Status | None | Fixed | |
Percent Complete | 0% | 100% | |||
Assigned to | None | aboyapati | |||
Open/Closed | Open | Closed | |||
Fixed Release | None | 1.6.1 |
Powered by Savane 3.13-4448.
Corresponding source code
For device ATTiny43U:
the patch given for bug30569 defines ADC and ADCW to 0x04 (using _SFR_MEM16 macro) while datasheet clearly says that address of ADCL is 0x24 and that of ADCH is 0x25.
The following diff uses _SFR_IO16 instead of _SFR_MEM16. _SFR_IO16 adds an offset of 0x20. I think this is appropriate.
Index: iotn43u.h
===================================================================
--- iotn43u.h (revision 2184)
+++ iotn43u.h (working copy)
@@ -74,7 +74,10 @@
#define ADLAR 4
#define ACME 6
+#ifndef ASSEMBLER
#define ADC _SFR_IO16(0x04)
+#endif
+#define ADCW _SFR_IO16(0x04)
#define ADCL _SFR_IO8(0x04)