On Tue, Oct 14, 2014 at 03:35:44PM +0530, Senthil Kumar Selvaraj wrote:
> On Sat, Oct 11, 2014 at 10:35:45AM +0200, Joerg Wunsch wrote:
> > 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.
> Ok.
> 
> I've recreated the patch with s/inline/__inline__,
> s/always_inline/__always_inline__ and a const declaration for the 
> wdt_enable parameter.
> 
> Could someone please apply the patch? I don't have commit access.
> 
> Regards
> Senthil
> 
> ChangeLog
> 
> 2014-10-06  Senthil Kumar Selvaraj <senthil_kumar.selva...@atmel.com>
>             Georg-Johann Lay <a...@gjlay.de>
> 
>       * include/avr/wdt.h: Generalize implementation of wdt_enable and
>       wdt_disable based on arch and addressability of _WD_CONTROL_REG.
> 

Committed as rev #2454.

Regards
Senthil

_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to