test program for Silicon Laboratories Inc. Si5351A-B-GT I2C-PROGRAMMABLE ANY-FREQUENCY CMOS CLOCK GENERATOR

Dependencies:   Si5351A

Revision:
5:e32ef4b85317
Parent:
4:5981cf106502
diff -r 5981cf106502 -r e32ef4b85317 si5351a_check.cpp
--- a/si5351a_check.cpp	Sat Jan 07 05:57:55 2017 +0000
+++ b/si5351a_check.cpp	Wed Aug 23 09:54:05 2017 +0000
@@ -455,7 +455,7 @@
             GETC();
             return;
         }
-        wait((float)seconds);
+        delay(seconds);
     }
 }
 #endif
@@ -490,7 +490,7 @@
 	            GETC();
 	            return;
 	        }
-        	wait((float)seconds);
+        	delay(seconds);
 	    }
         for (j = i - 2; j > 0 ; j--){
         	f_set = freq_tbl[j];
@@ -500,7 +500,7 @@
 	            GETC();
 	            return;
 	        }
-            wait((float)seconds);
+            delay(seconds);
 	    }
     }
 }
@@ -512,6 +512,17 @@
 	put_rn();
 }
 
+void delay(int32_t time)
+{
+#if MBED_MAJOR_VERSION == 2
+	wait((float)time);
+#elif  MBED_MAJOR_VERSION == 5
+	Thread::wait(time * 1000);
+#else
+#error "Running on Unknown OS"
+#endif
+}
+
 //  Put \r\n
 void put_rn ( void )
 {