[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [Patch] Generalize wdt.h by removing hardcoded device
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] [Patch] Generalize wdt.h by removing hardcoded device names |
Date: |
Sat, 11 Oct 2014 10:35:45 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
As Senthil Kumar Selvaraj wrote:
> The attached patch to wdt.h gets rid of the huge device specific
> conditional branches for wdt_enable and wdt_disable.
That's cool. The current state of affairs used to be a continued
cause for being forgotten upon adding a new devices.
> I do see bigger code at -O0 though. Is that an acceptable tradeoff?
For wdt_enable/wdt_disable, yes, it is. Only wdt_reset() must be
kept as short as possible, but as this translates directly into
one assembly instruction, that's not an issue.
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)