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.
Revision 1:602fea3e6f8b, committed 2011-01-01
- Comitter:
- hlipka
- Date:
- Sat Jan 01 22:38:54 2011 +0000
- Parent:
- 0:77b549539791
- Commit message:
- testing with classes derived from Base
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 77b549539791 -r 602fea3e6f8b main.cpp
--- a/main.cpp Tue Dec 21 20:29:11 2010 +0000
+++ b/main.cpp Sat Jan 01 22:38:54 2011 +0000
@@ -1,28 +1,24 @@
-#include "mbed.h"
-
-#define MALLOC_SIZE 0x2000
-
-DigitalOut led1(LED1);
-DigitalOut led2(LED2);
-DigitalOut led3(LED3);
-DigitalOut led4(LED4);
-
-int main() {
- led1=0;
- led2=0;
- led3=0;
- led4=0;
- printf("doing malloc 1\n");
- malloc(MALLOC_SIZE);
- led1=1;
- printf("doing malloc 2\n");
- malloc(MALLOC_SIZE);
- led2=1;
- printf("doing malloc 3\n");
- malloc(MALLOC_SIZE);
- led3=1;
- printf("doing malloc 4\n");
- malloc(MALLOC_SIZE);
- led4=1;
- printf("finished\n");
-}
+#include <stdio.h>
+#include "mbed.h"
+
+#define MALLOC_SIZE 0x2000
+
+class C2: Base
+{
+ public:
+ C2(int a){_a=a;}
+ private:
+ int _a;
+};
+
+C2 a(1);
+C2 b(2);
+
+int main() {
+ printf("doing test\n");
+ malloc(MALLOC_SIZE);
+ malloc(MALLOC_SIZE);
+ malloc(MALLOC_SIZE);
+ malloc(MALLOC_SIZE);
+ printf("finished\n");
+}