ina90.h
01 1 Copyright (c) 2002,2004 Marek Michalkiewicz
022All rights reserved.
033
044Redistribution and use in source and binary forms, with or without
055modification, are permitted provided that the following conditions are met:
066
077* Redistributions of source code must retain the above copyright
088notice, this list of conditions and the following disclaimer.
099
1010* Redistributions in binary form must reproduce the above copyright
1111notice, this list of conditions and the following disclaimer in
1212the documentation and/or other materials provided with the
1313distribution.
1414
1515* Neither the name of the copyright holders nor the names of
1616contributors may be used to endorse or promote products derived
1717from this software without specific prior written permission.
1818
1919THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2020AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2121IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2222ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2323LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2424CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2525SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2626INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2727CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2828ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2929POSSIBILITY OF SUCH DAMAGE. */
3030
3131/* $Id: ina90.h 932 2005-11-05 21:22:33Z joerg_wunsch $ */
3232/* copied from: Id: avr/ina90.h,v 1.8 2004/11/09 19:16:09 arcanum Exp */
3333
3434/*
3535ina90.h
3636
3737Contributors:
3838Created by Marek Michalkiewicz <marekm@linux.org.pl>
3939*/
4040
4141/**
4242\defgroup compat_ina90 <compat/ina90.h>: Compatibility with IAR EWB 3.x
4343
4444\code #include <compat/ina90.h> \endcode
4545
4646This is an attempt to provide some compatibility with
4747header files that come with IAR C, to make porting applications
4848between different compilers easier. No 100% compatibility though.
4949
5050\note For actual documentation, please see the IAR manual.
5151*/
5252
5353#ifndef _INA90_H_
5454#define _INA90_H_ 1
5555
5656#define _CLI() do { __asm__ __volatile__ ("cli"); } while (0)
5757#define _SEI() do { __asm__ __volatile__ ("sei"); } while (0)
5858#define _NOP() do { __asm__ __volatile__ ("nop"); } while (0)
5959#define _WDR() do { __asm__ __volatile__ ("wdr"); } while (0)
6060#define _SLEEP() do { __asm__ __volatile__ ("sleep"); } while (0)
6161#define _OPC(op) do { __asm__ __volatile__ (".word %0" : : "n" (op)); } while (0)
6262
6363/* _LPM, _ELPM */
6464#include <