Display notLRW flag.
authorFlorian Pose <fp@igh-essen.com>
Thu, 28 Feb 2008 11:06:14 +0000
changeset 836 860a5bacea6a
parent 835 23fd8b510803
child 837 133528cfd528
Display notLRW flag.
master/slave.c
master/slave.h
--- 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);
     }
--- a/master/slave.h	Thu Feb 28 10:58:43 2008 +0000
+++ b/master/slave.h	Thu Feb 28 11:06:14 2008 +0000
@@ -103,19 +103,28 @@
 
 /*****************************************************************************/
 
-/** Slave information interface CAnopen-over-EtherCAT details flags.
+/** Slave information interface CANopen-over-EtherCAT details flags.
  */
 typedef struct {
     uint8_t enable_sdo : 1; /**< Enable Sdo access. */
     uint8_t enable_sdo_info : 1; /**< SDO information service available. */
     uint8_t enable_pdo_assign : 1; /**< Pdo mapping configurable. */
     uint8_t enable_pdo_configuration : 1; /**< Pdo configuration possible. */
-    uint8_t enable_upload_at_startup : 1; /**< ? */
+    uint8_t enable_upload_at_startup : 1; /**< ?. */
     uint8_t enable_sdo_complete_access : 1; /**< Complete access possible. */
 } ec_sii_coe_details_t;
 
 /*****************************************************************************/
 
+/** Slave information interface general flags.
+ */
+typedef struct {
+    uint8_t enable_safeop : 1; /**< ?. */
+    uint8_t enable_not_lrw : 1; /**< Slave does not support LRW. */
+} ec_sii_general_flags_t;
+
+/*****************************************************************************/
+
 /** Slave information interface data.
  */
 typedef struct {
@@ -143,6 +152,7 @@
     char *name; /**< slave name acc. to EEPROM */
     uint8_t physical_layer[4]; /**< port media */
     ec_sii_coe_details_t coe_details; /**< CoE detail flags. */
+    ec_sii_general_flags_t general_flags; /**< General flags. */
     int16_t current_on_ebus; /**< power consumption */
 
     // SyncM