All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Keinen Namen" <GSM909@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] ISR Again
Date: Mon, 10 Jul 2006 13:40:00 +0200	[thread overview]
Message-ID: <20060710114000.145290@domain.hid> (raw)
In-Reply-To: <44B2169F.7070205@domain.hid>

hi Again

witch from have a RT_ISR?

I simply want a Programm that run helloworld_isr when Interrupt 13 is fired.

#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;

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

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,"einName",13,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);
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


  reply	other threads:[~2006-07-10 11:40 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
2006-07-10  8:58     ` Jan Kiszka
2006-07-10 11:40       ` Keinen Namen [this message]
2006-07-10 14:00         ` [Xenomai-help] Re: ISR Again 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=20060710114000.145290@domain.hid \
    --to=gsm909@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.