101 EC_MBOX_VOE = 0x20 /**< Vendor specific */ |
101 EC_MBOX_VOE = 0x20 /**< Vendor specific */ |
102 }; |
102 }; |
103 |
103 |
104 /*****************************************************************************/ |
104 /*****************************************************************************/ |
105 |
105 |
|
106 /** Slave information interface data. |
|
107 */ |
|
108 typedef struct { |
|
109 // Non-category data |
|
110 uint16_t alias; /**< Configured station alias. */ |
|
111 uint32_t vendor_id; /**< Vendor ID. */ |
|
112 uint32_t product_code; /**< Vendor-specific product code. */ |
|
113 uint32_t revision_number; /**< Revision number. */ |
|
114 uint32_t serial_number; /**< Serial number. */ |
|
115 uint16_t rx_mailbox_offset; /**< Mailbox address (master to slave). */ |
|
116 uint16_t rx_mailbox_size; /**< Mailbox size (master to slave). */ |
|
117 uint16_t tx_mailbox_offset; /**< Mailbox address (slave to master). */ |
|
118 uint16_t tx_mailbox_size; /**< Mailbox size (slave to master). */ |
|
119 uint16_t mailbox_protocols; /**< Supported mailbox protocols. */ |
|
120 |
|
121 // Strings |
|
122 char **strings; /**< Strings in EEPROM categories. */ |
|
123 unsigned int string_count; /**< number of EEPROM strings */ |
|
124 |
|
125 // General |
|
126 uint8_t physical_layer[4]; /**< port media */ |
|
127 char *group; /**< slave group acc. to EEPROM */ |
|
128 char *image; /**< slave image name acc. to EEPROM */ |
|
129 char *order; /**< slave order number acc. to EEPROM */ |
|
130 char *name; /**< slave name acc. to EEPROM */ |
|
131 int16_t current_on_ebus; /**< power consumption */ |
|
132 |
|
133 // SyncM |
|
134 ec_sync_t *syncs; /**< EEPROM SYNC MANAGER categories */ |
|
135 unsigned int sync_count; /**< number of sync managers in EEPROM */ |
|
136 |
|
137 // [RT]XPDO |
|
138 struct list_head pdos; /**< EEPROM [RT]XPDO categories */ |
|
139 } ec_sii_t; |
|
140 |
|
141 /*****************************************************************************/ |
|
142 |
106 /** EtherCAT slave. |
143 /** EtherCAT slave. |
107 */ |
144 */ |
108 struct ec_slave |
145 struct ec_slave |
109 { |
146 { |
110 struct list_head list; /**< list item */ |
147 struct list_head list; /**< list item */ |
137 // EEPROM |
174 // EEPROM |
138 uint8_t *eeprom_data; /**< Complete EEPROM image */ |
175 uint8_t *eeprom_data; /**< Complete EEPROM image */ |
139 size_t eeprom_size; /**< size of the EEPROM contents in bytes */ |
176 size_t eeprom_size; /**< size of the EEPROM contents in bytes */ |
140 |
177 |
141 // slave information interface |
178 // slave information interface |
142 uint16_t sii_alias; /**< configured station alias */ |
179 ec_sii_t sii; /**< SII data. */ |
143 uint32_t sii_vendor_id; /**< vendor id */ |
|
144 uint32_t sii_product_code; /**< vendor's product code */ |
|
145 uint32_t sii_revision_number; /**< revision number */ |
|
146 uint32_t sii_serial_number; /**< serial number */ |
|
147 uint16_t sii_rx_mailbox_offset; /**< mailbox address (master to slave) */ |
|
148 uint16_t sii_rx_mailbox_size; /**< mailbox size (master to slave) */ |
|
149 uint16_t sii_tx_mailbox_offset; /**< mailbox address (slave to master) */ |
|
150 uint16_t sii_tx_mailbox_size; /**< mailbox size (slave to master) */ |
|
151 uint16_t sii_mailbox_protocols; /**< supported mailbox protocols */ |
|
152 uint8_t sii_physical_layer[4]; /**< port media */ |
|
153 char **sii_strings; /**< strings in EEPROM categories */ |
|
154 unsigned int sii_string_count; /**< number of EEPROM strings */ |
|
155 ec_sync_t *sii_syncs; /**< EEPROM SYNC MANAGER categories */ |
|
156 unsigned int sii_sync_count; /**< number of sync managers in EEPROM */ |
|
157 struct list_head sii_pdos; /**< EEPROM [RT]XPDO categories */ |
|
158 char *sii_group; /**< slave group acc. to EEPROM */ |
|
159 char *sii_image; /**< slave image name acc. to EEPROM */ |
|
160 char *sii_order; /**< slave order number acc. to EEPROM */ |
|
161 char *sii_name; /**< slave name acc. to EEPROM */ |
|
162 int16_t sii_current_on_ebus; /**< power consumption */ |
|
163 |
180 |
164 struct kobject sdo_kobj; /**< kobject for Sdos */ |
181 struct kobject sdo_kobj; /**< kobject for Sdos */ |
165 struct list_head sdo_dictionary; /**< Sdo dictionary list */ |
182 struct list_head sdo_dictionary; /**< Sdo dictionary list */ |
166 uint8_t sdo_dictionary_fetched; /**< dictionary has been fetched */ |
183 uint8_t sdo_dictionary_fetched; /**< dictionary has been fetched */ |
167 unsigned long jiffies_preop; /**< time, the slave went to PREOP */ |
184 unsigned long jiffies_preop; /**< time, the slave went to PREOP */ |