diff options
Diffstat (limited to 'cores/arduino/Arduino.h')
-rw-r--r--[-rwxr-xr-x] | cores/arduino/Arduino.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 3b9ccca..e12ac82 100755..100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -1,3 +1,22 @@ +/* + Arduino.h - Main include file for the Arduino SDK + Copyright (c) 2005-2013 Arduino Team. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + #ifndef Arduino_h #define Arduino_h @@ -15,6 +34,8 @@ extern "C"{ #endif +void yield(void); + #define HIGH 0x1 #define LOW 0x0 @@ -30,6 +51,7 @@ extern "C"{ #define TWO_PI 6.283185307179586476925286766559 #define DEG_TO_RAD 0.017453292519943295769236907684886 #define RAD_TO_DEG 57.295779513082320876798154814105 +#define EULER 2.718281828459045235360287471352 #define SERIAL 0x0 #define DISPLAY 0x1 @@ -85,6 +107,10 @@ extern "C"{ #define bitClear(value, bit) ((value) &= ~(1UL << (bit))) #define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) +// avr-libc defines _NOP() since 1.6.2 +#ifndef _NOP +#define _NOP() do { __asm__ volatile ("nop"); } while (0) +#endif typedef unsigned int word; @@ -149,6 +175,8 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; #define NOT_A_PIN 0 #define NOT_A_PORT 0 +#define NOT_AN_INTERRUPT -1 + #ifdef ARDUINO_MAIN #define PA 1 #define PB 2 @@ -191,6 +219,10 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; #include "WCharacter.h" #include "WString.h" #include "HardwareSerial.h" +#include "USBAPI.h" +#if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL) +#error "Targets with both UART0 and CDC serial not supported" +#endif uint16_t makeWord(uint16_t w); uint16_t makeWord(byte h, byte l); |