ts-7000
[Top] [All Lists]

[ts-7000] Re: request_irq help

To:
Subject: [ts-7000] Re: request_irq help
From: "mbuynak" <>
Date: Thu, 05 Apr 2007 19:31:09 -0000
Wow, no help at all?




--- In  "mbuynak" <> wrote:
>
> Hello, 
> 
> I'm trying to write a very simple irq handler for a ts-7250 board, and
> I can't seem to get the dependencies correct.
> 
> Here's what I have so far
> 
> #include <sched.h>
> #include <signal.h>
> #include <asm/irq.h>
> #include <stdio.h>
> 
> void irq_handler(int irq, void *dev_id, struct pt_regs *regs)
> {
>       printf("handling irq %d/n",irq);
> }
> 
> int main(void)
> {
>       if(request_irq(5, irq_handler, 0, "ChannelA", 0)<0)
>               printf("Can't get irq 5\n");
>       if(request_irq(6, irq_handler, 0, "ChannelB", 0)<0)
>               printf("Can't get irq 6\n");
> 
>       return 0;
> }
> 
> 
> 
> I realize that I need to do things like change the interrupt type and
> enable the interrupt as well, but I thought this would be a very
> simple starting point.
> 
> However, when I try to compile
> 
> arm-unknown-linux-gcc -Wall -o interrupt irq_handler.c
> 
> it generates
> 
> irq_handle.c: In function 'main':
> irq_handle.c:13: warning: implicit declaration of function 'request_irq'
> /tmp/ccZPksSn.o: In function `main':
> irq_handle.c:(.text+0x5c): undefined reference to `request_irq'
> irq_handle.c:(.text+0x8c): undefined reference to `request_irq'
> collect2: ld returned 1 exit status
> 
> 
> I also changed asm/irq.h to 
> 
> #include <asm/arch-l7200/irqs.h> 
> 
> rather than point to 
> 
> #include <asm/arch/irqs.h>
> 
> because asm/arch/irqs.h doesn't exist.  How do I know which
> architecture to choose?
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU