ts-7000
[Top] [All Lists]

[ts-7000] Re: interrupt driven GPIO

To:
Subject: [ts-7000] Re: interrupt driven GPIO
From: "Yan Seiner" <>
Date: Thu, 01 Dec 2005 18:11:45 -0000
--- In  Curtis Monroe <> wrote:
>
> User space programs can't receive hardware interupts (only kernel space 
> drivers can), you would need to do polling to simulate interupt in user 
> space, or look at the kernel source code for examples in kernel drivers.
> 

Right....  I'm getting hauled into writing kernel modules, kicking and
screaming all the way...

So, I'm going to have to write a kernel module that enables interrupts
on a GPIO pin for both leading and trailing edge if possible, stores
the time, and then hands that over to a userspace app....

I've been looking through TS7250_kernel_gpio.c posted here, but all
that provides is a general skeleton; it doesn't explain what it is
doing....

Alas, I've managed to avoid IRQ handling so far, so I have no idea
what I am looking at...

For example, the code includes the following:

// The GPIOs on the DIO header are all on port B (DIO 0..7) and F (DIO 8).
// Here I only handle Port B (DIO 0..7).
#define GPIO_B_DATA     ((volatile uint32_t *)(gpio_ptr + 0x0004))
#define GPIO_B_DDIR     ((volatile uint32_t *)(gpio_ptr + 0x0014))
#define GPIO_B_TYPE1    ((volatile uint32_t *)(gpio_ptr + 0x00AC))
#define GPIO_B_TYPE2    ((volatile uint32_t *)(gpio_ptr + 0x00B0))
#define GPIO_B_EOI      ((volatile uint32_t *)(gpio_ptr + 0x00B4))
#define GPIO_B_INTENB   ((volatile uint32_t *)(gpio_ptr + 0x00B8))
#define GPIO_B_INTSTS   ((volatile uint32_t *)(gpio_ptr + 0x00BC))

>From reading the docs, I gather that DDIR is the data direction
register, but TYPE1, TYPE2, EOI, INTENB and INTENS aren't described
anywhere.

What's more, I need 5V TTL levels, so I need docs for the DIO-24 or
for the K7V (Video board) dio header, and I can't find those
descriptions anywhere....

--Yan





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/CFFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

<*> 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