SDO configuration interface, SDO download state machine.

This commit is contained in:
Florian Pose
2006-08-03 16:48:53 +00:00
parent e15945b26b
commit 32d3bc8d0f
5 changed files with 425 additions and 0 deletions
+9
View File
@@ -64,6 +64,7 @@ uint8_t k_stat;
ec_pdo_reg_t domain1_pdos[] = {
{"1", Beckhoff_EL4132_Output1, &r_ana_out},
{"8", Beckhoff_EL5001_Value, NULL},
{}
};
@@ -123,6 +124,8 @@ void release_lock(void *data)
int __init init_mini_module(void)
{
ec_slave_t *slave;
printk(KERN_INFO "=== Starting Minimal EtherCAT environment... ===\n");
if ((master = ecrt_request_master(0)) == NULL) {
@@ -145,6 +148,12 @@ int __init init_mini_module(void)
goto out_release_master;
}
if (!(slave = ecrt_master_get_slave(master, "8")))
goto out_release_master;
if (ecrt_slave_conf_sdo8(slave, 0x4061, 1, 0))
goto out_release_master;
printk(KERN_INFO "Activating master...\n");
if (ecrt_master_activate(master)) {
printk(KERN_ERR "Failed to activate master!\n");