test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
jesephin
Date:
Mon Jan 13 18:13:12 2020 +0000
Parent:
9:c2c6a6a50c14
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jan 13 18:10:08 2020 +0000
+++ b/main.cpp	Mon Jan 13 18:13:12 2020 +0000
@@ -28,37 +28,16 @@
     wait(0.1);
      
     }
-    
-     void nibbleLeds(int value)
-     {
-         myleds=value%16;
-     }
-     
-     void printb(uint8_t x)
-     {
-          for(int i=sizeof(x)<<3;i;i--)
-          putchar('0')+((x>>(i-1)&1));
-          printf("\n");
-          }
-
-    int modifyBit(int x, unit8_t position, bool State)
-    {
-        int mask = 1 << position;
-        int state = int(State); 
-        return(x&~mask)|((state<<position)&mask);
-    }
-    
-   
     int lauflicht(bool richtung,int time,int&anz)
     {
       int i;
-      unit8_t lauf=0x01; 
+      uint8_t lauf=0x01; 
       if(!richtung)
       lauf=0x08;
     
       while(1)
       {
-        nibbleLeds(lauf&0x0F);
+        nibbbleLeds(lauf&0x0F);
         if(richtung)
         {
             lauf=lauf<<1;
@@ -77,7 +56,23 @@
                 }
                 return anz;
         }
-}
+    
+     void printb(uint8_t x)
+     {
+          for(int i=sizeof(x)<<3;i;i--)
+          putchar('0')+((x>>(i-1)&1));
+          printf("\n");
+          }
+
+    int modifyBit(int x, unit8_t position, bool State)
+    {
+        int mask = 1 << position;
+        int state = int(State); 
+        return(x&~mask)|((state<<position)&mask);
+    }
+    
+   
+    
 
 void nibbleLeds(int value)
 {