128 } |
128 } |
129 |
129 |
130 //ecrt_master_debug(master, 2); |
130 //ecrt_master_debug(master, 2); |
131 |
131 |
132 #if 0 |
132 #if 0 |
133 if (ecrt_master_sdo_write(master, "1", 0x4061, 1, 0, 1) || |
133 if (!(slave = ecrt_master_get_slave(master, "5"))) { |
134 ecrt_master_sdo_write(master, "1", 0x4061, 2, 1, 1) || |
134 printk(KERN_ERR "Failed to get slave 5!\n"); |
135 ecrt_master_sdo_write(master, "1", 0x4061, 3, 1, 1) || |
135 goto out_deactivate; |
136 ecrt_master_sdo_write(master, "1", 0x4066, 0, 0, 1) || |
136 } |
137 ecrt_master_sdo_write(master, "1", 0x4067, 0, 4, 1) || |
137 |
138 ecrt_master_sdo_write(master, "1", 0x4068, 0, 0, 1) || |
138 if (ecrt_slave_sdo_write_exp8(slave, 0x4061, 1, 0) || |
139 ecrt_master_sdo_write(master, "1", 0x4069, 0, 25, 1) || |
139 ecrt_slave_sdo_write_exp8(slave, 0x4061, 2, 1) || |
140 ecrt_master_sdo_write(master, "1", 0x406A, 0, 25, 1) || |
140 ecrt_slave_sdo_write_exp8(slave, 0x4061, 3, 1) || |
141 ecrt_master_sdo_write(master, "1", 0x406B, 0, 50, 1)) { |
141 ecrt_slave_sdo_write_exp8(slave, 0x4066, 0, 0) || |
|
142 ecrt_slave_sdo_write_exp8(slave, 0x4067, 0, 4) || |
|
143 ecrt_slave_sdo_write_exp8(slave, 0x4068, 0, 0) || |
|
144 ecrt_slave_sdo_write_exp8(slave, 0x4069, 0, 25) || |
|
145 ecrt_slave_sdo_write_exp8(slave, 0x406A, 0, 25) || |
|
146 ecrt_slave_sdo_write_exp8(slave, 0x406B, 0, 50)) { |
142 printk(KERN_ERR "Failed to configure SSI slave!\n"); |
147 printk(KERN_ERR "Failed to configure SSI slave!\n"); |
143 goto out_deactivate; |
148 goto out_deactivate; |
144 } |
149 } |
145 #endif |
150 #endif |
146 |
151 |
147 //ecrt_master_debug(master, 0); |
152 //ecrt_master_debug(master, 0); |
148 |
153 |
149 #if 0 |
154 #if 0 |
150 printk(KERN_INFO "Writing alias...\n"); |
155 printk(KERN_INFO "Writing alias...\n"); |
151 if (ecrt_master_write_slave_alias(master, "0", 0xBEEF)) { |
156 if (ecrt_slave_sdo_write_exp16(slave, 0xBEEF)) { |
152 printk(KERN_ERR "Failed to write alias!\n"); |
157 printk(KERN_ERR "Failed to write alias!\n"); |
153 goto out_deactivate; |
158 goto out_deactivate; |
154 } |
159 } |
155 #endif |
160 #endif |
156 |
161 |