Test arduino code

Dependents:   DR14_4D7S_US

Fork of ArduinoHAL by René Bohne

Committer:
rbohne
Date:
Sat Jun 04 20:01:33 2011 +0000
Revision:
2:7e1ff33bc76a
Child:
3:d0f535da303e
added some basic wiring functions

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rbohne 2:7e1ff33bc76a 1 /*
rbohne 2:7e1ff33bc76a 2 wiring_private.h - Internal header file.
rbohne 2:7e1ff33bc76a 3 Part of Arduino - http://www.arduino.cc/
rbohne 2:7e1ff33bc76a 4
rbohne 2:7e1ff33bc76a 5 Copyright (c) 2005-2006 David A. Mellis
rbohne 2:7e1ff33bc76a 6
rbohne 2:7e1ff33bc76a 7 This library is free software; you can redistribute it and/or
rbohne 2:7e1ff33bc76a 8 modify it under the terms of the GNU Lesser General Public
rbohne 2:7e1ff33bc76a 9 License as published by the Free Software Foundation; either
rbohne 2:7e1ff33bc76a 10 version 2.1 of the License, or (at your option) any later version.
rbohne 2:7e1ff33bc76a 11
rbohne 2:7e1ff33bc76a 12 This library is distributed in the hope that it will be useful,
rbohne 2:7e1ff33bc76a 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
rbohne 2:7e1ff33bc76a 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
rbohne 2:7e1ff33bc76a 15 Lesser General Public License for more details.
rbohne 2:7e1ff33bc76a 16
rbohne 2:7e1ff33bc76a 17 You should have received a copy of the GNU Lesser General
rbohne 2:7e1ff33bc76a 18 Public License along with this library; if not, write to the
rbohne 2:7e1ff33bc76a 19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
rbohne 2:7e1ff33bc76a 20 Boston, MA 02111-1307 USA
rbohne 2:7e1ff33bc76a 21
rbohne 2:7e1ff33bc76a 22 $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $
rbohne 2:7e1ff33bc76a 23 */
rbohne 2:7e1ff33bc76a 24
rbohne 2:7e1ff33bc76a 25 #ifndef WiringPrivate_h
rbohne 2:7e1ff33bc76a 26 #define WiringPrivate_h
rbohne 2:7e1ff33bc76a 27
rbohne 2:7e1ff33bc76a 28 #include <avr/io.h>
rbohne 2:7e1ff33bc76a 29 #include <avr/interrupt.h>
rbohne 2:7e1ff33bc76a 30 #include <avr/delay.h>
rbohne 2:7e1ff33bc76a 31 #include <stdio.h>
rbohne 2:7e1ff33bc76a 32 #include <stdarg.h>
rbohne 2:7e1ff33bc76a 33
rbohne 2:7e1ff33bc76a 34 #include "wiring.h"
rbohne 2:7e1ff33bc76a 35
rbohne 2:7e1ff33bc76a 36 #ifdef __cplusplus
rbohne 2:7e1ff33bc76a 37 extern "C"{
rbohne 2:7e1ff33bc76a 38 #endif
rbohne 2:7e1ff33bc76a 39
rbohne 2:7e1ff33bc76a 40 #ifndef cbi
rbohne 2:7e1ff33bc76a 41 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
rbohne 2:7e1ff33bc76a 42 #endif
rbohne 2:7e1ff33bc76a 43 #ifndef sbi
rbohne 2:7e1ff33bc76a 44 #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
rbohne 2:7e1ff33bc76a 45 #endif
rbohne 2:7e1ff33bc76a 46
rbohne 2:7e1ff33bc76a 47 #define EXTERNAL_INT_0 0
rbohne 2:7e1ff33bc76a 48 #define EXTERNAL_INT_1 1
rbohne 2:7e1ff33bc76a 49 #define EXTERNAL_INT_2 2
rbohne 2:7e1ff33bc76a 50 #define EXTERNAL_INT_3 3
rbohne 2:7e1ff33bc76a 51 #define EXTERNAL_INT_4 4
rbohne 2:7e1ff33bc76a 52 #define EXTERNAL_INT_5 5
rbohne 2:7e1ff33bc76a 53 #define EXTERNAL_INT_6 6
rbohne 2:7e1ff33bc76a 54 #define EXTERNAL_INT_7 7
rbohne 2:7e1ff33bc76a 55
rbohne 2:7e1ff33bc76a 56 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
rbohne 2:7e1ff33bc76a 57 #define EXTERNAL_NUM_INTERRUPTS 8
rbohne 2:7e1ff33bc76a 58 #else
rbohne 2:7e1ff33bc76a 59 #define EXTERNAL_NUM_INTERRUPTS 2
rbohne 2:7e1ff33bc76a 60 #endif
rbohne 2:7e1ff33bc76a 61
rbohne 2:7e1ff33bc76a 62 typedef void (*voidFuncPtr)(void);
rbohne 2:7e1ff33bc76a 63
rbohne 2:7e1ff33bc76a 64 #ifdef __cplusplus
rbohne 2:7e1ff33bc76a 65 } // extern "C"
rbohne 2:7e1ff33bc76a 66 #endif
rbohne 2:7e1ff33bc76a 67
rbohne 2:7e1ff33bc76a 68 #endif