hui

Dependencies:   mbed

Fork of mbed_L3_Timer by Adrian Renner

Files at this revision

API Documentation at this revision

Comitter:
moritzmahler
Date:
Sat Dec 06 14:46:14 2014 +0000
Parent:
0:8a1dbfbe5c66
Commit message:
some major problems . Don't know why.;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Dec 06 13:53:32 2014 +0000
+++ b/main.cpp	Sat Dec 06 14:46:14 2014 +0000
@@ -44,14 +44,14 @@
 
 int8 count=0;
 
-volatile byte 	bStandby;
+volatile char bStandby = 0;
 
 Ticker stSysTick;
 
-void vTimer(void)
-{
-    bStandby=1;
-}
+void vTimer( void ){
+abLed[1] = 1;
+bStandby = 1;
+} 
 
 
 /* Funktion "Taste 1 gedrückt" */
@@ -112,7 +112,12 @@
 void vTaste2( void )
 {
 
-
+    if(count==nTastLongLi) {
+        abLed[0]=!abLed[0];
+        count=0;
+    } else {
+        count++;
+    }
 
 
 }
@@ -135,31 +140,27 @@
 /* Hauptprogramm */
 int main()
 {
-    stSysTick.attach_us(&vTimer,20000);
+   stSysTick.attach(&vTimer, 0.02);
+    bStandby=0;
     vDispReset();
-
+    
 
     while(1) {
+        
         // wait until bStandby !=0
-        
-
-
-        if(count==nTastLongLi) {
-            abLed[0]=!abLed[0];
-            count=0;
-        } else {
-            count++;
+       while(bStandby == 0){
+        abLed[0] = 1;
         }
-        
-        while(bStandby == 0);
         bStandby = 0;
-
-        vTaste1();
-        vTaste2();
+        abLed[2] = 1;
+        // vTaste1();
+        // vTaste2();
         i--;
         if(i == 0) {
             i = 5;
-            vLcdOut();
+
+           // vLcdOut();
+
         }
     }
 }