wdt.h(3avr)

πŸ“¦
version 2.2.1 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

✨ 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, and timeout is 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, and value is 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 takes void, 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