SSI-Klemmen-Interface und kleinere Änderungen.

This commit is contained in:
Florian Pose 2006-02-13 14:11:33 +00:00
parent f84965c036
commit efa310c45e
4 changed files with 16 additions and 5 deletions

View File

@ -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 ***

View File

@ -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;

View File

@ -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;

View File

@ -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};
/*