User Tools

Site Tools


en-us_commands:reference:wdt_enable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en-us_commands:reference:wdt_enable [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:reference:wdt_enable [2026/09/08 00:53] (current) – 바깥 편집 127.0.0.1
Line 17: Line 17:
 <code cpp> <code cpp>
 void setup() { void setup() {
-#if defined(__AVR_ATmega2560__+#if defined(__AVR_ATmega128__
-  WDT_ENABLE(WDT_2S); +  WDT_ENABLE(WDT_900MS);  // Set the watchdog timeout and start operation. 
-#elif defined(__AVR_ATmega128__+#elif defined(__AVR_ATmega2560__
-  WDT_ENABLE(WDT_1800MS);+  WDT_ENABLE(WDT_1S);  // Set the watchdog timeout and start operation.
 #endif #endif
 +}
 +
 +void loop() {
 +  WDT();  // Refresh the watchdog before its timeout expires.
 } }
 </code> </code>
Line 30: Line 34:
   * Do not set a timeout shorter than the longest normal processing time.   * Do not set a timeout shorter than the longest normal processing time.
   * Do not hide program faults by placing ''WDT()'' where it always executes unconditionally.   * Do not hide program faults by placing ''WDT()'' where it always executes unconditionally.
 +
 +===== Built-in Commands in the Same Category =====
 +
 +  * [[:en-us_commands:reference:wdt_disable|WDT_DISABLE() View detailed description]]
 +  * [[:en-us_commands:reference:wdt|WDT() View detailed description]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/wdt_enable.1788785569.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki