Display debug data on mailbox error.

This commit is contained in:
Florian Pose 2006-10-20 12:41:22 +00:00
parent cd884f45d0
commit d549cc4c2c
1 changed files with 4 additions and 0 deletions

View File

@ -179,6 +179,10 @@ uint8_t *ec_slave_mbox_fetch(const ec_slave_t *slave, /**< slave */
uint16_t code = EC_READ_U16(datagram->data + 8);
EC_ERR("Mailbox error response received.\n");
if (slave->master->debug_level)
ec_print_data(datagram->data + 6, data_size);
for (mbox_msg = mbox_error_messages; mbox_msg->code; mbox_msg++) {
if (mbox_msg->code != code) continue;
EC_ERR("Error reply code: 0x%04X: \"%s\".\n",