avrdudes / avr-libc

The AVR-LibC package provides a subset of the standard C library for AVR 8-bit RISC microcontrollers.
https://avrdudes.github.io/avr-libc/
Other
261 stars 56 forks source link

[bug #43804] Wdt for XMega. Syntax errors in the code. #599

Closed avrs-admin closed 2 years ago

avrs-admin commented 2 years ago

Fri 12 Dec 2014 12:50:25 PM CET

In definition wdt_enable() and wdt_disable():

  1. Operands must be in brackets (see patch).
  2. After "asm ... ()" must be ";" (see patch).
  3. In wdt_disable(), after "do { ... )" must be ";\ while(0)" (see patch).
  4. In comment (for doxygen), for XMega, you must specify that the "timeout" (in wdt_enable()) should not be WDTO_xxx and structure of WDT_PER_t (the number of shifted left by 2). (cant write it myself, do not know much English)

Due "timeout" turns out not portable code. Wanted to add "WTDO_" but delays do not coincide with supported XMega.

avr-libc 1.8.1 g++ 4.9.2

file #32652: wdt.h.patch

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

avrs-admin commented 2 years ago

Igor Balakin Fri 12 Dec 2014 03:21:09 PM CET

Sorry, in the svn version of the code is corrected.