Tuesday, April 24th 2018, 6:36pm UTC+2

You are not logged in.

  • Login
  • Register

Mr. Spock

Beginner

Date of registration: May 19th 2009

Posts: 22

1

Monday, March 12th 2018, 3:29pm

SSD1963 : GUI_GetPixelIndex()

Hi

This function has an error. It first set column and page address and then should set a read_memory_start (0x2e) but instead it sets a write_memory_start (0x2c).


Regards

Mr. Spock

Beginner

Date of registration: May 19th 2009

Posts: 22

2

Tuesday, March 13th 2018, 2:30pm

Hi

Writing a pixel and reading it back gives different values:

GUI_DrawPixel(0, 0);
pixel = GUI_GetPixelIndex(0, 0);




If I use my own function it works OK


GUI_DrawPixel(0, 0);
pixel = _GUI_GetPixelIndex(0, 0);


Regards

Mr. Spock

Beginner

Date of registration: May 19th 2009

Posts: 22

3

Tuesday, March 13th 2018, 5:26pm

Workaround :


U16 LCD_DEVFUNC_READPIXEL_CUSTOM(int LayerIndex)
{
PortAPI.pfWrite16_A0(0x2e);
return PortAPI.pfRead16_A1();
}


void LCD_X_Config(void)

{
.
.
.
.
LCD_SetDevFunc(0, LCD_DEVFUNC_READPIXEL, LCD_DEVFUNC_READPIXEL_CUSTOM);

}

Same can be used for LCD_DEVFUNC_READMPIXELS function

Regards