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:ccdbd8ba770f, committed 2022-04-10
- Comitter:
- cspista
- Date:
- Sun Apr 10 12:17:36 2022 +0000
- Commit message:
- Final version
Changed in this revision
diff -r 000000000000 -r ccdbd8ba770f main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Apr 10 12:17:36 2022 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "rtos.h"
+
+DigitalOut LEDs[4] = {DigitalOut(D13), DigitalOut(D12), DigitalOut(D11), DigitalOut(D10)};
+
+void blink(void const *n) {
+ LEDs[(int)n] = !LEDs[(int)n];
+}
+
+int main(void) {
+ RtosTimer led_1_timer(blink, osTimerPeriodic, (void *)0);
+ RtosTimer led_2_timer(blink, osTimerPeriodic, (void *)1);
+ RtosTimer led_3_timer(blink, osTimerPeriodic, (void *)2);
+ RtosTimer led_4_timer(blink, osTimerPeriodic, (void *)3);
+
+ led_1_timer.start(2000);
+ led_2_timer.start(1000);
+ led_3_timer.start(500);
+ led_4_timer.start(250);
+
+ Thread::wait(osWaitForever);
+}
\ No newline at end of file
diff -r 000000000000 -r ccdbd8ba770f mbed-rtos.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Sun Apr 10 12:17:36 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed-rtos/#5713cbbdb706
diff -r 000000000000 -r ccdbd8ba770f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Apr 10 12:17:36 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file