AnsweredAssumed Answered

Setting backlight

Question asked by Anders Bergström on Jun 30, 2015
Latest reply on Jul 8, 2015 by Anders Bergström

Hi,

 

I am currently trying to set the backlight level for a display on a eval board.

I have read the reference manual for the i.MX51 EVK Windows Embedded Compact 7 and I have added the "BSP_PMIC_MC13892 = 1" to the BSP environment variales.

 

I use the following code without result.

 

BKL_SETTINGS_INFO bklInfo;
HANDLE hDevice = NULL;


  hDevice = CreateFile(TEXT("PMI1:"), GENERIC_READ |GENERIC_WRITE, 
  FILE_SHARE_WRITE | FILE_SHARE_READ,       // Share
  NULL,                   // No security
  OPEN_EXISTING,          // Only open...
  FILE_FLAG_RANDOM_ACCESS,// Flags
  NULL);                  // No template file

  if ((hDevice == NULL) || (hDevice == INVALID_HANDLE_VALUE))
  {
       Trace::getInstance().log(USE_LEVEL_ERROR, "Unable to open device");
  }

  bklInfo.fEnable_Battery = FALSE;
  bklInfo.fEnable_ExPower = FALSE;

  bRes = DeviceIoControl(hDevice, IOCTL_BKL_SET_SETTINGS, &bklInfo, sizeof(bklInfo), NULL, 0, NULL, NULL);

  CloseHandle(hDevice);

 

I´m not even sure that i use the correct function calls since i have not been able to find any examples of how to configure the driver.

 

Best Regards,

/ Anders

Outcomes