equal
deleted
inserted
replaced
956 " found: 0x%08X 0x%08X\".\n", slave->ring_position, vendor_id, |
956 " found: 0x%08X 0x%08X\".\n", slave->ring_position, vendor_id, |
957 product_code, slave->sii_vendor_id, slave->sii_product_code); |
957 product_code, slave->sii_vendor_id, slave->sii_product_code); |
958 return -1; |
958 return -1; |
959 } |
959 } |
960 return 0; |
960 return 0; |
|
961 } |
|
962 |
|
963 /*****************************************************************************/ |
|
964 |
|
965 /** |
|
966 Counts the total number of SDOs and entries in the dictionary. |
|
967 */ |
|
968 |
|
969 void ec_slave_sdo_dict_info(const ec_slave_t *slave, /**< EtherCAT slave */ |
|
970 unsigned int *sdo_count, /**< number of SDOs */ |
|
971 unsigned int *entry_count /**< total number of |
|
972 entries */ |
|
973 ) |
|
974 { |
|
975 unsigned int sdos = 0, entries = 0; |
|
976 ec_sdo_t *sdo; |
|
977 ec_sdo_entry_t *entry; |
|
978 |
|
979 list_for_each_entry(sdo, &slave->sdo_dictionary, list) { |
|
980 sdos++; |
|
981 list_for_each_entry(entry, &sdo->entries, list) { |
|
982 entries++; |
|
983 } |
|
984 } |
|
985 |
|
986 *sdo_count = sdos; |
|
987 *entry_count = entries; |
961 } |
988 } |
962 |
989 |
963 /****************************************************************************** |
990 /****************************************************************************** |
964 * Realtime interface |
991 * Realtime interface |
965 *****************************************************************************/ |
992 *****************************************************************************/ |