<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting backlight in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443860#M68296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to Windows Embedded so i might got something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I im trying to use the functions, as described in the reference manual, to initialy read the backlight level without any success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14364220453349922 jive_text_macro" data-renderedposition="134_8_1232_576" jivemacro_uid="_14364220453349922"&gt;&lt;P&gt;HANDLE hDevice = NULL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; UINT8 lvl = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hDevice = CreateFile(TEXT("PMI1:"), GENERIC_READ |GENERIC_WRITE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE_SHARE_WRITE | FILE_SHARE_READ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Share&lt;/P&gt;&lt;P&gt;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No security&lt;/P&gt;&lt;P&gt;&amp;nbsp; OPEN_EXISTING,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Only open...&lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE_FLAG_RANDOM_ACCESS,// Flags&lt;/P&gt;&lt;P&gt;&amp;nbsp; NULL);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No template file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ((hDevice == NULL) || (hDevice == INVALID_HANDLE_VALUE))&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Unable to open device");&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetCurrentLevel(BACKLIGHT_MAIN_DISPLAY, &amp;amp;lvl);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Backlight level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetCurrentLevel(BACKLIGHT_AUX_DISPLAY, &amp;amp;lvl);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Backlight 2 level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetCurrentLevel(BACKLIGHT_KEYPAD, &amp;amp;lvl);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Backlight 3 level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetDutyCycle(BACKLIGHT_MAIN_DISPLAY, &amp;amp;lvl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Duty cycle level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetDutyCycle(BACKLIGHT_AUX_DISPLAY, &amp;amp;lvl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Duty cycle 2 level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetDutyCycle(BACKLIGHT_KEYPAD, &amp;amp;lvl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Duty cycle 3 level: %d", lvl);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything that needs to be done with the project settings? What files should i include.&lt;/P&gt;&lt;P&gt;That is unclear from the reference manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, there is a function called "BSPBacklightSetIntensity" in bspbacklight.cpp. Is it possible to use that one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;/ Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2015 06:09:14 GMT</pubDate>
    <dc:creator>andersbergström</dc:creator>
    <dc:date>2015-07-09T06:09:14Z</dc:date>
    <item>
      <title>Setting backlight</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443858#M68294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently trying to set the backlight level for a display on a eval board.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following code without result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1435657903182267 jive_text_macro" data-renderedposition="155_8_1232_352" jivemacro_uid="_1435657903182267"&gt;&lt;P&gt;BKL_SETTINGS_INFO bklInfo;&lt;/P&gt;&lt;P&gt;HANDLE hDevice = NULL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hDevice = CreateFile(TEXT("PMI1:"), GENERIC_READ |GENERIC_WRITE, &lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE_SHARE_WRITE | FILE_SHARE_READ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Share&lt;/P&gt;&lt;P&gt;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No security&lt;/P&gt;&lt;P&gt;&amp;nbsp; OPEN_EXISTING,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Only open...&lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE_FLAG_RANDOM_ACCESS,// Flags&lt;/P&gt;&lt;P&gt;&amp;nbsp; NULL);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No template file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ((hDevice == NULL) || (hDevice == INVALID_HANDLE_VALUE))&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Unable to open device");&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bklInfo.fEnable_Battery = FALSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bklInfo.fEnable_ExPower = FALSE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bRes = DeviceIoControl(hDevice, IOCTL_BKL_SET_SETTINGS, &amp;amp;bklInfo, sizeof(bklInfo), NULL, 0, NULL, NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CloseHandle(hDevice);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;/ Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 09:59:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443858#M68294</guid>
      <dc:creator>andersbergström</dc:creator>
      <dc:date>2015-06-30T09:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Setting backlight</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443859#M68295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anders,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PMIC driver can be tested using the following actions:&lt;/P&gt;&lt;P&gt;- The command line for running the PMIC tests is s i2cpmic&lt;/P&gt;&lt;P&gt;- Use the touch driver to test MC13892 touch function&lt;/P&gt;&lt;P&gt;- Use the battery driver to test MC13892 battery function&lt;/P&gt;&lt;P&gt;- Use the backlight driver to test MC13892 backlight function All of these actions calls the same APIs that you are trying to use and they works perfectly with the EVK, please check the chapter 15.6 of the Wince&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference manual for information about backlight APIs and signaling LED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 15:16:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443859#M68295</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2015-07-02T15:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Setting backlight</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443860#M68296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to Windows Embedded so i might got something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I im trying to use the functions, as described in the reference manual, to initialy read the backlight level without any success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14364220453349922 jive_text_macro" data-renderedposition="134_8_1232_576" jivemacro_uid="_14364220453349922"&gt;&lt;P&gt;HANDLE hDevice = NULL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; UINT8 lvl = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hDevice = CreateFile(TEXT("PMI1:"), GENERIC_READ |GENERIC_WRITE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE_SHARE_WRITE | FILE_SHARE_READ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Share&lt;/P&gt;&lt;P&gt;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No security&lt;/P&gt;&lt;P&gt;&amp;nbsp; OPEN_EXISTING,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Only open...&lt;/P&gt;&lt;P&gt;&amp;nbsp; FILE_FLAG_RANDOM_ACCESS,// Flags&lt;/P&gt;&lt;P&gt;&amp;nbsp; NULL);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No template file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ((hDevice == NULL) || (hDevice == INVALID_HANDLE_VALUE))&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Unable to open device");&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetCurrentLevel(BACKLIGHT_MAIN_DISPLAY, &amp;amp;lvl);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Backlight level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetCurrentLevel(BACKLIGHT_AUX_DISPLAY, &amp;amp;lvl);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Backlight 2 level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetCurrentLevel(BACKLIGHT_KEYPAD, &amp;amp;lvl);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Backlight 3 level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetDutyCycle(BACKLIGHT_MAIN_DISPLAY, &amp;amp;lvl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Duty cycle level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetDutyCycle(BACKLIGHT_AUX_DISPLAY, &amp;amp;lvl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Duty cycle 2 level: %d", lvl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PmicBacklightGetDutyCycle(BACKLIGHT_KEYPAD, &amp;amp;lvl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace::getInstance().log(USE_LEVEL_ERROR, "Duty cycle 3 level: %d", lvl);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything that needs to be done with the project settings? What files should i include.&lt;/P&gt;&lt;P&gt;That is unclear from the reference manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, there is a function called "BSPBacklightSetIntensity" in bspbacklight.cpp. Is it possible to use that one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;/ Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 06:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Setting-backlight/m-p/443860#M68296</guid>
      <dc:creator>andersbergström</dc:creator>
      <dc:date>2015-07-09T06:09:14Z</dc:date>
    </item>
  </channel>
</rss>

