wdt.h(3avr)
β¨ NAME β¨
wdt.h β it's the watchdog timer header from AVR-LibC, bestie π and yeah this is wdt.h(3avr), the one and only π
π SYNOPSIS π
πΈ Macros
#define wdt_reset()
#define wdt_enable(timeout)
#define WDTO_15MS 0
#define WDTO_30MS 1
#define WDTO_60MS 2
#define WDTO_120MS 3
#define WDTO_250MS 4
#define WDTO_500MS 5
#define WDTO_1S 6
#define WDTO_2S 7
#define WDTO_4S 8
#define WDTO_8S 9
π¦ Functions
static void wdt_enable (const uint8_t value)
static void wdt_disable (void)
π DESCRIPTION π
okay so imagine this: your little AVR chip is out there living its main character life, and the watchdog timer is basically the friend that goes "babe, text me back or I'm resetting you" πβ That's the whole vibe. wdt.h is where the watchdog timer gang hangs out β the macros you use to kick the timer (wdt_reset()), the macros you use to turn it on with a chosen timeout (wdt_enable(timeout)), and a whole glow-up lineup of <purple>WDTO_</purple> constants for every timeout duration from a blink-and-you-miss-it <cyan>15MS</cyan> all the way up to a very patient <cyan>8S</cyan> π
and then there's the function side of the group chat β one to enable the watchdog with a specific value, one to disable it entirely. that's it, that's the header. iconic behaviour, no notes π β¨
π MACROS π
#define wdt_reset()β the "hey bestie I'm still here!!" button π«Ά you call this to reset the watchdog timer. fr fr, if you don't call it in time, the watchdog gets dramatic and resets the whole chip. keep it fed.#define wdt_enable(timeout)β turns the watchdog timer on, andtimeoutis you picking how long the chip gets before the timer throws hands β° hand it one of the<purple>WDTO_</purple>constants below.#define WDTO_15MS 0β 15 ms of patience. that's it. that's the whole window π#define WDTO_30MS 1β 30 ms. blink twice, maybe.#define WDTO_60MS 2β 60 ms, a whole sixty milliseconds of grace πΈ#define WDTO_120MS 3β 120 ms.#define WDTO_250MS 4β 250 ms, a quarter of a second β¨#define WDTO_500MS 5β 500 ms, half a second, we're getting generous π#define WDTO_1S 6β 1 second, okay now we're chilling π#define WDTO_2S 7β 2 seconds.#define WDTO_4S 8β 4 seconds.#define WDTO_8S 9β 8 seconds, the most patient timeout in the lineup π
π FUNCTIONS π
static void wdt_enable (const uint8_t value)β switches the watchdog timer ON, andvalueis the timeout you want it to run with π pass it a<purple>WDTO_</purple>constant and you're set.static void wdt_disable (void)β switches the watchdog timer OFF. it takesvoid, so no arguments, no drama, just goodbye π
π AUTHOR π
Generated automatically by Doxygen for AVR-LibC from the source code. so like, not a human author, a robot wrote it, and honestly? she ate π β¨
and that's the whole page, bestie π«Ά this was wdt.h from AVR-LibC, Version 2.2.1 β go forth, pet your watchdog, and reset it on time or it WILL reset you πππ
π¦ where this page comes from
- ubuntu resolute: avr-libc 1:2.2.1-1build1 Β· BSD-3-Clause
- ubuntu stonking: avr-libc 1:2.2.1-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms