This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GLCD_SPI_LPC1700.c: GLCD_ScrollVertical()

Hi All, Can anyone who are quite familiar with GLCD_SPI_LPC1700.c help me out? There is a vertically scroll screen function provided in that file. But that will scroll the whole screen. What i want is to scroll a certain size of window based on my design. But the code is really hard to understand. All the ops is directly to the reg without any comment. Here is just the code of the function. I don't know how to upload the attachment. The whole GLCD_SPI_LPC1700 contains 929 lines in all.

void GLCD_ScrollVertical (unsigned int dy) {
#if (LANDSCAPE == 0)
  static unsigned int y = 0;

  y = y + dy;
  while (y >= HEIGHT)//HEIGHT=320
    y -= HEIGHT;

  if (Himax) {
    wr_reg(0x01, 0x08);
    wr_reg(0x14, y>>8);                 /* VSP MSB                            */
    wr_reg(0x15, y&0xFF);               /* VSP LSB                            */
  }
  else {
    wr_reg(0x6A, y);
    wr_reg(0x61, 3);
  }
#endif
}

Anyone any advice TT? Thanks all!

Parents
  • That means that hardware has support for scrolling but only whole screen can be scrolled by LCD hardware, it might be that hardware enables setting a window and using operations on that window in which case you will have to add functionality for that.
    Anyways, you have to read documentation regarding which controller is on the LCD that you are using, see what that controller allows by hardware and extend LCD functions to enable you to do what you want with LCD controller hardware or do what you want in software in your LCD driver.

Reply
  • That means that hardware has support for scrolling but only whole screen can be scrolled by LCD hardware, it might be that hardware enables setting a window and using operations on that window in which case you will have to add functionality for that.
    Anyways, you have to read documentation regarding which controller is on the LCD that you are using, see what that controller allows by hardware and extend LCD functions to enable you to do what you want with LCD controller hardware or do what you want in software in your LCD driver.

Children
No data