Basis for the C2 protocol from Silicon Labs.

Dependencies:   mbed

Revision:
5:53d4a67cd657
Parent:
4:a9e3ee5741be
Child:
6:deb670cb8105
--- a/main.cpp	Sun May 25 13:59:43 2014 +0000
+++ b/main.cpp	Sun May 25 14:01:14 2014 +0000
@@ -190,11 +190,11 @@
 
     getc(stdin);
 
-    c2_write_ar(0x00);
+    c2_write_ar(C2_DEVID);
     devid = c2_read_dr();
-    if (devid < 0) fatal("unable to read devid\n\r");
+    if (devid <= 0) fatal("unable to read devid\n\r");
     
-    c2_write_ar(0x01);
+    c2_write_ar(C2_REVID);
     revid = c2_read_dr();
     if (revid < 0) fatal("unable to read revid\n\r");