Added debugging for sdo download.
authorFlorian Pose <fp@igh-essen.com>
Mon, 09 Jun 2008 12:35:00 +0000
changeset 975 dae04112bcc7
parent 974 5868944a6456
child 976 677e63a8ed6e
Added debugging for sdo download.
master/fsm_coe.c
--- a/master/fsm_coe.c	Mon Jun 09 12:11:19 2008 +0000
+++ b/master/fsm_coe.c	Mon Jun 09 12:35:00 2008 +0000
@@ -1029,6 +1029,11 @@
     EC_WRITE_U32(data + 6, request->data_size);
     memcpy(data + 10, request->data, request->data_size);
 
+    if (slave->master->debug_level) {
+        EC_DBG("Download request:\n");
+        ec_print_data(data, 10 + request->data_size);
+    }
+
     fsm->retries = EC_FSM_RETRIES;
     fsm->state = ec_fsm_coe_down_request;
 }
@@ -1175,6 +1180,11 @@
         return;
     }
 
+    if (slave->master->debug_level) {
+        EC_DBG("Download response:\n");
+        ec_print_data(data, rec_size);
+    }
+
     if (rec_size < 6) {
         fsm->state = ec_fsm_coe_error;
         EC_ERR("Received data is too small (%u bytes):\n", rec_size);