Hi Dave,

setreg is a modified function from pxaregs
I am not using an interupt handler so this is why it is not working.  However as I interperated the Developer manual it implied interrupts were an option. Section: 4.1.3.5.


Thanks

Grahame


----- Original Message -----
From: Dave Hylands <dhylands@gmail.com>
To: General mailing list for gumstix users. <gumstix-users@lists.sourceforge.net>
Sent: Tuesday, November 28, 2006 2:18:53 PM GMT+1000
Subject: Re: [Gumstix-users] GPIO edge detect

HI Grahame,

> I am setting up GPIO66 as an edge detect. However when I press the button it clears the GFER2_66 flag and does not set the GEDR2_66
>
> This is how I am setting it up?
>
> // Set Standby Switch detector pin
> setreg("GAFR2L_66", (u32)0); // Set GPIO66 to GPIO
> setreg("GPDR2_66", (u32)0); // Set GPIO66 direction register as input
> setreg("GFER2_66", (u32)1); // Set GPIO66 falling edge detect

What does the setreg function do?

Are you doing this from within a kernel driver? The rising/falling
edge detection is only valid if you have an interrupt handler
installed.

Have you looked at this driver that I wrote:
http://docwiki.gumstix.org/GPIO_event

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users