[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-commit] [2433] bug #40569: define BOD_CONTROL_REG based on BOD
From: |
Pitchumani |
Subject: |
[avr-libc-commit] [2433] bug #40569: define BOD_CONTROL_REG based on BODCR or MCUCR so that sleep_bod_disable macro can use that instead of MCUCR always . |
Date: |
Wed, 30 Jul 2014 10:58:45 +0000 |
Revision: 2433
http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2433
Author: pitchumani
Date: 2014-07-30 10:58:44 +0000 (Wed, 30 Jul 2014)
Log Message:
-----------
bug #40569: define BOD_CONTROL_REG based on BODCR or MCUCR so that
sleep_bod_disable macro can use that instead of MCUCR always.
Ticket Links:
------------
http://savannah.gnu.org/bugs/?40569
Modified Paths:
--------------
trunk/avr-libc/ChangeLog
trunk/avr-libc/NEWS
trunk/avr-libc/include/avr/sleep.h
Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog 2014-07-24 11:59:35 UTC (rev 2432)
+++ trunk/avr-libc/ChangeLog 2014-07-30 10:58:44 UTC (rev 2433)
@@ -1,3 +1,9 @@
+2014-07-30 Matthijs Kooijman <matthijs>
+
+ Fix bug #40569: sleep_bod_disable does not work in attiny13a
+ * include/avr/sleep.h: define BOD_CONTROL_REG based on BODCR.
+ (sleep_bod_disable): use BOD_CONTROL_REG in place of MCUCR.
+
2014-07-24 Pitchumani Sivanupandi <address@hidden>
Move device ata6289 from avr25 arch group to avr4.
Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2014-07-24 11:59:35 UTC (rev 2432)
+++ trunk/avr-libc/NEWS 2014-07-30 10:58:44 UTC (rev 2433)
@@ -23,6 +23,7 @@
[#40003] Integer type promotion leads to inefficent code in wdt.h
[#40206] incorrect SP init in startup code for xmegas
[#40567] Invalid names in iotn13a.h (EEPE/EEMPE/BODS/BODSE)
+ [#40569] sleep_bod_disable does not work in attiny13a
[#40595] iotn2313a.h: wrong fuses definitions for High Fuse Byte
[#41006] iom328p.h: wrong fuse defaults
[#41519] wrong SPM_PAGESIZE definition in iotn[48]8.h
Modified: trunk/avr-libc/include/avr/sleep.h
===================================================================
--- trunk/avr-libc/include/avr/sleep.h 2014-07-24 11:59:35 UTC (rev 2432)
+++ trunk/avr-libc/include/avr/sleep.h 2014-07-30 10:58:44 UTC (rev 2433)
@@ -651,6 +651,16 @@
#if defined(BODS) && defined(BODSE)
+#ifdef BODCR
+
+#define BOD_CONTROL_REG BODCR
+
+#else
+
+#define BOD_CONTROL_REG MCUCR
+
+#endif
+
#define sleep_bod_disable() \
do { \
uint8_t tempreg; \
@@ -660,7 +670,7 @@
"andi %[tempreg], %[not_bodse]" "\n\t" \
"out %[mcucr], %[tempreg]" \
: [tempreg] "=&d" (tempreg) \
- : [mcucr] "I" _SFR_IO_ADDR(MCUCR), \
+ : [mcucr] "I" _SFR_IO_ADDR(BOD_CONTROL_REG), \
[bods_bodse] "i" (_BV(BODS) | _BV(BODSE)), \
[not_bodse] "i" (~_BV(BODSE))); \
} while (0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-commit] [2433] bug #40569: define BOD_CONTROL_REG based on BODCR or MCUCR so that sleep_bod_disable macro can use that instead of MCUCR always .,
Pitchumani <=