Discussion:
[avr-libc-dev] [patch #8557] Proposing to remove device specific xmega macros from sleep.h
Soundararajan Dhakshinamoorthy
2014-10-14 19:22:27 UTC
Permalink
URL:
<http://savannah.nongnu.org/patch/?8557>

Summary: Proposing to remove device specific xmega macros
from sleep.h
Project: AVR C Runtime Library
Submitted by: soundararajan
Submitted on: Tue 14 Oct 2014 07:22:26 PM GMT
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

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 __AVR_XMEGA__ macro instead.

Note : Attached ChangeLog to preserve formatting.

Requesting to review the change and approve/comment.

Thanks
Soundararajan



_______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 14 Oct 2014 07:22:26 PM GMT Name: remove_xmega_specifics.patch
Size: 2kB By: soundararajan

<http://savannah.nongnu.org/patch/download.php?file_id=32274>
-------------------------------------------------------
Date: Tue 14 Oct 2014 07:22:26 PM GMT Name: ChangeLog Size: 268B By:
soundararajan

<http://savannah.nongnu.org/patch/download.php?file_id=32275>

_______________________________________________________

Reply to this item at:

<http://savannah.nongnu.org/patch/?8557>

_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
Soundararajan Dhakshinamoorthy
2014-10-15 07:29:39 UTC
Permalink
Follow-up Comment #1, patch #8557 (project avr-libc):

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 !

_______________________________________________________

Reply to this item at:

<http://savannah.nongnu.org/patch/?8557>

_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
Joerg Wunsch
2014-10-15 19:36:36 UTC
Permalink
Follow-up Comment #2, patch #8557 (project avr-libc):

Without reviewing the patch in detail, I basically like the
idea behind it.

_______________________________________________________

Reply to this item at:

<http://savannah.nongnu.org/patch/?8557>

_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
Soundararajan Dhakshinamoorthy
2014-10-17 12:08:55 UTC
Permalink
Additional Item Attachment, patch #8557 (project avr-libc):

File name: remove_xmega_specifics_all_headers.patch Size:22 KB


_______________________________________________________

Reply to this item at:

<http://savannah.nongnu.org/patch/?8557>

_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
Senthil Kumar Selvaraj
2014-11-10 05:22:06 UTC
Permalink
Ping !

Regards
Senthil
Post by Soundararajan Dhakshinamoorthy
File name: remove_xmega_specifics_all_headers.patch Size:22 KB
_______________________________________________________
<http://savannah.nongnu.org/patch/?8557>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
AVR-libc-dev mailing list
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev
Senthil Kumar Selvaraj
2014-11-19 09:36:40 UTC
Permalink
Post by Senthil Kumar Selvaraj
Ping !
Regards
Senthil
Post by Soundararajan Dhakshinamoorthy
File name: remove_xmega_specifics_all_headers.patch Size:22 KB
Committed as rev 2455, with slight rewording of ChangeLog.

Regards
Senthil
Senthil Kumar Selvaraj
2015-10-06 10:05:39 UTC
Permalink
Update of patch #8557 (project avr-libc):

Status: None => Done
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #3:

Committed in svn rev 2455

http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2455

_______________________________________________________

Reply to this item at:

<http://savannah.nongnu.org/patch/?8557>

_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/

Loading...