Minor changes to minimal example.
authorFlorian Pose <fp@igh-essen.com>
Fri, 27 Oct 2006 12:45:44 +0000
changeset 457 2b4ba84b6058
parent 456 dea14706efc2
child 458 6467f0f6e370
Minor changes to minimal example.
examples/mini/mini.c
--- a/examples/mini/mini.c	Fri Oct 27 12:45:22 2006 +0000
+++ b/examples/mini/mini.c	Fri Oct 27 12:45:44 2006 +0000
@@ -42,6 +42,8 @@
 
 #define FREQUENCY 100
 
+//#define KBUS
+
 /*****************************************************************************/
 
 struct timer_list timer;
@@ -52,7 +54,7 @@
 spinlock_t master_lock = SPIN_LOCK_UNLOCKED;
 
 // data fields
-#if 1
+#ifdef KBUS
 void *r_inputs;
 void *r_outputs;
 #endif
@@ -81,7 +83,9 @@
 
     // process data
     //k_pos = EC_READ_U32(r_ssi);
+#ifdef KBUS
     EC_WRITE_U8(r_outputs + 2, einaus ? 0xFF : 0x00);
+#endif
 
     // send
     ecrt_master_run(master);
@@ -149,7 +153,7 @@
     }
 #endif
 
-#if 1
+#ifdef KBUS
     if (!ecrt_domain_register_pdo_range(domain1, "0", Beckhoff_BK1120,
                                         EC_DIR_OUTPUT, 0, 4, &r_outputs)) {
         printk(KERN_ERR "PDO registration failed!\n");