# HG changeset patch # User Florian Pose # Date 1212743756 0 # Node ID ea83a7aab57a8060a0b4d012908fbb381e84b10e # Parent 8aa60dd6cbc770ae7925592e1e9470c87d2a3864 Renamed subindices to max_subindex. diff -r 8aa60dd6cbc7 -r ea83a7aab57a master/fsm_coe.c --- a/master/fsm_coe.c Fri Jun 06 09:12:05 2008 +0000 +++ b/master/fsm_coe.c Fri Jun 06 09:15:56 2008 +0000 @@ -689,7 +689,7 @@ return; } - sdo->subindices = EC_READ_U8(data + 10); + sdo->max_subindex = EC_READ_U8(data + 10); sdo->object_code = EC_READ_U8(data + 11); name_size = rec_size - 12; @@ -938,7 +938,7 @@ list_add_tail(&entry->list, &sdo->entries); - if (fsm->subindex < sdo->subindices) { + if (fsm->subindex < sdo->max_subindex) { fsm->subindex++; if (!(data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 10))) { diff -r 8aa60dd6cbc7 -r ea83a7aab57a master/sdo.c --- a/master/sdo.c Fri Jun 06 09:12:05 2008 +0000 +++ b/master/sdo.c Fri Jun 06 09:15:56 2008 +0000 @@ -89,7 +89,7 @@ sdo->index = index; sdo->object_code = 0x00; sdo->name = NULL; - sdo->subindices = 0; + sdo->max_subindex = 0; INIT_LIST_HEAD(&sdo->entries); // Init kobject and add it to the hierarchy @@ -189,7 +189,7 @@ off += sprintf(buffer + off, "Index: 0x%04X\n", sdo->index); off += sprintf(buffer + off, "Name: %s\n", sdo->name ? sdo->name : ""); - off += sprintf(buffer + off, "Subindices: %i\n", sdo->subindices); + off += sprintf(buffer + off, "Max subindex: %u\n", sdo->max_subindex); return off; } diff -r 8aa60dd6cbc7 -r ea83a7aab57a master/sdo.h --- a/master/sdo.h Fri Jun 06 09:12:05 2008 +0000 +++ b/master/sdo.h Fri Jun 06 09:15:56 2008 +0000 @@ -52,14 +52,14 @@ /** CANopen Sdo. */ struct ec_sdo { - struct kobject kobj; /**< kobject */ - struct list_head list; /**< list item */ - ec_slave_t *slave; /**< parent slave */ - uint16_t index; /**< Sdo index */ - uint8_t object_code; /**< object code */ - char *name; /**< Sdo name */ - uint8_t subindices; /**< subindices */ - struct list_head entries; /**< entry list */ + struct kobject kobj; /**< kobject. */ + struct list_head list; /**< List item. */ + ec_slave_t *slave; /**< Parent slave. */ + uint16_t index; /**< Sdo index. */ + uint8_t object_code; /**< Object code. */ + char *name; /**< Sdo name. */ + uint8_t max_subindex; /**< Maximum subindex. */ + struct list_head entries; /**< List of entries. */ }; /*****************************************************************************/