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: E. Weddington
Subject: Re: [avr-libc-dev] [patch] RFC: wdt.h
Date: Wed, 03 Nov 2004 15:44:48 -0700
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

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?

Thanks
Eric

Oh, I forgot, this is also dependent upon the attached patch that fixes a bit define in iomx8.h.

Eric
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

reply via email to

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