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.
Dependents: Gameduino Factory_monitor_0v1 mbed_mindflex NEW_NFC_TEST
Revision 1:b22cf6a5957d, committed 2012-10-21
- Comitter:
- TheChrisyd
- Date:
- Sun Oct 21 14:47:26 2012 +0000
- Parent:
- 0:8d785e80d3ba
- Child:
- 2:622cd7b451f8
- Commit message:
- moved defines to arduino.h
Changed in this revision
| arduino.c | Show annotated file Show diff for this revision Revisions of this file |
| arduino.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/arduino.c Sun Oct 21 14:26:18 2012 +0000
+++ b/arduino.c Sun Oct 21 14:47:26 2012 +0000
@@ -115,16 +115,6 @@
return arduino_timer.read_us();
}
-/** Macro for delay()
- *
- * @param void
- */
-#define delay(x) (wait_ms(x))
-/** Macro for delayMicroseconds()
- *
- * @param void
- */
-#define delayMicroseconds(x) (wait_us(x))
/*****************************************************
Maths
@@ -139,21 +129,6 @@
*****************************************************/
-/** Macro for min()
- *
- * @param any
- */
-#define min(a,b) ((a)<(b)?(a):(b))
-/** Macro for max()
- *
- * @param any
- */
-#define max(a,b) ((a)>(b)?(a):(b))
-/** Macro for abs()
- *
- * @param any
- */
-#define abs(x) ((x)>0?(x):(x*-1))
/*****************************************************
Trigonometry
@@ -172,11 +147,6 @@
*****************************************************/
-/** Macro for randomSeed()
- *
- * @param int
- */
-#define randomSeed(x) srand(x)
/** generates a random number from 0 to defined number
*
* @param number maximum value for random number
--- a/arduino.h Sun Oct 21 14:26:18 2012 +0000 +++ b/arduino.h Sun Oct 21 14:47:26 2012 +0000 @@ -24,7 +24,7 @@ * This is a library for allowing the use of programs written for the Arduino * with the mbed. This was started for use with the Gameduino shield Library * - * + * @file "arduino.c" */ #ifndef ARDUINO_H #define ARDUINO_H @@ -45,6 +45,41 @@ #define word(x) ((word)x) #define long(x) ((long)x) #define float(x) ((float)x) + +/** Macro for delay() + * + * @param void + */ +#define delay(x) (wait_ms(x)) +/** Macro for delayMicroseconds() + * + * @param void + */ +#define delayMicroseconds(x) (wait_us(x)) + +/** Macro for min() + * + * @param any + */ +#define min(a,b) ((a)<(b)?(a):(b)) +/** Macro for max() + * + * @param any + */ +#define max(a,b) ((a)>(b)?(a):(b)) +/** Macro for abs() + * + * @param any + */ +#define abs(x) ((x)>0?(x):(x*-1)) + +/** Macro for randomSeed() + * + * @param int + */ +#define randomSeed(x) srand(x) + + // typedefs typedef unsigned char prog_uint8_t;