Smaller fixes on RTAI example.
authorFlorian Pose <fp@igh-essen.com>
Fri, 12 May 2006 10:13:01 +0000
changeset 233 31d327ce38d3
parent 232 f6594a07cdda
child 234 fd04cfde1c4b
Smaller fixes on RTAI example.
examples/rtai/rtai_sample.c
--- a/examples/rtai/rtai_sample.c	Fri May 12 10:12:14 2006 +0000
+++ b/examples/rtai/rtai_sample.c	Fri May 12 10:13:01 2006 +0000
@@ -23,17 +23,14 @@
  *
  *****************************************************************************/
 
+// Linux
 #include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/timer.h>
-#include <linux/interrupt.h>
 
 // RTAI
-#include "rtai.h"
 #include "rtai_sched.h"
 #include "rtai_sem.h"
 
-// EtherCAT realtime interface
+// EtherCAT
 #include "../../include/ecrt.h"
 
 /*****************************************************************************/
@@ -63,7 +60,6 @@
 
 // channels
 uint32_t k_pos;
-uint8_t k_stat;
 
 ec_field_init_t domain1_fields[] = {
     {&r_ssi_input, "3", "Beckhoff", "EL5001", "InputValue",   0},
@@ -207,12 +203,10 @@
     ecrt_master_prepare_async_io(master);
 #endif
 
-#if 1
     if (ecrt_master_start_eoe(master)) {
         printk(KERN_ERR "Failed to start EoE processing!\n");
         goto out_deactivate;
     }
-#endif
 
     printk("Starting cyclic sample thread...\n");
     requested_ticks = nano2count(TIMERTICKS);
@@ -253,10 +247,8 @@
 {
     printk(KERN_INFO "=== Stopping EtherCAT RTAI sample module... ===\n");
 
-    printk(KERN_INFO "Stopping RT task...\n");
     rt_task_delete(&task);
     stop_rt_timer();
-    printk(KERN_INFO "Deactivating EtherCAT master...\n");
     ecrt_master_deactivate(master);
     ecrt_release_master(master);
     rt_sem_delete(&master_sem);