12 #include <linux/netdevice.h> |
12 #include <linux/netdevice.h> |
13 |
13 |
14 /*****************************************************************************/ |
14 /*****************************************************************************/ |
15 |
15 |
16 struct ec_device; |
16 struct ec_device; |
17 |
|
18 typedef struct ec_device ec_device_t; |
17 typedef struct ec_device ec_device_t; |
19 |
|
20 /*****************************************************************************/ |
|
21 |
|
22 typedef enum |
|
23 { |
|
24 EC_DEVICE_STATE_READY = 0, |
|
25 EC_DEVICE_STATE_SENT, |
|
26 EC_DEVICE_STATE_RECEIVED, |
|
27 EC_DEVICE_STATE_TIMEOUT, |
|
28 EC_DEVICE_STATE_ERROR |
|
29 } |
|
30 ec_device_state_t; |
|
31 |
18 |
32 /*****************************************************************************/ |
19 /*****************************************************************************/ |
33 |
20 |
34 ec_device_t *EtherCAT_dev_register(unsigned int, struct net_device *, |
21 ec_device_t *EtherCAT_dev_register(unsigned int, struct net_device *, |
35 irqreturn_t (*)(int, void *, |
22 irqreturn_t (*)(int, void *, |
36 struct pt_regs *), |
23 struct pt_regs *), |
37 struct module *); |
24 struct module *); |
38 void EtherCAT_dev_unregister(unsigned int, ec_device_t *); |
25 void EtherCAT_dev_unregister(unsigned int, ec_device_t *); |
39 |
26 |
40 int EtherCAT_dev_is_ec(const ec_device_t *, const struct net_device *); |
27 int EtherCAT_dev_is_ec(const ec_device_t *, const struct net_device *); |
41 void EtherCAT_dev_state(ec_device_t *, ec_device_state_t); |
|
42 void EtherCAT_dev_receive(ec_device_t *, const void *, size_t); |
28 void EtherCAT_dev_receive(ec_device_t *, const void *, size_t); |
43 void EtherCAT_dev_link_state(ec_device_t *, uint8_t); |
29 void EtherCAT_dev_link_state(ec_device_t *, uint8_t); |
44 |
30 |
45 /*****************************************************************************/ |
31 /*****************************************************************************/ |
46 |
32 |