# HG changeset patch # User Florian Pose # Date 1139839893 0 # Node ID cab9cc6a27210a5c2798ff7500d04c75877554f5 # Parent 80140bace959e5f115512f28bab9c3411efbb18b SSI-Klemmen-Interface und kleinere ?nderungen. diff -r 80140bace959 -r cab9cc6a2721 include/EtherCAT_si.h --- a/include/EtherCAT_si.h Fri Feb 03 16:38:43 2006 +0000 +++ b/include/EtherCAT_si.h Mon Feb 13 14:11:33 2006 +0000 @@ -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 -r 80140bace959 -r cab9cc6a2721 master/canopen.c --- a/master/canopen.c Fri Feb 03 16:38:43 2006 +0000 +++ b/master/canopen.c Mon Feb 13 14:11:33 2006 +0000 @@ -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 -r 80140bace959 -r cab9cc6a2721 master/master.c --- a/master/master.c Fri Feb 03 16:38:43 2006 +0000 +++ b/master/master.c Mon Feb 13 14:11:33 2006 +0000 @@ -233,7 +233,7 @@ 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 -r 80140bace959 -r cab9cc6a2721 master/types.c --- a/master/types.c Fri Feb 03 16:38:43 2006 +0000 +++ b/master/types.c Mon Feb 13 14:11:33 2006 +0000 @@ -37,7 +37,7 @@ 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}; /*