Ian Hua / I2cRtosDriver

Fork of I2cRtosDriver by Helmut Schmücker

Revision:
6:5b98c902a659
Parent:
4:eafa7efcd771
Child:
8:5be85bd4c5ba
--- a/I2CDriverTest01.h	Sat Apr 20 11:56:35 2013 +0000
+++ b/I2CDriverTest01.h	Sat Apr 20 20:06:44 2013 +0000
@@ -33,7 +33,7 @@
         i2c.read(adr, reg, result, g_len, 1);
         uint32_t dt=us_ticker_read()-t1;
         uint16_t tm=((static_cast<uint16_t>(result[0])<<8)|static_cast<uint16_t>(result[1]));
-        
+
         if(--g_disco>0) printf("tm=%4dus dt=%4dus\n",tm,dt);
     }
 }
@@ -46,11 +46,16 @@
     Thread::wait(100);
     highPrioTicker.start(1);
 
+#if defined(TARGET_LPC1768)
     const int nTest=7;
-    const int freq[nTest]=  {4e5,   4e5,    4e5,    4e5,    4e5,    1e5,    1e5};
-    const int len[nTest]=   {1,     4,      9,      16,     25,     1,      6};
-    
-    for(int i=0; i<nTest; ++i){
+    const int freq[nTest]=  {1e5,   1e5,    1e5,   4e5,    4e5,    4e5,    4e5};
+    const int len[nTest]=   {1,     4,      6,      1,     6,     12,      25};
+#elif defined(TARGET_LPC11U24)
+    const int nTest=5;
+    const int freq[nTest]=  {1e5,   1e5,    4e5,   4e5,    4e5    };
+    const int len[nTest]=   {1,     4,      1,      6,     12};
+#endif
+    for(int i=0; i<nTest; ++i) {
         g_freq = freq[i];
         g_len = len[i];
         printf("f=%d l=%d\n",g_freq,g_len);