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 0:c29a7bf28278, committed 2010-11-14
- Comitter:
- Alkorin
- Date:
- Sun Nov 14 22:50:00 2010 +0000
- Commit message:
Changed in this revision
diff -r 000000000000 -r c29a7bf28278 SimpleLib.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SimpleLib.lib Sun Nov 14 22:50:00 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Alkorin/code/SimpleLib/#73f0f5d18800
diff -r 000000000000 -r c29a7bf28278 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Nov 14 22:50:00 2010 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "leds.h"
+#include "timers.h"
+
+TIMER0_INTERRUPT_HANDLER(void)
+{
+    TIMER0_CLEAR_INTERRUPT(MR0_INT);
+    static int i = 0;
+    i++;
+    if(i%2)
+        LEDS_SET(LED1);
+    else
+        LEDS_SET(LED2);
+}
+
+int main() {
+    LEDS_INIT();
+    TIMER0_INIT();
+    TIMER0_SETPCLK(CCLK);
+    TIMER0_SETPRESCALE(96000); // 1ms
+    TIMER0_SETMATCH(0, 100);
+    TIMER0_SETMATCHCONTROL(0, MATCH_RESET | MATCH_INTERRUPT); // Reset and Interrupt each 100ms
+    TIMER0_ENABLE_INTERRUPT();
+    TIMER0_START();
+    while (1);
+}
diff -r 000000000000 -r c29a7bf28278 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Nov 14 22:50:00 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e