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.
Diff: main.cpp
- Revision:
- 0:0c662a5aeb15
- Child:
- 1:08ed9f1ccd06
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Feb 28 10:36:09 2014 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+#define toggle(a) {a=a^1;}
+
+DigitalOut led1(LED1);
+Serial pc(USBTX, USBRX);
+
+class Student {
+ public:
+ Student(){
+ pc.printf("Student()\r\n");
+ }
+
+ ~Student(){
+ pc.printf("~Student()\r\n");
+ }
+
+ void foo() {
+ pc.printf("foo()\r\n");
+ }
+};
+
+int main() {
+
+ {
+ Student s;
+ s.foo();
+ }
+
+ while (1) {
+ toggle(led1);
+ wait(1);
+ };
+
+}