DISCO-F303VC Example

Dependencies:   mbed mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
davidahuertas
Date:
Fri May 06 05:47:52 2022 +0000
Commit message:
Este lab es para correr en la tarjeta DISCO-F303VC

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 06 05:47:52 2022 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "rtos.h"
+ 
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalIn pb1(A0);
+DigitalIn pb2(D0);
+Thread thread1;
+Thread thread2;
+
+void led1_thread1() {
+    while (true) {
+        led1 = pb1;
+    }
+}
+ 
+void led2_thread2() {
+    while (true) {
+        led2 = pb2;
+    }
+}
+ 
+int main() {
+    thread1.start(led1_thread1);
+    thread2.start(led2_thread2);
+    
+    while (true) {
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Fri May 06 05:47:52 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed-rtos/#5713cbbdb706
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 06 05:47:52 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file