Skip to content
Snippets Groups Projects
Commit 2aea597d authored by Florian Pose's avatar Florian Pose
Browse files

Renamed subindices to max_subindex.

parent f8517902
No related branches found
No related tags found
No related merge requests found
...@@ -689,7 +689,7 @@ void ec_fsm_coe_dict_desc_response(ec_fsm_coe_t *fsm ...@@ -689,7 +689,7 @@ void ec_fsm_coe_dict_desc_response(ec_fsm_coe_t *fsm
return; return;
} }
sdo->subindices = EC_READ_U8(data + 10); sdo->max_subindex = EC_READ_U8(data + 10);
sdo->object_code = EC_READ_U8(data + 11); sdo->object_code = EC_READ_U8(data + 11);
name_size = rec_size - 12; name_size = rec_size - 12;
...@@ -938,7 +938,7 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm ...@@ -938,7 +938,7 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm
list_add_tail(&entry->list, &sdo->entries); list_add_tail(&entry->list, &sdo->entries);
if (fsm->subindex < sdo->subindices) { if (fsm->subindex < sdo->max_subindex) {
fsm->subindex++; fsm->subindex++;
if (!(data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 10))) { if (!(data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 10))) {
......
...@@ -89,7 +89,7 @@ int ec_sdo_init( ...@@ -89,7 +89,7 @@ int ec_sdo_init(
sdo->index = index; sdo->index = index;
sdo->object_code = 0x00; sdo->object_code = 0x00;
sdo->name = NULL; sdo->name = NULL;
sdo->subindices = 0; sdo->max_subindex = 0;
INIT_LIST_HEAD(&sdo->entries); INIT_LIST_HEAD(&sdo->entries);
// Init kobject and add it to the hierarchy // Init kobject and add it to the hierarchy
...@@ -189,7 +189,7 @@ ssize_t ec_sdo_info( ...@@ -189,7 +189,7 @@ ssize_t ec_sdo_info(
off += sprintf(buffer + off, "Index: 0x%04X\n", sdo->index); 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, "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; return off;
} }
......
...@@ -52,14 +52,14 @@ ...@@ -52,14 +52,14 @@
/** CANopen Sdo. /** CANopen Sdo.
*/ */
struct ec_sdo { struct ec_sdo {
struct kobject kobj; /**< kobject */ struct kobject kobj; /**< kobject. */
struct list_head list; /**< list item */ struct list_head list; /**< List item. */
ec_slave_t *slave; /**< parent slave */ ec_slave_t *slave; /**< Parent slave. */
uint16_t index; /**< Sdo index */ uint16_t index; /**< Sdo index. */
uint8_t object_code; /**< object code */ uint8_t object_code; /**< Object code. */
char *name; /**< Sdo name */ char *name; /**< Sdo name. */
uint8_t subindices; /**< subindices */ uint8_t max_subindex; /**< Maximum subindex. */
struct list_head entries; /**< entry list */ struct list_head entries; /**< List of entries. */
}; };
/*****************************************************************************/ /*****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment