Skip to content

[bug #45420] avr/wdt.h: Allow enabling watchdog in interrupt mode #621

@avrs-admin

Description

@avrs-admin

Fri 26 Jun 2015 09:29:48 PM CEST

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.

This issue was migrated from https://savannah.nongnu.org/bugs/?45420

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions