All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Keinen Namen" <GSM909@domain.hid>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: Re: [Xenomai-help] isr
Date: Mon, 10 Jul 2006 10:45:49 +0200	[thread overview]
Message-ID: <20060710084549.4390@domain.hid> (raw)
In-Reply-To: <44B21018.4060702@domain.hid>

Sorry here is my source code.

My Problem ist how can I call the ISR.

Regards Memory


#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>

#include <native/intr.h>

MODULE_DESCRIPTION("My kernel module");
MODULE_AUTHOR("Nobody");
MODULE_DESCRIPTION("Dei Mudda");
MODULE_LICENSE("my own");


RT_INTR my_rt_intr;

int helloworld_isr(rt_intr_t *intr){
	printk( KERN_ALERT "IRQ\n");
	return IRQ_HANDLED;
}

struct file_operations helloworld_fops = {
	.owner 		= THIS_MODULE,
	.llseek		= NULL,
	.read		= NULL,
	.write		= NULL,
	.readdir	= NULL,
	.poll		= NULL,
	.ioctl		= NULL,
	.mmap		= NULL,
	.open		= NULL,
	.flush		= NULL,
	.release	= NULL,
	.fsync		= NULL,
	.fasync		= NULL,
	.lock		= NULL,
	.readv		= NULL,
	.writev		= NULL,
};


static int helloworld_init_module(void) {
	int x;
	printk( KERN_ALERT "Module helloworld init startet Version 0.1\n" );
	x = rt_intr_create(&my_rt_intr,"ein Name",SIU_INT_TIMER2,&helloworld_isr,NULL,0);
	if(!x){
		printk( KERN_ALERT "Interrupt erfolgreich erstellt\n");
		if(!(rt_intr_enable(&my_rt_intr))){
			printk( KERN_ALERT "Interrupt erfolgreich aktiviert\n");
		}
	}else{
		printk( KERN_ALERT "Interrupt Erstellung fehlgeschlagen %i\n",x);
	}
}

static void helloworld_exit_module(void) {

	if(!(rt_intr_disable(&my_rt_intr))){
		printk( KERN_ALERT "Interrupt Cleared !\n" );
		if(!(rt_intr_delete(&my_rt_intr))){
	 		printk(KERN_ALERT "Interrupt deleted\n" );
		}
	}

	printk( KERN_ALERT "Module helloworld exit\n" );
}

module_init(helloworld_init_module);
module_exit(helloworld_exit_module);

-------- Original-Nachricht --------
Datum: Mon, 10 Jul 2006 10:30:16 +0200
Von: Jan Kiszka <jan.kiszka@domain.hid>
An: Keinen Namen <GSM909@domain.hid>
Betreff: Re: [Xenomai-help] isr

> Keinen Namen wrote:
> > Hi I useing Xenomai 2.1 and the native skin 
> > 
> > I want create a intr in kernel space with rt_intr_create, the 4th
> argument is the pointer is the ISR.
> > 
> > My Question is which form does the ISR must have
> > 
> > rt_isr_t myisr ( ??? )
> > {
> > ...
> > }
> > 
> 
> int my_isr(rt_intr_t *intr);
> 
> That's indeed undocumented, you had to browse the code for this
> information. :-/
> 
> [Note: unless you are writing some specialised or experimental code,
> developing drivers over the RTDM skin is recommended now. This aims at
> unifying the device interfaces for all skins.]
> 
> Jan
> 

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl


  reply	other threads:[~2006-07-10  8:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10  8:07 [Xenomai-help] isr Keinen Namen
2006-07-10  8:30 ` Jan Kiszka
2006-07-10  8:45   ` Keinen Namen [this message]
2006-07-10  8:58     ` Jan Kiszka
2006-07-10 11:40       ` [Xenomai-help] ISR Again Keinen Namen
2006-07-10 14:00         ` [Xenomai-help] " Bernhard Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060710084549.4390@domain.hid \
    --to=gsm909@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.