master/slave.c
changeset 836 860a5bacea6a
parent 835 23fd8b510803
child 838 3cb5769059f4
--- a/master/slave.c	Thu Feb 28 10:58:43 2008 +0000
+++ b/master/slave.c	Thu Feb 28 11:06:14 2008 +0000
@@ -150,6 +150,7 @@
     slave->sii.order = NULL;
     slave->sii.name = NULL;
     memset(&slave->sii.coe_details, 0x00, sizeof(ec_sii_coe_details_t));
+    memset(&slave->sii.general_flags, 0x00, sizeof(ec_sii_general_flags_t));
     slave->sii.current_on_ebus = 0;
 
     slave->sii.syncs = NULL;
@@ -441,6 +442,7 @@
             (data[4] & (0x03 << (i * 2))) >> (i * 2);
 
     memcpy(&slave->sii.coe_details, data + 5, 1);
+    memcpy(&slave->sii.general_flags, data + 0x000b, 1);
     slave->sii.current_on_ebus = EC_READ_S16(data + 0x0C);
     slave->sii.has_general = 1;
     return 0;
@@ -739,6 +741,11 @@
                     ? "yes" : "no");
         }
 
+        buf += sprintf(buf, "  Flags:\n");
+        buf += sprintf(buf, "    Enable SafeOp: %s\n",
+                slave->sii.general_flags.enable_safeop ? "yes" : "no");
+        buf += sprintf(buf, "    Enable notLRW: %s\n",
+                slave->sii.general_flags.enable_not_lrw ? "yes" : "no");
         buf += sprintf(buf, "  Current consumption: %i mA\n\n",
                 slave->sii.current_on_ebus);
     }