Backlight Control

Post Reply
dezso
Posts: 65
Joined: Tue Mar 08, 2011 11:11 am

Backlight Control

Post by dezso » Mon Oct 08, 2012 1:06 pm

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..

dezso
Posts: 65
Joined: Tue Mar 08, 2011 11:11 am

Re: Backlight Control

Post by dezso » Tue Oct 09, 2012 11:11 pm

Got it figured out, now I have BackLight control with PWM and BackLight Time Out from WinCE...

:arrow:
Last edited by dezso on Tue Oct 09, 2012 11:37 pm, edited 1 time in total.

esky-sh
Posts: 1435
Joined: Sat Dec 20, 2008 4:21 am

Re: Backlight Control

Post by esky-sh » Tue Oct 09, 2012 11:31 pm

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.

dezso
Posts: 65
Joined: Tue Mar 08, 2011 11:11 am

Re: Backlight Control

Post by dezso » Tue Oct 09, 2012 11:37 pm

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

dezso
Posts: 65
Joined: Tue Mar 08, 2011 11:11 am

Re: Backlight Control

Post by dezso » Fri Oct 12, 2012 6:45 am

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.

dezso
Posts: 65
Joined: Tue Mar 08, 2011 11:11 am

Re: Backlight Control

Post by dezso » Wed Oct 17, 2012 10:07 am

So I was able to integrate the Mini6410 Advanced BLC to my project, can some one try if anything missing from this package..
Attachments
BackLightDriver.rar
BackLightDriver.rar
(244.44 KiB) Downloaded 389 times

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests