Closed avrs-admin closed 2 years ago
Soundararajan Dhakshinamoorthy
Alternatively can we move all the SLEEP_MODE macros to the respective device header file ?
This should help us reduce some of the conditions defined in sleep.h. After this, we can generalize the set_sleep_mode() macro based on more simpler conditions (like if HAVE_THIS). But there are specific cases (e.x ATmega161) which we have to live with !
Joerg Wunsch
Without reviewing the patch in detail, I basically like the idea behind it.
Senthil Kumar Selvaraj
Committed in svn rev 2455
http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2455
Tue 14 Oct 2014 09:22:26 PM CEST
Hi,
The sleep.h file has a list of conditions using device (xmega in particular) macros, that is used to define the appropriate sleep modes and implement the set_sleep_mode macro.
It seems that ALL the xmega devices have the same set of sleep modes (and corresponding bit positions) and the set_sleep_mode implementation. The attached patch (remove_xmega_specifics.patch) removes the individual device macros and adds the _AVRXMEGA macro instead.
Note : Attached ChangeLog to preserve formatting.
Requesting to review the change and approve/comment.
Thanks Soundararajan
file #32275: ChangeLog file #32274: remove_xmega_specifics.patch file #32286: remove_xmega_specifics_all_headers.patch
This issue was migrated from https://savannah.nongnu.org/patch/?8557