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?