diff options
Diffstat (limited to 'cores/arduino/Arduino.h')
-rw-r--r--[-rwxr-xr-x] | cores/arduino/Arduino.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 93a3525..ec1389e 100755..100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -21,6 +21,7 @@ #define Arduino_h #include <stdlib.h> +#include <stdbool.h> #include <string.h> #include <math.h> @@ -34,6 +35,8 @@ extern "C"{ #endif +void yield(void); + #define HIGH 0x1 #define LOW 0x0 @@ -41,14 +44,12 @@ extern "C"{ #define OUTPUT 0x1 #define INPUT_PULLUP 0x2 -#define true 0x1 -#define false 0x0 - #define PI 3.1415926535897932384626433832795 #define HALF_PI 1.5707963267948966192313216916398 #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 @@ -104,6 +105,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; @@ -168,6 +173,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 @@ -210,6 +217,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); |