I2C master

Dependencies:   mbed mbed-rtos

Fork of i2c_master by Chaitanya Viswa

Revision:
2:899f7e7c61ed
Parent:
1:14b369c0f314
--- a/main.cpp	Tue Jul 15 10:06:29 2014 +0000
+++ b/main.cpp	Thu Dec 04 10:24:28 2014 +0000
@@ -1,10 +1,20 @@
 #include "master.h"
+#include "rtos.h"
+
+void masterer(void const *args)
+{
+        FUNC_I2C_MASTER_MAIN(1,0x20,24);
+        
+    
+}
 
 int main()
 {
-    while(true)
+    Thread::wait(3000);
+    RtosTimer timer(masterer,osTimerPeriodic);
+    timer.start(20000);
+    while(1)
     {
-        FUNC_I2C_MASTER_MAIN(1,0x20,24);
-        wait(23);
+            ;
     }
 }
\ No newline at end of file