bugAVR C Runtime Library - Bugs: bug #10489, Sleep.h omission for...

 
 

bug #10489: Sleep.h omission for atmega48/88/168 family

Submitted by:  None
Submitted on:  Fri 24 Sep 2004 09:57:42 PM UTC  
 
Category: HeaderSeverity: 6 - Security
Priority: 9 - ImmediateItem Group: None
Status: FixedPercent Complete: 100%
Assigned to: Eric Weddington <arcanum>Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 22 Dec 2004 10:48:33 PM UTC, comment #1:

Set to 100%, fix is not yet committed. Waiting for

Eric Weddington <arcanum>
Project AdministratorIn charge of this item.
Fri 24 Sep 2004 09:57:42 PM UTC, 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" "\n\t" :: ); \
SMCR &= ~_BV(SE); \
}
# else
# define sleep_mode() \
{ \
MCUCR |= _BV(SE); \
_asm_ __volatile__ ("sleep" "\n\t" :: ); \
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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #1800:  sleep.h added by None (5KiB - text/plain - Proposed change for sleep.h)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 30 Dec 2004 12:30:52 AM UTCarcanumStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Wed 22 Dec 2004 10:48:33 PM UTCarcanumPercent Complete0%=>100%
Wed 22 Dec 2004 10:05:51 PM UTCarcanumPriority5 - Normal=>9 - Immediate
Tue 21 Dec 2004 06:35:05 PM UTCarcanumSeverity3 - Normal=>6 - Security
Mon 22 Nov 2004 08:52:44 PM UTCarcanumAssigned toNone=>arcanum
Fri 24 Sep 2004 09:57:42 PM UTCNoneAttached File-=>Added sleep.h, #1705

Back to the top


Powered by Savane 3.1-cleanup1