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

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

[avr-libc-dev] [bug #45420] avr/wdt.h: Allow enabling watchdog in interr


From: Matthijs Kooijman
Subject: [avr-libc-dev] [bug #45420] avr/wdt.h: Allow enabling watchdog in interrupt mode
Date: Fri, 26 Jun 2015 19:29:49 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0

URL:
  <http://savannah.nongnu.org/bugs/?45420>

                 Summary: avr/wdt.h: Allow enabling watchdog in interrupt mode
                 Project: AVR C Runtime Library
            Submitted by: matthijs
            Submitted on: Fri 26 Jun 2015 07:29:48 PM GMT
                Category: Header
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Header files
                  Status: None
        Percent Complete: 0%
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: Any
           Fixed Release: None

    _______________________________________________________

Details:

wdt.h provides a wdt_enable() function, which conveniently abstracts enabling
the watchdog and setting the timeout at the same time.

A similarly easy way to enable interrupt (and probably also interrupt + reset)
mode would be a useful addition.

I'm not sure how this API would look. This could be a a function
wdt_enable_interrupt() and wdt_enable_reset_and_interrupt() to set the timeout
and enable just the interrupt or both reset and the interrupt (function names
would need some work).

Alternatively, having a separate function to set the timeout and one to enable
(just) the interrupt mask (which I think doesn't require the WDCE dance) would
also work, then thos can be combined for interrupt-only mode, and wdt_enable
with the enable interrupt mask function would enable system+reset.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?45420>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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