Added debugging for sdo download.
--- 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);