From efa310c45e26b949a8448d487c8259589f39e338 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Mon, 13 Feb 2006 14:11:33 +0000 Subject: [PATCH] =?UTF-8?q?SSI-Klemmen-Interface=20und=20kleinere=20=C3=84?= =?UTF-8?q?nderungen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/EtherCAT_si.h | 11 +++++++++++ master/canopen.c | 6 +++--- master/master.c | 2 +- master/types.c | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/include/EtherCAT_si.h b/include/EtherCAT_si.h index 60ca417e..1390a12b 100644 --- a/include/EtherCAT_si.h +++ b/include/EtherCAT_si.h @@ -39,6 +39,17 @@ /*****************************************************************************/ +#define EC_READ_EL5001(SLAVE) \ + ((unsigned int) (EC_PROC_DATA(SLAVE)[1] | \ + (EC_PROC_DATA(SLAVE)[2] << 8) | \ + (EC_PROC_DATA(SLAVE)[3] << 16) | \ + (EC_PROC_DATA(SLAVE)[4] << 24))) + +#define EC_READ_EL5001_STATE(SLAVE) \ + ((unsigned char) EC_PROC_DATA(SLAVE)[0]) + +/*****************************************************************************/ + /* Emacs-Konfiguration ;;; Local Variables: *** ;;; c-basic-offset:4 *** diff --git a/master/canopen.c b/master/canopen.c index 1dca9858..3be3540f 100644 --- a/master/canopen.c +++ b/master/canopen.c @@ -19,9 +19,9 @@ /*****************************************************************************/ int EtherCAT_rt_canopen_sdo_write(ec_master_t *master, ec_slave_t *slave, - unsigned int sdo_index, - unsigned char sdo_subindex, - unsigned int value, unsigned int size) + unsigned int sdo_index, + unsigned char sdo_subindex, + unsigned int value, unsigned int size) { unsigned char data[0xF6]; ec_command_t cmd; diff --git a/master/master.c b/master/master.c index b1ff9522..f47079cf 100644 --- a/master/master.c +++ b/master/master.c @@ -233,7 +233,7 @@ int ec_simple_send(ec_master_t *master, ec_command_t *cmd) master->command_index = (master->command_index + 1) % 0x0100; if (unlikely(master->debug_level > 0)) { - printk(KERN_DEBUG "EtherCAT: Sending command index %i\n", cmd->index); + printk(KERN_DEBUG "EtherCAT: Sending command index 0x%X\n", cmd->index); } cmd->state = EC_COMMAND_STATE_SENT; diff --git a/master/types.c b/master/types.c index 41049ae9..06e340ef 100644 --- a/master/types.c +++ b/master/types.c @@ -37,7 +37,7 @@ unsigned char sm3_31xx[] = {0x00, 0x11, 0x06, 0x00, 0x20, 0x00, 0x01, 0x00}; unsigned char sm2_41xx[] = {0x00, 0x10, 0x04, 0x00, 0x24, 0x00, 0x01, 0x00}; -unsigned char sm2_5001[] = {0x00, 0x10, 0x04, 0x00, 0x24, 0x00, 0x00, 0x00}; +unsigned char sm2_5001[] = {0x00, 0x10, 0x04, 0x00, 0x24, 0x00, 0x01, 0x00}; unsigned char sm3_5001[] = {0x00, 0x11, 0x05, 0x00, 0x20, 0x00, 0x01, 0x00}; /*