Emwin graphic library (BSP) has error when touch screen is disabled

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Emwin graphic library (BSP) has error when touch screen is disabled

605 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mh.hoseinzade on Mon Dec 14 00:00:38 MST 2015
Hi every body
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:

Error[Pe020]: identifier "_IsInited" is undefined C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1600
Error[Pe223]: function "_CheckUpdateTouch" declared implicitly C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1603
Error[Pe223]: function "_SSP_SendCmd" declared implicitly C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1604
Error[Pe020]: identifier "_PenIsDown" is undefined C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1606
Error[Pe020]: identifier "_PenIsDown" is undefined C:\NXP\emWin\NXP_emWin522_BSP\Start\Config\LCDConf.c 1608
Error while running C/C++ Compiler

Can anybody guide me?
Labels (1)
0 Kudos
4 Replies

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mh.hoseinzade on Wed Dec 16 10:27:19 MST 2015
Thank you "mc"
I do all of these and the program compiled successfully. however when I load the program to LPC1788, It does not work
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:

static unsigned char _I2C_CheckStatus(void) {
  unsigned char r = 0;

  //
  // Wait for I2C status to change
  //
[color=#f00] while ((I2C_CONSET & (1 << 3)) == 0) {  // SI == 0[/color]
  }
  //
  // Read I2C state
  //
  r = I2C_STAT;

  return r;
}

what do you think about it? what is the problem?
0 Kudos

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Dec 15 20:39:12 MST 2015
Hi
Please comment below code in LCDConf.c

Quote:
/*void ExecTouch(void) {
  GUI_PID_STATE State;
  int           HasUpdate;

  if (_IsInited == 0) {
    return;
  }
  HasUpdate = _CheckUpdateTouch();
  _SSP_SendCmd(PWRDOWN);
  if (HasUpdate) {
    _PenIsDown = 1;
    GUI_TOUCH_Exec();
  } else if (_PenIsDown) {
    //
    // No further touch event after at least one touch event means we have
    // lift the pen from the touch screen which means a click.
    //
    _PenIsDown = 0;
    GUI_PID_GetState(&State);
    State.Pressed = 0;
    GUI_PID_StoreState(&State);
  }
}*/



Also comment below code in HWConf.c

Quote:
/*
  if (TouchCnt == TOUCH_TIMER_INTERVAL) {
    ExecTouch();
    TouchCnt = 0;
  } else {
    TouchCnt++;
  }*/

0 Kudos

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Tue Dec 15 08:41:29 MST 2015
try the emWin forum on the Segger site?
0 Kudos

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mh.hoseinzade on Tue Dec 15 08:32:17 MST 2015
Can anybody help me?
0 Kudos