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

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

Re: [avr-libc-dev] [patch] RFC: wdt.h


From: Theodore A. Roth
Subject: Re: [avr-libc-dev] [patch] RFC: wdt.h
Date: Thu, 4 Nov 2004 16:13:45 -0800 (PST)

On Thu, 4 Nov 2004, E. Weddington wrote:

> E. Weddington wrote:
>
> > E. Weddington wrote:
> >
> >> Hello!
> >>
> >> Attached is a patch for include/avr/wdt.h that I think will fix bugs
> >> #10811 and #10872, which is getting wdt to work with tiny2313,
> >> mega48, mega88, and mega168.
> >>
> >> The changes include:
> >> 1. These devices use a different watchdog control register name.
> >> 2. These devices use another prescaler bit (WDP3), allowing more
> >> timeout values.
> >> 3. New timeout values as referenced above.
> >> 4. The new prescaler bit is non-contiguous with other prescaler bits
> >> (WDP2-WDP0). This is accounted for.
> >> 5. Removing of magic values in inline assembly which referenced
> >> specific bits in registers.
> >> 6. Use of stdint.h to make it -mint8 compatible.
> >> 7. In wdt_enable, move the fixed bit mask of WDE that was or'd with
> >> the value to the _wdt_write macros to better handle with the
> >> non-contiguous prescaler bits.
> >> 8. As a consequenc of the new handling of the non-contiguous bits,
> >> now non-used bits of the *value* parameter (in _wdt_write) are ignored.
> >> 9. Doxygen comments for the new stuff.
> >> 10. Untabified stuff so I don't have to worry about the 80 character
> >> limit for those of you who have tab=8. :-)
> >>
> >> So far tests look pretty good, but I just want to make sure I haven't
> >> missed anything before I commit.
> >>
> >> Comments?
> >>
> >
> > Attached is an update to the patch to wdt.h that includes the fix for
> > the new bug, #10905, regarding wdt on at90can128.
> >
> If there are no comments by Friday afternoon (local), then I'll commit this.

Index: include/avr/iomx8.h
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/include/avr/iomx8.h,v
retrieving revision 1.5
diff -u -r1.5 iomx8.h
--- include/avr/iomx8.h 2 Nov 2004 18:16:07 -0000       1.5
+++ include/avr/iomx8.h 3 Nov 2004 22:46:27 -0000
@@ -317,7 +317,7 @@
 #define WDIE    6
 #define WDP3    5
 #define WDCE    4
-#define WDEE    3
+#define WDE     3
 #define WDP2    2
 #define WDP1    1
 #define WDP0    0

I haven't looked at it too closely, but this caught my eye.

Are you renaming WDEE to match other devices, or fixing a typo from the
datasheet?


---
Ted Roth
PGP Key ID: 0x18F846E9
Jabber ID: address@hidden




reply via email to

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