Renamed subindices to max_subindex.

This commit is contained in:
Florian Pose 2008-06-06 09:15:56 +00:00
parent 6869c62ad8
commit 40c94387d8
3 changed files with 12 additions and 12 deletions

View File

@ -689,7 +689,7 @@ void ec_fsm_coe_dict_desc_response(ec_fsm_coe_t *fsm
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 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm
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))) {

View File

@ -89,7 +89,7 @@ int ec_sdo_init(
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 @@ ssize_t ec_sdo_info(
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;
}

View File

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