Improved SM and FMMU debugging output.
authorFlorian Pose <fp@igh-essen.com>
Wed, 18 Oct 2006 12:04:24 +0000
changeset 413 a7144fdf14f5
parent 412 2e50ddc3e777
child 414 60cd2fcc71ee
Improved SM and FMMU debugging output.
master/master.c
--- a/master/master.c	Wed Oct 18 11:50:31 2006 +0000
+++ b/master/master.c	Wed Oct 18 12:04:24 2006 +0000
@@ -680,11 +680,9 @@
     sync_size = ec_slave_calc_sync_size(slave, sync);
 
     if (slave->master->debug_level) {
-        EC_DBG("Slave %i, sync manager %i:\n", slave->ring_position,
-               sync->index);
-        EC_DBG("  Address: 0x%04X\n", sync->physical_start_address);
-        EC_DBG("     Size: %i\n", sync_size);
-        EC_DBG("  Control: 0x%02X\n", sync->control_register);
+        EC_DBG("Slave %3i, SM %i: Addr 0x%04X, Size %3i, Ctrl 0x%02X\n",
+               slave->ring_position, sync->index, sync->physical_start_address,
+               sync_size, sync->control_register);
     }
 
     EC_WRITE_U16(data,     sync->physical_start_address);
@@ -711,15 +709,11 @@
     sync_size = ec_slave_calc_sync_size(slave, fmmu->sync);
 
     if (slave->master->debug_level) {
-        EC_DBG("Slave %i, FMMU %i:\n",
-               slave->ring_position, fmmu->index);
-
-        EC_DBG("  Logical address: 0x%04X\n", fmmu->logical_start_address);
-        EC_DBG("             Size: %i\n", sync_size);
-        EC_DBG(" Physical address: 0x%04X\n",
-               fmmu->sync->physical_start_address);
-        EC_DBG("        Direction: %s\n",
-               ((fmmu->sync->control_register & 0x04) ? "output" : "input"));
+        EC_DBG("Slave %3i, FMMU %2i:"
+               " LogAddr 0x%08X, Size %3i, PhysAddr 0x%04X, Dir %s\n",
+               slave->ring_position, fmmu->index, fmmu->logical_start_address,
+               sync_size, fmmu->sync->physical_start_address,
+               ((fmmu->sync->control_register & 0x04) ? "out" : "in"));
     }
 
     EC_WRITE_U32(data,      fmmu->logical_start_address);