<?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>LPC Microcontrollers中的主题 Re: Emwin graphic library (BSP) has error when touch screen is disabled</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517638#M2290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mh.hoseinzade on Wed Dec 16 10:27:19 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you "mc"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do all of these and the program compiled successfully. however when I load the program to LPC1788, It does not work&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In debug I realized that the CPU hang up in the GUI_init() and when I break program execution, I saw that the cpu hang up in the I2C routine, specifically in the following routine and in the instruction I specified by red collor:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static unsigned char _I2C_CheckStatus(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; unsigned char r = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Wait for I2C status to change&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [color=#f00] while ((I2C_CONSET &amp;amp; (1 &amp;lt;&amp;lt; 3)) == 0) {&amp;nbsp; // SI == 0[/color]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Read I2C state&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; r = I2C_STAT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return r;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what do you think about it? what is the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:30:27 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:30:27Z</dc:date>
    <item>
      <title>Emwin graphic library (BSP) has error when touch screen is disabled</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517634#M2286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mh.hoseinzade on Mon Dec 14 00:00:38 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi every body&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the Emwin (BSP) library and I don't need the touch screen. I disable the touch screen in the GUIConf.h, by setting the GUI_SUPPORT_TOUCH to zero. when I compile the program, it has some errors:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error[Pe020]: identifier "_IsInited" is undefined C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1600 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error[Pe223]: function "_CheckUpdateTouch" declared implicitly C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1603 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error[Pe223]: function "_SSP_SendCmd" declared implicitly C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1604 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error[Pe020]: identifier "_PenIsDown" is undefined C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1606 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error[Pe020]: identifier "_PenIsDown" is undefined C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1608 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error while running C/C++ Compiler &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody guide me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:30:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517634#M2286</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Emwin graphic library (BSP) has error when touch screen is disabled</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517635#M2287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mh.hoseinzade on Tue Dec 15 08:32:17 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody help me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:30:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517635#M2287</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Emwin graphic library (BSP) has error when touch screen is disabled</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517636#M2288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vtw.433e on Tue Dec 15 08:41:29 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;try the emWin forum on the Segger site?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:30:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517636#M2288</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Emwin graphic library (BSP) has error when touch screen is disabled</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517637#M2289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Tue Dec 15 20:39:12 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please comment below code in LCDConf.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;/*void ExecTouch(void) {&lt;BR /&gt;&amp;nbsp; GUI_PID_STATE State;&lt;BR /&gt;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HasUpdate;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if (_IsInited == 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; HasUpdate = _CheckUpdateTouch();&lt;BR /&gt;&amp;nbsp; _SSP_SendCmd(PWRDOWN);&lt;BR /&gt;&amp;nbsp; if (HasUpdate) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _PenIsDown = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GUI_TOUCH_Exec();&lt;BR /&gt;&amp;nbsp; } else if (_PenIsDown) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // No further touch event after at least one touch event means we have&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // lift the pen from the touch screen which means a click.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _PenIsDown = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GUI_PID_GetState(&amp;amp;State);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; State.Pressed = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GUI_PID_StoreState(&amp;amp;State);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}*/&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also comment below code in HWConf.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;/*&lt;BR /&gt;&amp;nbsp; if (TouchCnt == TOUCH_TIMER_INTERVAL) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecTouch();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TouchCnt = 0;&lt;BR /&gt;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TouchCnt++;&lt;BR /&gt;&amp;nbsp; }*/&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:30:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517637#M2289</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Emwin graphic library (BSP) has error when touch screen is disabled</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517638#M2290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mh.hoseinzade on Wed Dec 16 10:27:19 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you "mc"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do all of these and the program compiled successfully. however when I load the program to LPC1788, It does not work&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In debug I realized that the CPU hang up in the GUI_init() and when I break program execution, I saw that the cpu hang up in the I2C routine, specifically in the following routine and in the instruction I specified by red collor:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static unsigned char _I2C_CheckStatus(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; unsigned char r = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Wait for I2C status to change&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [color=#f00] while ((I2C_CONSET &amp;amp; (1 &amp;lt;&amp;lt; 3)) == 0) {&amp;nbsp; // SI == 0[/color]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Read I2C state&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; r = I2C_STAT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return r;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what do you think about it? what is the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:30:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Emwin-graphic-library-BSP-has-error-when-touch-screen-is/m-p/517638#M2290</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:30:27Z</dc:date>
    </item>
  </channel>
</rss>

