Added CoE debugging.
--- a/master/fsm_coe.c Mon Mar 17 14:16:16 2008 +0000
+++ b/master/fsm_coe.c Tue Mar 18 10:48:55 2008 +0000
@@ -945,9 +945,11 @@
ec_sdo_request_t *request = fsm->request;
uint8_t *data;
- if (fsm->slave->master->debug_level)
- EC_DBG("Downloading Sdo 0x%04X:%i to slave %i.\n",
+ if (fsm->slave->master->debug_level) {
+ EC_DBG("Downloading Sdo 0x%04X:%u to slave %u.\n",
request->index, request->subindex, slave->ring_position);
+ ec_print_data(request->data, request->data_size);
+ }
if (!(slave->sii.mailbox_protocols & EC_MBOX_COE)) {
EC_ERR("Slave %u does not support CoE!\n", slave->ring_position);
@@ -1166,7 +1168,7 @@
uint8_t *data;
if (master->debug_level)
- EC_DBG("Uploading Sdo 0x%04X:%i from slave %i.\n",
+ EC_DBG("Uploading Sdo 0x%04X:%u from slave %u.\n",
request->index, request->subindex, slave->ring_position);
if (!(slave->sii.mailbox_protocols & EC_MBOX_COE)) {
@@ -1469,6 +1471,11 @@
}
}
+ if (master->debug_level) {
+ EC_DBG("Uploaded data:\n");
+ ec_print_data(request->data, request->data_size);
+ }
+
fsm->state = ec_fsm_coe_end; // success
}
@@ -1676,6 +1683,11 @@
return;
}
+ if (master->debug_level) {
+ EC_DBG("Uploaded data:\n");
+ ec_print_data(request->data, request->data_size);
+ }
+
fsm->state = ec_fsm_coe_end; // success
}