ISR-Aufruf in read_process_data
authorWilhelm Hagemeister <hm@igh-essen.com>
Fri, 04 Nov 2005 17:05:20 +0000
changeset 6 e36a85dc2730
parent 5 6f2508af550c
child 7 a5c18da4e781
ISR-Aufruf in read_process_data
drivers/Makefile
drivers/ec_device.c
drivers/ec_master.c
rt/msr_io.c
--- a/drivers/Makefile	Fri Nov 04 16:47:23 2005 +0000
+++ b/drivers/Makefile	Fri Nov 04 17:05:20 2005 +0000
@@ -9,22 +9,40 @@
 #
 #################################################################
 
-MSR_DIR = /vol/projekte/msr_messen_steuern_regeln
-EC_DIR = $(MSR_DIR)/ethercat
+#KERNELDIR=/usr/src/linux
+#KERNELDIR=/home/rich/linux-2.4.20.CX1100-rthal5
+#KERNELDIR=./linux-2.4.20.CX1100-rthal5
 
-#KERNELDIR = $(EC_DIR)/linux-2.4.20.CX1100-rthal5-kdb
-KERNELDIR = $(EC_DIR)/linux-2.4.20-kdb
+#IgH
+KERNELDIR = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/linux-2.4.20.CX1100-rthal5
+RTAIDIR   = /vol/projekte/msr_messen_steuern_regeln/linux/kernel/2.4.20/include/rtai-24.1.13
+RTLIBDIR = rt_lib
+
+#euler-nottuln
 #KERNELDIR = /usr/src/linux
+#RTAIDIR = /usr/src/rtai
+
+#patra
+#KERNELDIR = /usr/src/linux-2.4.20.CX1100-rthal5
+#RTAIDIR   = /usr/src/rtai-24.1.13
+
+#include $(KERNELDIR)/.config
 
 ECAT_8139_OBJ = drv_8139too.o ec_device.o ec_master.o \
 	ec_slave.o ec_command.o ec_types.o
 
-CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ \
-	-DMODULE -I$(KERNELDIR)/include
+
+CFLAGS = -O2 -Wall -Wuninitialized -D__KERNEL__ -DMODULE \
+	-I$(KERNELDIR)/include -D_RTAI -I$(RTAIDIR)/include \
+	-I$(RTLIBDIR)/msr-include
+
+ifdef CONFIG_SMP
+	CFLAGS += -D__SMP__ -DSMP
+endif
 
 #################################################################
 
-all: .depend Makefile ecat_8139too.o
+all: .depend ecat_8139too.o
 
 ecat_8139too.o: $(ECAT_8139_OBJ)
 	$(LD) -r $(ECAT_8139_OBJ) -o $@
@@ -37,7 +55,7 @@
 
 #################################################################
 
-.depend depend dep:
+.depend:
 	$(CC) $(CFLAGS) -M *.c > .depend
 
 ifeq (.depend,$(wildcard .depend))
--- a/drivers/ec_device.c	Fri Nov 04 16:47:23 2005 +0000
+++ b/drivers/ec_device.c	Fri Nov 04 17:05:20 2005 +0000
@@ -288,12 +288,12 @@
 
 void EtherCAT_device_call_isr(EtherCAT_device_t *ecd)
 {
-  EC_DBG(KERN_DEBUG "EtherCAT: Calling ISR...\n");
+//  EC_DBG(KERN_DEBUG "EtherCAT: Calling ISR...\n");
 
   // Manuell die ISR aufrufen
   rtl8139_interrupt(0, ecd->dev, NULL);
 
-  EC_DBG(KERN_DEBUG "EtherCAT: ISR finished.\n");
+//  EC_DBG(KERN_DEBUG "EtherCAT: ISR finished.\n");
 }
 
 /***************************************************************/
--- a/drivers/ec_master.c	Fri Nov 04 16:47:23 2005 +0000
+++ b/drivers/ec_master.c	Fri Nov 04 17:05:20 2005 +0000
@@ -1767,6 +1767,8 @@
     return -1;
   }
 
+  EtherCAT_device_call_isr(master->dev);
+
   if (EtherCAT_receive(master) < 0)
   {
     EC_DBG(KERN_ERR "EtherCAT: Could not receive cyclic command!\n");
--- a/rt/msr_io.c	Fri Nov 04 16:47:23 2005 +0000
+++ b/rt/msr_io.c	Fri Nov 04 17:05:20 2005 +0000
@@ -86,7 +86,7 @@
 static EtherCAT_slave_t ecat_slaves[] =
 {
     //Block 1
-  ECAT_INIT_SLAVE(Beckhoff_EK1100),
+/*  ECAT_INIT_SLAVE(Beckhoff_EK1100),
   ECAT_INIT_SLAVE(Beckhoff_EL4102),
   ECAT_INIT_SLAVE(Beckhoff_EL3162),
   ECAT_INIT_SLAVE(Beckhoff_EL1014),
@@ -103,7 +103,7 @@
   ECAT_INIT_SLAVE(Beckhoff_EL2004),
   ECAT_INIT_SLAVE(Beckhoff_EL2004),
   ECAT_INIT_SLAVE(Beckhoff_EL2004),
-  ECAT_INIT_SLAVE(Beckhoff_EL2004),
+  ECAT_INIT_SLAVE(Beckhoff_EL2004), */
   //Block 2
   ECAT_INIT_SLAVE(Beckhoff_EK1100),
   ECAT_INIT_SLAVE(Beckhoff_EL4102),