GPIO again.

Dezso
Hello

GPIO why is so hard !!??
Honestly I have done many thing with VB, C#, WinCE 5&6 but not controlling
hardware.
I find extremely complex and under-documented how to use it, domodom
created one what does not work for me, my platform builder expired, after
""8HR"" of reinstall no go.

I have wrote 100's of small and mid scale code in Basic, C and ASM for PIC
microchip's, the IO and other peripherals are super easy to use.

I like to use IO now, not in two month when I have chewed all my nails down
to the bone.

There is so many talented people out there, can some one pleas create a dll
what can be used like MS SPOT in .Net Micro Framework.

Look at this, how easy would be to control ports like it used to be on
other micro's.

"
OutputPort led = new OutputPort(Cpu.Pin.GPIO_NONE, true);
               led.Write(!led.Read());
"

Thanks in advance.

domodom
Hello Dezso, 
What is wrong in my GPIO driver ? 
I'm not sure such a dll you ask for is possible because this dll must
access to hardware, and such a dll can not be added in a platform after
generation (for wince 6, for wince 5, i think it was possible).
domodom

Dezso
Why not can be added in design time in to VS C#, like "using
Microsoft.SPOT.Hardware;" or "using System.IO;"
It would be so much easier something like this "using GPIO;" 

The one you created need to be compiled by platform builder, my PB expired
and no mater what I do it will not reset the time limit.
Removed all component of VS, WinCE, PB, reinstalled all from scratch, no
go. 

There is got to be a way to add dll after the image generated, how would be
done if you build a software what need to use component what was not build
when the user got the hardware.

This dll what you created, isn't just need to be registered in the registry
?

Can you upload the dll somewhere ?

Thanks 
Dezso

Vladimir
2 Dezso

> I have wrote 100's of small and mid scale code in Basic, C and
> ASM for PIC microchip's, the IO and other peripherals are super
> easy to use.
Excuse me please, but what a problem to control GPIO, the more that you
have experience in C, ASM and microcontrollers?

All that you need it is obtain a way to read and write physical addresses
from the you program. GPIO ports registers has a fixed addresses, for
example GPBCON (port B control register) has address 0x56000010, GPBDAT
(port B data register) has address 0x56000014 and so on. You can find this
information in S3C2440 datasheet. To configure port and change or learn
pins state you must just read/write to this registers (memory addresses).
It is quite simply.

But you must understand that it is a PHYSICAL addresses rather that
VIRTUAL.

I am doesn't work with mini2440 from the WinCE, but I have big experience
with  S3C6410 in my Windows Mobile smartphone, I am sure that it is all
same.

You must use MmMapIoSpace function to map PHYSICAL address onto VIRTUAL
address pointer, and then use this pointer to get access to physical
address. As I say, it is quite simply.

If I can found some free time to download WindowsCE into my mini2440 then I
can write small LED blinking example to ensure in tat I say...

Best regards,
Vladimir.

PS: Excuse me for my English.

domodom
No, my dll doesn't just need to be registered, it must be seen as a system
dll by the OS, and i think it is not possible for a dll added after
generation (it's a software protection/limitation).

Vladimir, i think that the mecanism you explained is doable from an
application, but only on previous windows CE versions than 6,0 (Windows
Mobile is based on Windows CE 5,).
Under Wince 6,0, it is not more possible (that's why i made a driver and
not just a sample application).

domodom

Dezso
wow
Got it working without uploading new NK
 
Will make a detailed instruction for others :)

PhillipMorris
Can you please tell us how did you managed to do it...