Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Arduino_lib/Arduino.h@0:b1ce54272580, 2020-01-18 (annotated)
- Committer:
- kotakku
- Date:
- Sat Jan 18 15:06:35 2020 +0000
- Revision:
- 0:b1ce54272580
- Child:
- 1:da31140f2a1c
1.0.0 first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kotakku | 0:b1ce54272580 | 1 | #ifndef __arduino_h__ |
kotakku | 0:b1ce54272580 | 2 | #define __arduino_h__ |
kotakku | 0:b1ce54272580 | 3 | |
kotakku | 0:b1ce54272580 | 4 | #include "mbed.h" |
kotakku | 0:b1ce54272580 | 5 | #ifndef M_PI |
kotakku | 0:b1ce54272580 | 6 | #define M_PI 3.159265358979 |
kotakku | 0:b1ce54272580 | 7 | #endif |
kotakku | 0:b1ce54272580 | 8 | |
kotakku | 0:b1ce54272580 | 9 | #include <math.h> |
kotakku | 0:b1ce54272580 | 10 | #include "Print.h" |
kotakku | 0:b1ce54272580 | 11 | #include "Stream.h" |
kotakku | 0:b1ce54272580 | 12 | |
kotakku | 0:b1ce54272580 | 13 | //#include "SerialClass.h" // Arduino style Serial class |
kotakku | 0:b1ce54272580 | 14 | |
kotakku | 0:b1ce54272580 | 15 | #define min(a,b) ((a)<(b)?(a):(b)) |
kotakku | 0:b1ce54272580 | 16 | #define max(a,b) ((a)>(b)?(a):(b)) |
kotakku | 0:b1ce54272580 | 17 | |
kotakku | 0:b1ce54272580 | 18 | #define PI M_PI |
kotakku | 0:b1ce54272580 | 19 | #define RAD_TO_DEG (180.0 / M_PI) |
kotakku | 0:b1ce54272580 | 20 | |
kotakku | 0:b1ce54272580 | 21 | #define delay(ms) wait_ms(ms) |
kotakku | 0:b1ce54272580 | 22 | #define delayMicroseconds(us) wait_us(us) |
kotakku | 0:b1ce54272580 | 23 | #define millis() (USB::read_ms()) |
kotakku | 0:b1ce54272580 | 24 | #define micros() (USB::read_us()) |
kotakku | 0:b1ce54272580 | 25 | |
kotakku | 0:b1ce54272580 | 26 | #endif |
kotakku | 0:b1ce54272580 | 27 |