Page 1 of 1

Backlight Control

Posted: Mon Oct 08, 2012 1:06 pm
by dezso
After hrs of searching managed to get something going.
Here is what i have so far.
In the s3c6410_disp.cpp there is a section where the backlight spouse to be controlled

Code: Select all

S3C6410Disp::DevPowerOn(void)
{
    DWORD dwBytes;

    //DISPDRV_INF((_T("[DISPDRV] ++S3C6410Disp::DevPowerOn()\n")));
    DISPDRV_INF((_T("[DISPDRV] S3C6410Disp::DevPowerOn()\n")));
 
    EnterCriticalSection(&m_csDevice);
//-------------------------------------------------------------
    // Power On Video Driver
    // All of HW State is restored by Video Driver
    if ( !DeviceIoControl(m_hVideoDrv, IOCTL_SVE_PM_SET_POWER_ON, NULL, 0, NULL, 0, &dwBytes, NULL) )
    {
        DISPDRV_ERR((_T("[DISPDRV:ERR] DevPowerOn() : IOCTL_SVE_PM_SET_POWER_ON Failed\n\r")));
    }

    if (m_eOutputInterface == OUTPUT_IF_RGB)
    {

//-------------------------------------------------------------
        // Backlight On
        // TODO: To be Replaced with Backlight Driver
        // This 2 line spose to turn the backligh on and off, our backlight controll connected to GPF[14] ?!?
        // I have tried to uncomment and change it to (1<<14); & (3<<28)) | (1<<28);
	// by not knowing a lot about C/C++ I'm only assume that is how should be ?!
	// regardless its not working. 
	m_pGPIOReg->GPFDAT |= (1<<15);                                        // set GPF[15] to High
        m_pGPIOReg->GPFCON = (m_pGPIOReg->GPFCON & ~(3<<30)) | (1<<30);    // set GPF[15] as Output
    }

    LeaveCriticalSection(&m_csDevice);

    //DISPDRV_INF((_T("[DISPDRV] --S3C6410Disp::DevPowerOn()\n")));

    return TRUE;
}
By leaving all in the default setting, I was able to controll the buzzer on/off/dudty cycle from the registry, now I just need to figure it out how to change the PWM output from GPF15 to 14..

Re: Backlight Control

Posted: Tue Oct 09, 2012 11:11 pm
by dezso
Got it figured out, now I have BackLight control with PWM and BackLight Time Out from WinCE...

:arrow:

Re: Backlight Control

Posted: Tue Oct 09, 2012 11:31 pm
by esky-sh
Congratulations!
There are many ways to do backlight control under wince but looks like your solution is most directly.
Normally we need a backlight driver and receive power state notification from wince power manager module.

Anyway, this is really a big event since we have had a solution for S3C6410 Wince backlight control now.

Re: Backlight Control

Posted: Tue Oct 09, 2012 11:37 pm
by dezso
I think I have learned a few thing in the last 2 days, will see if I can put together a package so you can update the BSP

http://youtu.be/ofmu74wV1n8

Re: Backlight Control

Posted: Fri Oct 12, 2012 6:45 am
by dezso
Anyone here would be able to modify the screen tab under control panel/screen.
Want to add a slider to change the "localuser/backlight/acbrightness" key, buildt a app to change the key but my experience level to shy to make the modification in the cpl applet.

Re: Backlight Control

Posted: Wed Oct 17, 2012 10:07 am
by dezso
So I was able to integrate the Mini6410 Advanced BLC to my project, can some one try if anything missing from this package..