Page 2 of 2

Re: backlight control

Posted: Thu Oct 15, 2009 11:33 pm
by armboarder
My knowledge :
Assuming you are in user mode (application). Each pointer (which is a VitrualAdress) is intercepted by MMU, and then translated to physical adress.
I don't know how WinCE works, so :
- If my application manipulates a physical pointer does the MMU try to translate it ?
- Does it give access violation error ?

Re: backlight control

Posted: Thu Oct 15, 2009 11:50 pm
by nicolas
I have not done any C work in relation to the registers, only managed code.

What I did find was looking thru the wince drivers, specifically LEDDriver.cpp
It has some code that initializes the memory address (s2440IOP) and also deals with the registers.

Im sure this can be extrapolated to user mode.

The method calls are also reinforced via the post here http://social.msdn.microsoft.com/forums ... 29055180b2 (different platform but same desired goal)

Re: backlight control

Posted: Fri Oct 16, 2009 4:06 am
by armboarder
Thank you for the link.
Now I've figured how to access physical registries under user mode. If I understand correctly, we must first reserve virtual memory by using VirtualAlloc then use VirtualCopy (which is unavailable under Win32 ) to map virtual memory to the physical memory.
So now, I just need to do the initialization which described once in my application then call the backlight driver to set different PWM value ?
I didn't look at the interface of the driver yet.
How is going with CFIO.dll, did you succeed to set different brightness value ?

Re: backlight control

Posted: Fri Oct 16, 2009 8:11 am
by nicolas
Once you can write to the registers the rest is a breeze.
While the mini2440 has several pwm pins, I have been unable to find the configuration needed to actually control brightness.
The pin responsible is Port G.4

At the moment I have only been able to turn on/off the backlight.

I have the sample almost ready and will be posting it in the next day or so.

Re: backlight control

Posted: Wed Oct 28, 2009 10:57 pm
by spinbot
Hey nicolas,

Thanks for you great work. Any chance of releasing the code that controls the back light?

Cheers

Re: backlight control

Posted: Fri Oct 30, 2009 2:12 am
by nicolas
Ill post up the VB.Net sample soon. Just been so busy and I had to reinstall windows yesterday.

With the information on the first page and the other sample i released, the LED one, you should be able to put them together and accomplish the task.

Sorry its taking so long for the full sample.