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

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

[avr-libc-commit] [2140] Added new headerfile: <avr/cpufunc.h>; currentl


From: Joerg Wunsch
Subject: [avr-libc-commit] [2140] Added new headerfile: <avr/cpufunc.h>; currently contains _NOP() and _MemoryBarrier().
Date: Tue, 08 Jun 2010 14:08:18 +0000

Revision: 2140
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2140
Author:   joerg_wunsch
Date:     2010-06-08 14:08:18 +0000 (Tue, 08 Jun 2010)
Log Message:
-----------
Added new headerfile: <avr/cpufunc.h>; currently contains _NOP() and 
_MemoryBarrier().

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/doc/api/doxygen.config.in
    trunk/avr-libc/include/avr/Makefile.am

Added Paths:
-----------
    trunk/avr-libc/include/avr/cpufunc.h

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2010-06-08 13:01:20 UTC (rev 2139)
+++ trunk/avr-libc/ChangeLog    2010-06-08 14:08:18 UTC (rev 2140)
@@ -1,5 +1,12 @@
 2010-06-08  Joerg Wunsch <address@hidden>
 
+       Implement new header file: <avr/cpufunc.h>
+       * include/avr/cpufunc.h: New file.
+       * include/avr/Makefile.am (avr_HEADERS): Add cpufunc.h.
+       * doc/api/doxygen.config.in (INPUT): Add avr/cpufunc.h.
+
+2010-06-08  Joerg Wunsch <address@hidden>
+
        Submitted by Bob Paddock:
        patch #6891: Add XMega software reset to the FAQ section on software
        reset

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2010-06-08 13:01:20 UTC (rev 2139)
+++ trunk/avr-libc/NEWS 2010-06-08 14:08:18 UTC (rev 2140)
@@ -178,6 +178,9 @@
     are assigned to a single port in ascending order.
 
   - Added support for avrtiny10 architecture, to support the ATtiny10 Family.
+
+  - Added new headerfile: <avr/cpufunc.h>; currently contains _NOP() and
+    _MemoryBarrier().
   
 
 * New devices supported:

Modified: trunk/avr-libc/doc/api/doxygen.config.in
===================================================================
--- trunk/avr-libc/doc/api/doxygen.config.in    2010-06-08 13:01:20 UTC (rev 
2139)
+++ trunk/avr-libc/doc/api/doxygen.config.in    2010-06-08 14:08:18 UTC (rev 
2140)
@@ -562,6 +562,7 @@
                          @top_srcdir@/include/string.h \
                          @top_srcdir@/libc \
                          @top_srcdir@/include/avr/boot.h \
+                         @top_srcdir@/include/avr/cpufunc.h \
                          @top_srcdir@/include/avr/eeprom.h \
                          @top_srcdir@/include/avr/fuse.h \
                          @top_srcdir@/include/avr/interrupt.h \

Modified: trunk/avr-libc/include/avr/Makefile.am
===================================================================
--- trunk/avr-libc/include/avr/Makefile.am      2010-06-08 13:01:20 UTC (rev 
2139)
+++ trunk/avr-libc/include/avr/Makefile.am      2010-06-08 14:08:18 UTC (rev 
2140)
@@ -33,6 +33,7 @@
 avr_HEADERS = \
     boot.h \
     common.h \
+    cpufunc.h \
     crc16.h \
     delay.h \
     eeprom.h \

Added: trunk/avr-libc/include/avr/cpufunc.h
===================================================================
--- trunk/avr-libc/include/avr/cpufunc.h                                (rev 0)
+++ trunk/avr-libc/include/avr/cpufunc.h        2010-06-08 14:08:18 UTC (rev 
2140)
@@ -0,0 +1,78 @@
+/* Copyright (c) 2010, Joerg Wunsch
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+   * Neither the name of the copyright holders nor the names of
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE. */
+
+/* $Id$ */
+
+/* avr/cpufunc.h - Special CPU functions */
+
+#ifndef _AVR_CPUFUNC_H_
+#define _AVR_CPUFUNC_H_ 1
+
+/** \file */
+/** \defgroup avr_cpufunc <avr/cpufunc.h>: Special AVR CPU functions
+    \code #include <avr/cpufunc.h> \endcode
+
+    This header file contains macros that access special functions of
+    the AVR CPU which do not fit into any of the other header files.
+
+*/
+
+/** \ingroup avr_cpufunc */
+/address@hidden/
+#if defined(__DOXYGEN__)
+/**
+   Execute a <i>no operation</i> (NOP) CPU instruction.  This
+   should not be used to implement delays, better use the functions
+   from <util/delay_basic.h> or <util/delay.h> for this.  For
+   debugging purposes, a NOP can be useful to have an instruction that
+   is guaranteed to be not optimized away by the compiler, so it can
+   always become a breakpoint in the debugger.
+*/
+#define _NOP()
+#else  /* real code */
+#define _NOP() __asm__ __volatile__("nop")
+#endif  /* __DOXYGEN__ */
+
+#if defined(__DOXYGEN__)
+/**
+   Implement a read/write <i>memory barrier</i>.  A memory
+   barrier instructs the compiler to not cache any memory data in
+   registers beyond the barrier.  This can sometimes be more effective
+   than blocking certain optimizations by declaring some object with a
+   \c volatile qualifier.
+*/
+#define _MemoryBarrier()
+#else  /* real code */
+#define _MemoryBarrier() __asm__ __volatile__(:::"memory")
+#endif  /* __DOXYGEN__ */
+
+/address@hidden/
+
+#endif /* _AVR_CPUFUNC_H_ */


Property changes on: trunk/avr-libc/include/avr/cpufunc.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Author Id Date
Added: svn:eol-style
   + native




reply via email to

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