GPIO access in Windows CE

Post Reply
itouch
Posts: 54
Joined: Mon Jul 27, 2009 5:20 am

GPIO access in Windows CE

Post by itouch » Fri Sep 04, 2009 6:20 am

Can someone please direct me to some tips and code on how to setup and access the GPIO ports from Windows CE? Thank you.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: GPIO access in Windows CE

Post by nicolas » Tue Sep 08, 2009 12:28 pm

Background, Wince 5.0 Mini2440 SDK as provided (pre june 2009) comes with a couple of drivers for the I/O on the Mini2440

For input, WindowsCE5.0\smdk2440\DRIVERS\Userkey
For output, WindowsCE5.0\smdk2440\DRIVERS\LEDdriver

For example code see dvd\WindowsCE5.0\QQ2440test specifically keytestdlg.cpp
Its the sample application provided.
It controls the LED's, and should also react to button presses from the hardware buttons.

I have not been able to get the Input working (ie the 6 button switches) - even thought the driver maps them to keyboard actions.

Probably you can access all the GPIO's from software, but thats beyond me. The above code should help you.
Short of that, try modifying the drivers to add more I/O's to the way it does its thing.


You ask, why did i say "pre june 2009" above, because after that there was an updated sdk/bsp. The above info may have changed with that update - I have not updated my local copy to the new sdk/bsp.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: GPIO access in Windows CE

Post by nicolas » Tue Sep 08, 2009 12:45 pm

Oh, found this
http://74.125.155.132/search?q=cache:Gd ... =firefox-a

Im quite interested, will give that a try later.

PS. I think the above is making use of the OpenNetCF.IO (smart devices framework) library

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: GPIO access in Windows CE

Post by nicolas » Thu Sep 10, 2009 7:03 pm

I have sucedded in toggling the IO.
Using the Opennetcf.io library.

The standard library will not work, there is a problem with the WriteIn32 call.
The developers sent me a revised C# update which works.

I will post the sample code later, and the updated library.
Stay tuned.

cyberscan
Posts: 10
Joined: Tue Aug 25, 2009 1:30 pm

Re: GPIO access in Windows CE

Post by cyberscan » Thu Oct 01, 2009 3:48 pm

Nicholas,
I am interested in WinCE 5.0 GPIO driver for the 2440 GPIO connector. Can you provide?
Thanks.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: GPIO access in Windows CE

Post by nicolas » Fri Oct 02, 2009 2:35 am

Until i get time to put up the full example. Read up on "Physical Address Pointer" class in the OpenNETCF library. A quick google search will do the trick.

You will want to access the S3C2440 registers based on the datasheet.

I hope to have the samples up sometime this weekend.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: GPIO access in Windows CE

Post by nicolas » Thu Oct 08, 2009 6:52 pm

Ive finally cleaned up my sample and made it available at viewtopic.php?f=15&t=163
Should be self explanatory.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests