avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2110] 2010-03-25 Eric B.


From: Eric Weddington
Subject: [avr-libc-commit] [2110] 2010-03-25 Eric B.
Date: Thu, 25 Mar 2010 23:40:32 +0000

Revision: 2110
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2110
Author:   arcanum
Date:     2010-03-25 23:40:31 +0000 (Thu, 25 Mar 2010)
Log Message:
-----------
2010-03-25  Eric B. Weddington  <address@hidden>

        Add support for new architecture: avrtiny10. Add support for new 
devices:
        attiny4, attiny5, attiny9, attiny10, attiny20, attiny40.
        * configure.ac: Add support for new devices.
        * devtools/gen-avr-lib-tree.sh: Same.
        * include/avr/Makefile.am: Same.
        * include/avr/io.h: Same.
        * doc/api/main_page.dox: Same.
        * doc/api/using-tools.dox: Same.
        * include/avr/power.h: Same.
        * include/avr/sleep.h: Same.
        * NEWS: Add news item.

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/configure.ac
    trunk/avr-libc/devtools/gen-avr-lib-tree.sh
    trunk/avr-libc/doc/api/main_page.dox
    trunk/avr-libc/doc/api/using-tools.dox
    trunk/avr-libc/include/avr/Makefile.am
    trunk/avr-libc/include/avr/io.h
    trunk/avr-libc/include/avr/power.h
    trunk/avr-libc/include/avr/sleep.h

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2010-03-25 18:59:06 UTC (rev 2109)
+++ trunk/avr-libc/ChangeLog    2010-03-25 23:40:31 UTC (rev 2110)
@@ -1,5 +1,19 @@
 2010-03-25  Eric B. Weddington  <address@hidden>
 
+       Add support for new architecture: avrtiny10. Add support for new 
devices:
+       attiny4, attiny5, attiny9, attiny10, attiny20, attiny40.
+       * configure.ac: Add support for new devices.
+       * devtools/gen-avr-lib-tree.sh: Same.
+       * include/avr/Makefile.am: Same.
+       * include/avr/io.h: Same.
+       * doc/api/main_page.dox: Same.
+       * doc/api/using-tools.dox: Same.
+       * include/avr/power.h: Same.
+       * include/avr/sleep.h: Same.
+       * NEWS: Add news item.
+
+2010-03-25  Eric B. Weddington  <address@hidden>
+
        Add support for new devices: ATxmega128A1U, ATxmega64A1U.
        * configure.ac: Add support for new devices.
        * devtools/gen-avr-lib-tree.sh: Same.
@@ -24,8 +38,8 @@
 
 2010-03-19  Eric B. Weddington  <address@hidden>
 
-    * include/avr/iotn20.h: New file.
-    * include/avr/iotn40.h: New file.
+       * include/avr/iotn20.h: New file.
+       * include/avr/iotn40.h: New file.
 
 2010-03-17  Joerg Wunsch <address@hidden>
 

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2010-03-25 18:59:06 UTC (rev 2109)
+++ trunk/avr-libc/NEWS 2010-03-25 23:40:31 UTC (rev 2110)
@@ -158,15 +158,17 @@
   - Signature API added in <avr/signature.h>.
 
   - All functions are now placed in the .text.avr-libc section, and the 
-  floating point functions are placed in the .text.avr-libc.fplib section. This
-  allows the user the ability to relocate all avr-libc routines to a different
-  address using a custom linker script.
+    floating point functions are placed in the .text.avr-libc.fplib section. 
This
+    allows the user the ability to relocate all avr-libc routines to a 
different
+    address using a custom linker script.
 
   - The port/pin assignments of the HD44780 LCD controller in the
     stdiodemo example can now be distributed across more than a single
     AVR port.  The only remaining requirement is that all data bits
     are assigned to a single port in ascending order.
 
+  - Added support for avrtiny10 architecture, to support the ATtiny10 Family.
+  
 
 * New devices supported:
   
@@ -234,6 +236,12 @@
   + ATmega329PA
   + ATxmega128A1U
   + ATxmega64A1U
+  + ATtiny4
+  + ATtiny5
+  + ATtiny9
+  + ATtiny10
+  + ATtiny20
+  + ATtiny40
 
 
 * Optimized functions:

