Re: How operate GPIO port under WIN CE 4.2??

From: Yannick Chamming's [eMVP] (ychammings_nospam_at_adeset.com)
Date: 11/30/04


Date: Tue, 30 Nov 2004 08:11:49 +0100

You should be able to access GPIOs using registers of one controller. These
registers are probably mapped into the physical memory space.
To be able to access the registers, you'll need to have their memory area
mapped into the virtual address space : to do this, use the OEMAddressTable
(look for this name in PB help or in code of your BSP)
Next, if you want to drive them from user space (i.e application or drivers,
as only the OAL uses kernel space), you need to map the kernel address of
the registers (the one declared previously in OEMAddressTable) in user space
of your process. Use VirtualAlloc & VirtualCopy to do so.
Then, you'll have access to your registers through a pointer in memory, and
you should be able to drive your GPIO. This last part depends exclusively
from your HW, so you have to refer to the data*** of your controller.

Yannick

--
----------------------------------------------------------------
Yannick Chamming's (eMVP)
ADESET
Windows Embedded Manager
ychammings AT adeset DOT com>
http://www.adeset.com
Tél  : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------
"John lee" <jinhualee@sohu.com> wrote in message
news:uqmcq9o1EHA.2180@TK2MSFTNGP10.phx.gbl...
> How operate  GPIO port under WIN CE 4.2?
>
> I use EP9301(ARM920T) to my project.And I want to use EGPIO0 to EGPIO7 as
> inputs to control Keyboard , and EGPIO8 to EGPIO15 as output to control
LCD
> Module.
> My trouble is I don't know how to operate the GPIO under WIN CE 4.2 .If
you
> know , pls give me suggestion ,and I will appreciate you very much.
>
> regards.
>
>