equal
deleted
inserted
replaced
39 /*****************************************************************************/ |
39 /*****************************************************************************/ |
40 |
40 |
41 #ifndef __EC_MASTER_H__ |
41 #ifndef __EC_MASTER_H__ |
42 #define __EC_MASTER_H__ |
42 #define __EC_MASTER_H__ |
43 |
43 |
|
44 #include <linux/version.h> |
44 #include <linux/list.h> |
45 #include <linux/list.h> |
45 #include <linux/timer.h> |
46 #include <linux/timer.h> |
46 #include <linux/wait.h> |
47 #include <linux/wait.h> |
47 #include <linux/kthread.h> |
48 #include <linux/kthread.h> |
48 #include <asm/semaphore.h> |
49 #include <asm/semaphore.h> |
86 struct ec_master { |
87 struct ec_master { |
87 unsigned int index; /**< Index. */ |
88 unsigned int index; /**< Index. */ |
88 unsigned int reserved; /**< \a True, if the master is in use. */ |
89 unsigned int reserved; /**< \a True, if the master is in use. */ |
89 |
90 |
90 ec_cdev_t cdev; /**< Master character device. */ |
91 ec_cdev_t cdev; /**< Master character device. */ |
|
92 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) |
|
93 struct device *class_device; /**< Master class device. */ |
|
94 #else |
91 struct class_device *class_device; /**< Master class device. */ |
95 struct class_device *class_device; /**< Master class device. */ |
|
96 #endif |
|
97 |
92 struct semaphore master_sem; /**< Master semaphore. */ |
98 struct semaphore master_sem; /**< Master semaphore. */ |
93 |
99 |
94 ec_device_t main_device; /**< EtherCAT main device. */ |
100 ec_device_t main_device; /**< EtherCAT main device. */ |
95 const uint8_t *main_mac; /**< MAC address of main device. */ |
101 const uint8_t *main_mac; /**< MAC address of main device. */ |
96 ec_device_t backup_device; /**< EtherCAT backup device. */ |
102 ec_device_t backup_device; /**< EtherCAT backup device. */ |