Modified: trunk/avr-libc/configure.ac
===================================================================
--- trunk/avr-libc/configure.ac 2010-03-25 18:59:06 UTC (rev 2109)
+++ trunk/avr-libc/configure.ac 2010-03-25 23:40:31 UTC (rev 2110)
@@ -953,6 +953,31 @@
 AM_CONDITIONAL(HAS_atxmega128a1u, test "x$HAS_atxmega128a1u" = "xyes")
 
 
+# avrtiny10
+CHECK_AVR_DEVICE(avrtiny10)
+AM_CONDITIONAL(HAS_avrtiny10, test "x$HAS_avrtiny10" = "xyes")
+
+CHECK_AVR_DEVICE(attiny4)
+AM_CONDITIONAL(HAS_attiny4, test "x$HAS_attiny4" = "xyes")
+
+CHECK_AVR_DEVICE(attiny5)
+AM_CONDITIONAL(HAS_attiny5, test "x$HAS_attiny5" = "xyes")
+
+CHECK_AVR_DEVICE(attiny9)
+AM_CONDITIONAL(HAS_attiny9, test "x$HAS_attiny9" = "xyes")
+
+CHECK_AVR_DEVICE(attiny10)
+AM_CONDITIONAL(HAS_attiny10, test "x$HAS_attiny10" = "xyes")
+
+CHECK_AVR_DEVICE(attiny20)
+AM_CONDITIONAL(HAS_attiny20, test "x$HAS_attiny20" = "xyes")
+
+CHECK_AVR_DEVICE(attiny40)
+AM_CONDITIONAL(HAS_attiny40, test "x$HAS_attiny40" = "xyes")
+
+
+
+
 # Generate all files from *.in sources.
 
 AC_CONFIG_FILES([
@@ -1252,4 +1277,16 @@
 ])
 
 
+# avrtiny10
+AC_CONFIG_FILES([
+       avr/lib/avrtiny10/Makefile
+       avr/lib/avrtiny10/attiny4/Makefile
+       avr/lib/avrtiny10/attiny5/Makefile
+       avr/lib/avrtiny10/attiny9/Makefile
+       avr/lib/avrtiny10/attiny10/Makefile
+       avr/lib/avrtiny10/attiny20/Makefile
+       avr/lib/avrtiny10/attiny40/Makefile
+])
+
+
 AC_OUTPUT

Modified: trunk/avr-libc/devtools/gen-avr-lib-tree.sh
===================================================================
--- trunk/avr-libc/devtools/gen-avr-lib-tree.sh 2010-03-25 18:59:06 UTC (rev 
2109)
+++ trunk/avr-libc/devtools/gen-avr-lib-tree.sh 2010-03-25 23:40:31 UTC (rev 
2110)
@@ -287,6 +287,16 @@
 atxmega128a1u:crtx128a1u.o:${DEV_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS}\
 "
 
+AVRTINY10_DEV_INFO="\
+attiny4:crttn4.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+attiny5:crttn5.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+attiny9:crttn9.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+attiny10:crttn10.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+attiny20:crttn20.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+attiny40:crttn40.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\
+"
+
+
 LIB_DEFS="-D__COMPILING_AVR_LIBC__"
 
 AVR_ARH_INFO="\
@@ -304,7 +314,8 @@
 avrxmega4:AVRXMEGA4_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 avrxmega5:AVRXMEGA5_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 avrxmega6:AVRXMEGA6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
-avrxmega7:AVRXMEGA7_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS}\
+avrxmega7:AVRXMEGA7_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
+avrtiny10:AVRTINY10_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\
 "
 
 echo "Generating source directories:"

Modified: trunk/avr-libc/doc/api/main_page.dox
===================================================================
--- trunk/avr-libc/doc/api/main_page.dox        2010-03-25 18:59:06 UTC (rev 
2109)
+++ trunk/avr-libc/doc/api/main_page.dox        2010-03-25 23:40:31 UTC (rev 
2110)
@@ -148,11 +148,15 @@
 
 \par tinyAVR Devices:
 
+- attiny4
+- attiny5
+- attiny10
 - attiny11 \ref supp_dev_footnote_one "[1]"
 - attiny12 \ref supp_dev_footnote_one "[1]"
 - attiny13
 - attiny13a
 - attiny15 \ref supp_dev_footnote_one "[1]"
