Bessere Ausgaben beim Starten und beenden.
authorFlorian Pose <fp@igh-essen.com>
Sun, 26 Feb 2006 12:26:23 +0000
changeset 88 98335157e54e
parent 87 4c18218d8fd0
child 89 e91ef35c36db
Bessere Ausgaben beim Starten und beenden.
master/module.c
rt/msr_module.c
--- a/master/module.c	Sat Feb 25 14:25:33 2006 +0000
+++ b/master/module.c	Sun Feb 26 12:26:23 2006 +0000
@@ -238,6 +238,8 @@
 {
     ec_master_t *master;
 
+    EC_INFO("===== Starting master %i... =====\n", index);
+
     if (index < 0 || index >= ec_master_count) {
         EC_ERR("Master %i does not exist!\n", index);
         goto req_return;
@@ -271,7 +273,7 @@
     }
 
     ec_masters_reserved[index] = 1;
-    EC_INFO("Reserved master %i.\n", index);
+    EC_INFO("===== Master %i ready. =====\n", index);
 
     return master;
 
@@ -283,6 +285,7 @@
     ec_master_reset(master);
 
  req_return:
+    EC_INFO("===== Failed to start master %i =====\n", index);
     return NULL;
 }
 
@@ -296,30 +299,31 @@
 
 void EtherCAT_rt_release_master(ec_master_t *master)
 {
-    unsigned int i;
-
-    for (i = 0; i < ec_master_count; i++)
-    {
-        if (&ec_masters[i] == master)
-        {
-            if (!master->device_registered) {
-                EC_WARN("Failed to release device module: No device!\n");
-                return;
-            }
-
-            ec_master_close(master);
-            ec_master_reset(master);
-
-            module_put(master->device.module);
-            ec_masters_reserved[i] = 0;
-
-            EC_INFO("Released master %i.\n", i);
-
-            return;
+    unsigned int i, found;
+
+    found = 0;
+    for (i = 0; i < ec_master_count; i++) {
+        if (&ec_masters[i] == master) {
+            found = 1;
+            break;
         }
     }
 
-    EC_WARN("Master %X was never requested!\n", (u32) master);
+    if (!found) {
+        EC_WARN("Master %X was never requested!\n", (u32) master);
+        return;
+    }
+
+    EC_INFO("===== Stopping master %i... =====\n", i);
+
+    ec_master_close(master);
+    ec_master_reset(master);
+
+    module_put(master->device.module);
+    ec_masters_reserved[i] = 0;
+
+    EC_INFO("===== Master %i stopped. =====\n", i);
+    return;
 }
 
 /*****************************************************************************/
--- a/rt/msr_module.c	Sat Feb 25 14:25:33 2006 +0000
+++ b/rt/msr_module.c	Sun Feb 26 12:26:23 2006 +0000
@@ -59,8 +59,8 @@
 uint32_t k_pos;
 
 ec_field_init_t domain1_fields[] = {
-    {&r_ssi,   "1", "Beckhoff", "EL5001", ec_ipvalue, 0, 1},
-    {&r_inc, "0:3", "Beckhoff", "EL5101", ec_ipvalue, 0, 1},
+    {&r_ssi,  "1", "Beckhoff", "EL5001", ec_ipvalue, 0, 1},
+    {&r_inc, "10", "Beckhoff", "EL5101", ec_ipvalue, 0, 1},
     {}
 };