Re: Has somebody written special button driver?
From: Cliff Brake (cbrakenospam_at_nospam.com)
Date: 06/15/04
- Next message: fred: "Re: Has somebody written special button driver?"
- Previous message: Cliff Brake: "Re: Problem with IPSM and Micron flashes in PB 4.2"
- In reply to: fred: "Has somebody written special button driver?"
- Next in thread: fred: "Re: Has somebody written special button driver?"
- Reply: fred: "Re: Has somebody written special button driver?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Jun 2004 07:07:22 -0400
There are many ways to do this -- one is to write a small stream driver that
has the IST tied to the button. Changes will probably be required in the
OAL interrupt code as well. The popup program can be part of the stream
driver (after all, drivers are just application DLLs) or a separate
application. The popup application and the stream button driver can
communicate using IOCTLs and named events.
It may not be necessary to write an IST for this -- polling works fine in
many applications. Calculate the % of time the system will spend polling
and then decide if the % is significant enough to worry about.
Say it takes 50us (complete guess) to read the GPIO and make some decisions
and do a context switch and whatever else needs done. If you poll the GPIO
every 10ms, the percent overhead is 50us/10ms = 0.5%.
Also, consider the fact the system will be coming out of idle to do the
polling, so take power measurements before and after. With 400MHz
processors, polling can be done pretty fast.
Cliff
Cliff Brake (eMVP)
BEC Systems
cbrake _at_ bec-systems _dot_ com
fred wrote:
> Hi,
> I want to write a driver for the button of our PDA product. The
> button is used to trigger a pop-up program and is connected with a
> GPIO. Through testing the GPIO status you can know the button is
> pushed or not. Testing the status can be done by writing a ISR for
> it.
> But I don't know how to arrange the software frame structure. I want
> use the pop-up program to call function InterruptInitialize to
> initialize the button interrupt, but the pop-up program is not a
> kernel program ,can it call function InterruptInitialize ?
> Another idea is write the button IST same like keyboard driver , and
> use GWES.EXE to load it.
> In fact I don't how to resovle this problem.
> I need help.
> Any idea will be welcome.
> Fred
--
- Next message: fred: "Re: Has somebody written special button driver?"
- Previous message: Cliff Brake: "Re: Problem with IPSM and Micron flashes in PB 4.2"
- In reply to: fred: "Has somebody written special button driver?"
- Next in thread: fred: "Re: Has somebody written special button driver?"
- Reply: fred: "Re: Has somebody written special button driver?"
- Messages sorted by: [ date ] [ thread ]