Added ec_slave_has_subbus()
authorFlorian Pose <fp@igh-essen.com>
Fri, 13 Oct 2006 09:45:22 +0000
changeset 394 ff1b018a9b09
parent 393 9cfbb344adc0
child 395 8b1194e51cf2
Added ec_slave_has_subbus()
master/slave.c
master/slave.h
--- a/master/slave.c	Fri Oct 13 09:39:42 2006 +0000
+++ b/master/slave.c	Fri Oct 13 09:45:22 2006 +0000
@@ -867,6 +867,18 @@
 /*****************************************************************************/
 
 /**
+   \return non-zero if slave is a bus coupler
+*/
+
+int ec_slave_has_subbus(const ec_slave_t *slave /**< EtherCAT slave */)
+{
+    return slave->sii_vendor_id == 0x00000002
+        && slave->sii_product_code == 0x13ED3052;
+}
+
+/*****************************************************************************/
+
+/**
    \return 0 in case of success, else < 0
 */
 
--- a/master/slave.h	Fri Oct 13 09:39:42 2006 +0000
+++ b/master/slave.h	Fri Oct 13 09:45:22 2006 +0000
@@ -334,6 +334,7 @@
                                  const ec_sii_sync_t *);
 
 int ec_slave_is_coupler(const ec_slave_t *);
+int ec_slave_has_subbus(const ec_slave_t *);
 
 /*****************************************************************************/