Dependencies:   mbed

Revision:
0:163dfb02ed36
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fonction.cpp	Tue Apr 14 08:34:05 2015 +0000
@@ -0,0 +1,44 @@
+#include "fonction.h"
+int bitToInt(int i)
+{
+    switch (i) {
+        case 1:
+            return 0;
+           // break;
+        case 2:
+            return 1;
+           // break;
+        case 4:
+            return 2;
+           // break;
+        case 8:
+            return 3;
+           // break;
+        case 16:
+            return 4;
+           // break;
+        case 32:
+            return 5;
+           // break;
+        case 64:
+            return 6;
+           // break;
+        case 128:
+            return 7;
+           // break;
+        case 256:
+            return 8;
+           // break;
+        case 512:
+            return 9;
+           // break;
+        case 1024:
+            return -1;
+           // break;
+        case 2048:
+            return -2;
+         //   break;
+        default:
+            return -3;
+    }
+}
\ No newline at end of file