equal
deleted
inserted
replaced
9 *****************************************************************************/ |
9 *****************************************************************************/ |
10 |
10 |
11 #ifndef _EC_SLAVE_H_ |
11 #ifndef _EC_SLAVE_H_ |
12 #define _EC_SLAVE_H_ |
12 #define _EC_SLAVE_H_ |
13 |
13 |
|
14 #include <linux/list.h> |
|
15 |
|
16 #include "globals.h" |
|
17 #include "command.h" |
14 #include "types.h" |
18 #include "types.h" |
15 |
19 |
16 /*****************************************************************************/ |
20 /*****************************************************************************/ |
17 |
21 |
18 /** |
22 /** |
42 Unterstützte Mailbox-Protokolle. |
46 Unterstützte Mailbox-Protokolle. |
43 */ |
47 */ |
44 |
48 |
45 enum |
49 enum |
46 { |
50 { |
47 EC_MBOX_AOE = 0x01, /**< ADS over EtherCAT */ |
51 EC_MBOX_AOE = 0x01, /**< ADS-over-EtherCAT */ |
48 EC_MBOX_EOE = 0x02, /**< Ethernet over EtherCAT */ |
52 EC_MBOX_EOE = 0x02, /**< Ethernet-over-EtherCAT */ |
49 EC_MBOX_COE = 0x04, /**< CANopen over EtherCAT */ |
53 EC_MBOX_COE = 0x04, /**< CANopen-over-EtherCAT */ |
50 EC_MBOX_FOE = 0x08, /**< File Service over EtherCAT */ |
54 EC_MBOX_FOE = 0x08, /**< File-Access-over-EtherCAT */ |
51 EC_MBOX_SOE = 0x10, /**< Servo Profile over EtherCAT */ |
55 EC_MBOX_SOE = 0x10, /**< Servo-Profile-over-EtherCAT */ |
52 EC_MBOX_VOE = 0x20 /**< Vendor specific */ |
56 EC_MBOX_VOE = 0x20 /**< Vendor specific */ |
53 }; |
57 }; |
54 |
58 |
55 /*****************************************************************************/ |
59 /*****************************************************************************/ |
56 |
60 |
229 char *eeprom_name; /**< Slave-Name laut Hersteller */ |
233 char *eeprom_name; /**< Slave-Name laut Hersteller */ |
230 char *eeprom_group; /**< Slave-Beschreibung laut Hersteller */ |
234 char *eeprom_group; /**< Slave-Beschreibung laut Hersteller */ |
231 char *eeprom_desc; /**< Slave-Beschreibung laut Hersteller */ |
235 char *eeprom_desc; /**< Slave-Beschreibung laut Hersteller */ |
232 |
236 |
233 struct list_head sdo_dictionary; /**< SDO-Verzeichnis des Slaves */ |
237 struct list_head sdo_dictionary; /**< SDO-Verzeichnis des Slaves */ |
|
238 |
|
239 ec_command_t mbox_command; /**< Kommando für Mailbox-Kommunikation */ |
234 }; |
240 }; |
235 |
241 |
236 /*****************************************************************************/ |
242 /*****************************************************************************/ |
237 |
243 |
238 // Slave construction/destruction |
244 // Slave construction/destruction |
245 int ec_slave_sii_read32(ec_slave_t *, uint16_t, uint32_t *); |
251 int ec_slave_sii_read32(ec_slave_t *, uint16_t, uint32_t *); |
246 int ec_slave_sii_write16(ec_slave_t *, uint16_t, uint16_t); |
252 int ec_slave_sii_write16(ec_slave_t *, uint16_t, uint16_t); |
247 int ec_slave_state_change(ec_slave_t *, uint8_t); |
253 int ec_slave_state_change(ec_slave_t *, uint8_t); |
248 int ec_slave_set_fmmu(ec_slave_t *, const ec_domain_t *, const ec_sync_t *); |
254 int ec_slave_set_fmmu(ec_slave_t *, const ec_domain_t *, const ec_sync_t *); |
249 |
255 |
250 // Mailbox |
|
251 uint8_t *ec_slave_prepare_mailbox_send(ec_slave_t *, uint8_t, size_t); |
|
252 uint8_t *ec_slave_mailbox_receive(ec_slave_t *, uint8_t, size_t *); |
|
253 |
|
254 // CANopen over EtherCAT |
256 // CANopen over EtherCAT |
255 int ec_slave_fetch_sdo_list(ec_slave_t *); |
257 int ec_slave_fetch_sdo_list(ec_slave_t *); |
256 |
258 |
257 // Misc |
259 // Misc |
258 void ec_slave_print(const ec_slave_t *, unsigned int); |
260 void ec_slave_print(const ec_slave_t *, unsigned int); |