Ported examples to new DC configuration function.
authorFlorian Pose <fp@igh-essen.com>
Tue, 05 May 2009 15:18:24 +0000
changeset 1449 6d1ef8afeaab
parent 1448 d7ba0c408a07
child 1450 117f5497efd9
Ported examples to new DC configuration function.
examples/dc_rtai/dc_rtai_sample.c
examples/dc_user/main.c
--- a/examples/dc_rtai/dc_rtai_sample.c	Tue May 05 15:03:59 2009 +0000
+++ b/examples/dc_rtai/dc_rtai_sample.c	Tue May 05 15:18:24 2009 +0000
@@ -326,11 +326,8 @@
 	if (off_counter_out < 0)
 		goto out_release_master;
 
-#if 1
     // configure SYNC signals for this slave
-	ecrt_slave_config_dc_assign_activate(sc, 0x0700);
-	ecrt_slave_config_dc_sync_signals(sc, 1000000, 440000, 0, 0);
-#endif
+	ecrt_slave_config_dc(sc, 0x0700, 1000000, 440000, 0, 0);
 
     printk(KERN_INFO PFX "Activating master...\n");
     if (ecrt_master_activate(master)) {
--- a/examples/dc_user/main.c	Tue May 05 15:03:59 2009 +0000
+++ b/examples/dc_user/main.c	Tue May 05 15:18:24 2009 +0000
@@ -237,11 +237,8 @@
 	if (off_counter_out < 0)
         return -1;
 
-#if 1
     // configure SYNC signals for this slave
-	ecrt_slave_config_dc_assign_activate(sc, 0x0700);
-	ecrt_slave_config_dc_sync_signals(sc, 10000000, 4400000, 0, 0);
-#endif
+	ecrt_slave_config_dc(sc, 0x0700, 10000000, 4400000, 0, 0);
 
     printf("Activating master...\n");
     if (ecrt_master_activate(master))