diff options
Diffstat (limited to 'cores/arduino/Arduino.h')
-rw-r--r--[-rwxr-xr-x] | cores/arduino/Arduino.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index f03c2bc..ac775f1 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> @@ -43,14 +44,12 @@ void yield(void); #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 @@ -106,6 +105,10 @@ void yield(void); #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; @@ -194,20 +197,21 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; #define TIMER0B 2 #define TIMER1A 3 #define TIMER1B 4 -#define TIMER2 5 -#define TIMER2A 6 -#define TIMER2B 7 - -#define TIMER3A 8 -#define TIMER3B 9 -#define TIMER3C 10 -#define TIMER4A 11 -#define TIMER4B 12 -#define TIMER4C 13 -#define TIMER4D 14 -#define TIMER5A 15 -#define TIMER5B 16 -#define TIMER5C 17 +#define TIMER1C 5 +#define TIMER2 6 +#define TIMER2A 7 +#define TIMER2B 8 + +#define TIMER3A 9 +#define TIMER3B 10 +#define TIMER3C 11 +#define TIMER4A 12 +#define TIMER4B 13 +#define TIMER4C 14 +#define TIMER4D 15 +#define TIMER5A 16 +#define TIMER5B 17 +#define TIMER5C 18 #ifdef __cplusplus } // extern "C" @@ -217,6 +221,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); |