avr/cpp/Assembler.h

Go to the documentation of this file.
00001 /**********************************************************************************************************************\
00002 
00003         C++ library for Atmel AVR microcontrollers
00004         Copyright (C) 2007 Lauri Kirikal, Mikk Leini, MT� TT� Robotiklubi
00005 
00006         This program is free software; you can redistribute it and/or
00007         modify it under the terms of the GNU General Public License
00008         as published by the Free Software Foundation; either version 2
00009         of the License, or (at your option) any later version.
00010 
00011         This program is distributed in the hope that it will be useful,
00012         but WITHOUT ANY WARRANTY; without even the implied warranty of
00013         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014         GNU General Public License for more details.
00015 
00016         You should have received a copy of the GNU General Public License
00017         along with this program; if not, write to the Free Software
00018         Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019 
00020         See http://creativecommons.org/licenses/GPL/2.0/
00021 
00022         MT� TT� Robotiklubi  http://www.robotiklubi.ee robotiklubi@gmail.com
00023         Lauri Kirikal        laurikirikal@gmail.com
00024         Mikk Leini           mikk.leini@gmail.com
00025         
00026 \**********************************************************************************************************************/
00027 
00028 #ifndef __AVR_CPP_ASSEMBLER_H__
00029 #define __AVR_CPP_ASSEMBLER_H__
00030 
00031 #ifndef __cplusplus
00032 #error "EEPROM.h needs C++ compiler."
00033 #else
00034 
00035 
00036 /**********************************************************************************************************************\
00037 
00038         General assembler functions
00039 
00040 \**********************************************************************************************************************/
00041 
00042 namespace AVRCpp
00043 {
00044         namespace Assembler
00045         {
00046                 inline void CLI() { __asm__ __volatile__ ("cli"); }
00047                 inline void SEI() { __asm__ __volatile__ ("sei"); }
00048                 inline void NOP() { __asm__ __volatile__ ("nop"); }
00049                 inline void WDR() { __asm__ __volatile__ ("wdr"); }
00050                 inline void SLEEP() { __asm__ __volatile__ ("sleep"); }
00051                 
00052         } // namespace Assembler
00053 
00054 } // namespace AVRCpp
00055 
00056 /**********************************************************************************************************************/
00057 
00058 #endif // ifndef __cplusplus
00059 #endif // ifndef __AVR_CPP_ASSEMBLER_H__

Generated on Sat Sep 15 23:40:30 2007 for AVR C++ Lib for ATmega164P by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi