Page 1 of 1

GPIO in Visual C#

Posted: Wed Nov 24, 2010 5:35 pm
by GDV
Hi,

Has anybody out there ever tried to access the GPIO lines on an AT91SAM9260-EK, runinng .NET CF2 and Visual C#?

I've been looking at the GPIO example shown by Adeneo on this forum, but it's a bit meaningless in .NET and it seems a complete overkill just to set or read a port pin!

Is there a simple solution to this problem?

Thanks.

Re: GPIO in Visual C#

Posted: Tue Nov 30, 2010 4:08 pm
by GDV
This is frustrating!

Has no one on this forum ever tried to control IO lines on their processors from Visual C# before?

I've searched on the internet for an example and have found nothing that is helpful.

Adeneo, you guys wrote the BSP for the AT91SAM9260-EK. Are you able to assist me with my query please?

I see that there is a gpio.dll in the WinCE6 \Release directory. How does one make use of this dll in Visual C#??

Thank you.

Re: GPIO in Visual C#

Posted: Tue Nov 30, 2010 4:24 pm
by CptTitanic
Try a more heavily trafficked WinCE forum?

Pretty sure you are going to have to map memory, and talk to the mapping. If you want it "simple" you wouldn't be doing it in user space.

Re: GPIO in Visual C#

Posted: Thu Aug 18, 2011 8:06 am
by phungn
Hi,
From .net app, you can use P-Invoke to call into the C/C++ dll.
Remember to add the .Net Compact Framework 2.0 or 3.5 component to your image.

Good luck