+- attiny20
 - attiny22
 - attiny24
 - attiny24a
@@ -163,6 +167,7 @@
 - attiny28 \ref supp_dev_footnote_one "[1]"
 - attiny2313
 - attiny2313a
+- attiny40
 - attiny4313
 - attiny43u
 - attiny44
@@ -313,7 +318,7 @@
 license conditions are met.
 
 \verbatim
-Portions of avr-libc are Copyright (c) 1999-2008
+Portions of avr-libc are Copyright (c) 1999-2010
 Werner Boellmann,
 Dean Camera,
 Pieter Conradie,

Modified: trunk/avr-libc/doc/api/using-tools.dox
===================================================================
--- trunk/avr-libc/doc/api/using-tools.dox      2010-03-25 18:59:06 UTC (rev 
2109)
+++ trunk/avr-libc/doc/api/using-tools.dox      2010-03-25 23:40:31 UTC (rev 
2110)
@@ -394,6 +394,13 @@
 
   <tr><td>avrxmega7</td><td>atxmega128a1</td><td>__AVR_ATxmega128A1__</td></tr>
   
<tr><td>avrxmega7</td><td>atxmega128a1u</td><td>__AVR_ATxmega128A1U__</td></tr>
+  
+  <tr><td>avrtiny10</td><td>attiny4</td><td>__AVR_ATtiny4__</td></tr>
+  <tr><td>avrtiny10</td><td>attiny5</td><td>__AVR_ATtiny5__</td></tr>
+  <tr><td>avrtiny10</td><td>attiny9</td><td>__AVR_ATtiny9__</td></tr>
+  <tr><td>avrtiny10</td><td>attiny10</td><td>__AVR_ATtiny10__</td></tr>
+  <tr><td>avrtiny10</td><td>attiny20</td><td>__AVR_ATtiny20__</td></tr>
+  <tr><td>avrtiny10</td><td>attiny40</td><td>__AVR_ATtiny40__</td></tr>
 
   </table>
   </p>

Modified: trunk/avr-libc/include/avr/Makefile.am
===================================================================
--- trunk/avr-libc/include/avr/Makefile.am      2010-03-25 18:59:06 UTC (rev 
2109)
+++ trunk/avr-libc/include/avr/Makefile.am      2010-03-25 23:40:31 UTC (rev 
2110)
@@ -138,12 +138,17 @@
     iomxx0_1.h \
     iomxx4.h \
     iomxxhva.h \
+    iotn4.h \
+    iotn5.h \
+    iotn9.h \
+    iotn10.h \
     iotn11.h \
     iotn12.h \
     iotn13.h \
     iotn13a.h \
     iotn15.h \
     iotn167.h \
+    iotn20.h \
     iotn22.h \
     iotn2313.h \
     iotn2313a.h \
@@ -154,6 +159,7 @@
     iotn261.h \
     iotn261a.h \
     iotn28.h \
+    iotn40.h \
     iotn4313.h \
     iotn43u.h \
     iotn44.h \

Modified: trunk/avr-libc/include/avr/io.h
===================================================================
--- trunk/avr-libc/include/avr/io.h     2010-03-25 18:59:06 UTC (rev 2109)
+++ trunk/avr-libc/include/avr/io.h     2010-03-25 23:40:31 UTC (rev 2110)
@@ -306,6 +306,18 @@
 #  include <avr/io2323.h>
 #elif defined (__AVR_AT90S2313__)
 #  include <avr/io2313.h>
+#elif defined (__AVR_ATtiny4__)
+#  include <avr/iotn4.h>
+#elif defined (__AVR_ATtiny5__)
+#  include <avr/iotn5.h>
+#elif defined (__AVR_ATtiny9__)
+#  include <avr/iotn9.h>
+#elif defined (__AVR_ATtiny10__)
+#  include <avr/iotn10.h>
+#elif defined (__AVR_ATtiny20__)
+#  include <avr/iotn20.h>
+#elif defined (__AVR_ATtiny40__)
+#  include <avr/iotn40.h>
 #elif defined (__AVR_ATtiny2313__)
 #  include <avr/iotn2313.h>
 #elif defined (__AVR_ATtiny2313A__)

Modified: trunk/avr-libc/include/avr/power.h
===================================================================
--- trunk/avr-libc/include/avr/power.h  2010-03-25 18:59:06 UTC (rev 2109)
+++ trunk/avr-libc/include/avr/power.h  2010-03-25 23:40:31 UTC (rev 2110)
@@ -1241,7 +1241,11 @@
 }while(0)
 
 
-#elif defined(__AVR_ATtiny13A__)
+#elif defined(__AVR_ATtiny4__) \
+|| defined(__AVR_ATtiny5__) \
+|| defined(__AVR_ATtiny9__) \
+|| defined(__AVR_ATtiny10__) \
+|| defined(__AVR_ATtiny13A__) \
 
 #define power_adc_enable()   (PRR &= (uint8_t)~(1 << PRADC))
 #define power_adc_disable()  (PRR |= (uint8_t)(1 << PRADC))
@@ -1252,6 +1256,28 @@
 #define power_all_enable()      (PRR &= (uint8_t)~((1<<PRADC)|(1<<PRTIM0)))
 #define power_all_disable()     (PRR |= (uint8_t)((1<<PRADC)|(1<<PRTIM0)))
 
+
+#elif defined(__AVR_ATtiny20__) \
+|| defined(__AVR_ATtiny40__)
+
+#define power_adc_enable()   (PRR &= (uint8_t)~(1 << PRADC))
+#define power_adc_disable()  (PRR |= (uint8_t)(1 << PRADC))
+
+#define power_timer0_enable()   (PRR &= (uint8_t)~(1 << PRTIM0))
+#define power_timer0_disable()  (PRR |= (uint8_t)(1 << PRTIM0))
+
+#define power_timer1_enable()   (PRR &= (uint8_t)~(1 << PRTIM1))
+#define power_timer1_disable()  (PRR |= (uint8_t)(1 << PRTIM1))
+
+#define power_spi_enable()   (PRR &= (uint8_t)~(1 << PRSPI))
+#define power_spi_disable()  (PRR |= (uint8_t)(1 << PRSPI))
+
+#define power_twi_enable()   (PRR &= (uint8_t)~(1 << PRTWI))
+#define power_twi_disable()  (PRR |= (uint8_t)(1 << PRTWI))
+
+#define power_all_enable()      (PRR &= 
(uint8_t)~((1<<PRADC)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRSPI)|(1<<PRTWI)))
+#define power_all_disable()     (PRR |= 
(uint8_t)((1<<PRADC)|(1<<PRTIM0)|(1<<PRTIM1)|(1<<PRSPI)|(1<<PRTWI)))
+
 #endif
 
 

Modified: trunk/avr-libc/include/avr/sleep.h
===================================================================
--- trunk/avr-libc/include/avr/sleep.h  2010-03-25 18:59:06 UTC (rev 2109)
+++ trunk/avr-libc/include/avr/sleep.h  2010-03-25 23:40:31 UTC (rev 2110)
@@ -472,6 +472,23 @@
         _SLEEP_CONTROL_REG = ((_SLEEP_CONTROL_REG & ~(_BV(SM0) | _BV(SM1) | 
_BV(SM2))) | (mode)); \
     } while(0)
 
+#elif defined(__AVR_ATtiny4__) \
+|| defined(__AVR_ATtiny5__) \
+|| defined(__AVR_ATtiny9__) \
+|| defined(__AVR_ATtiny10__) \
+|| defined(__AVR_ATtiny20__) \
+|| defined(__AVR_ATtiny40__)
+
+    #define SLEEP_MODE_IDLE         0
+    #define SLEEP_MODE_ADC          _BV(SM0)
+    #define SLEEP_MODE_PWR_DOWN     _BV(SM1)
+    #define SLEEP_MODE_STANDBY      _BV(SM2)
+
+    #define set_sleep_mode(mode) \
+    do { \
+        _SLEEP_CONTROL_REG = ((_SLEEP_CONTROL_REG & ~(_BV(SM0) | _BV(SM1) | 
_BV(SM2))) | (mode)); \
+    } while(0)
+
 #else
 
     #error "No SLEEP mode defined for this device."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]