[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bugs #10489] Sleep.h omission for atmega48/88/168 family
From: |
Eric Weddington |
Subject: |
[avr-libc-dev] [bugs #10489] Sleep.h omission for atmega48/88/168 family |
Date: |
Tue, 21 Dec 2004 13:46:02 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 |
This mail is an automated notification from the bugs tracker
of the project: AVR C Runtime Library.
/**************************************************************************/
[bugs #10489] Latest Modifications:
Changes by:
Eric Weddington <address@hidden>
'Date:
Tue 12/21/2004 at 18:35 (America/Denver)
What | Removed | Added
---------------------------------------------------------------------------
Severity | 5 - Average | 9 - Blocker
/**************************************************************************/
[bugs #10489] Full Item Snapshot:
URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=10489>
Project: AVR C Runtime Library
Submitted by: 0
On: Fri 09/24/2004 at 21:57
Category: Header
Severity: 9 - Blocker
Item Group: None
Resolution: None
Privacy: Public
Assigned to: arcanum
Originator Email: address@hidden
Status: Open
Summary: Sleep.h omission for atmega48/88/168 family
Original Submission: To support the ATMega48/88/168 family, the sleep_mode()
#define in sleep.h file needs to include a branch for "if SMCR defined". The
set_sleep_mode() function had this branch, but not sleep_mode(). The SE bit
resides in the SMCR register on these devices.
#if defined(DOXYGEN)
extern void sleep_mode (void);
#else
# if defined (SMCR)
# define sleep_mode()
{
SMCR |= _BV(SE);
__asm__ __volatile__ ("sleep" "nt" :: );
SMCR &= ~_BV(SE);
}
# else
# define sleep_mode()
{
MCUCR |= _BV(SE);
__asm__ __volatile__ ("sleep" "nt" :: );
MCUCR &= ~_BV(SE);
}
# endif
#endif
Attached is a proposed fix. It is based on V1.6 of sleep.h, since I get the
following compiler error at the lines where I call set_sleep_mode in 1.7 (and
1.6.2.1):
error: parse error before '}' token
during compilewhen it inserts the
File Attachments
-------------------
-------------------------------------------------------
Date: Fri 09/24/2004 at 21:57 Name: sleep.h Size: 5.08KB By: None
Proposed change for sleep.h
http://savannah.nongnu.org/bugs/download.php?item_id=10489&item_file_id=1705
For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=10489>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avr-libc-dev] [bugs #10489] Sleep.h omission for atmega48/88/168 family,
Eric Weddington <=