VPU_Ver1_test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
margadon
Date:
Thu Aug 13 09:05:56 2015 +0000
Commit message:
VPU Ver1 Test

Changed in this revision

main.cpp 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
diff -r 000000000000 -r 845648eb755f main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 13 09:05:56 2015 +0000
@@ -0,0 +1,44 @@
+// Прога для проверки плат VPU 
+
+#include "mbed.h"
+
+//DigitalOut myled(LED1);
+DigitalOut o1(PA_0);
+DigitalOut o2(PA_1);
+DigitalOut o3(PA_2);
+DigitalOut o4(PA_3);
+DigitalOut o5(PA_4);
+DigitalOut o6(PA_5);
+DigitalOut o7(PA_6);
+DigitalOut o8(PA_7);
+
+DigitalOut o9 (PB_0);
+DigitalOut o10(PB_1);
+DigitalOut o11(PB_2);
+DigitalOut o12(PB_10);
+DigitalOut o13(PB_12);
+DigitalOut o14(PB_13);
+DigitalOut o15(PB_14);
+DigitalOut o16(PB_15);
+
+
+void ledsOn(){
+    o1=1;o2=1;o3=1;o4=1;o5=1;o6=1;o7=1;o8=1;
+    o9=1;o10=1;o11=1;o12=1;o13=1;o14=1;o15=1;o16=1;
+}
+    
+void ledsOff(){
+    o1=0;o2=0;o3=0;o4=0;o5=0;o6=0;o7=0;o8=0;
+    o9=0;o10=0;o11=0;o12=0;o13=0;o14=0;o15=0;o16=0;
+}    
+
+int main() {
+    while(1) {
+        //myled = 1; // LED is ON
+        ledsOn();
+        wait(0.8); // 200 ms
+        //myled = 0; // LED is OFF
+        ledsOff();
+        wait(0.2); // 1 sec
+    }
+}
diff -r 000000000000 -r 845648eb755f mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Aug 13 09:05:56 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file