This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BOOSTXL-SHARP128: Bug in SharpGrLib.c

Part Number: BOOSTXL-SHARP128
Other Parts Discussed in Thread: SYSCONFIG

While trying to interface the AdaFruit 144x168 Sharp memory display with the CC1352R-LPSTK, I discovered what I think is a logic error in the SharpGrLib.c graphics library.

Namely, all instance of this assignment:

    uint16_t heigth = pDisplay->heigth;

should be replaced with:

    uint16_t width = pDisplay->width;

And every place where the local variable 'heigth' is used should be replaced with 'width'.

The reason the driver works with the 128x128 Sharp LCD is that height and width are the same, 128. When the width is different than the height, as in the AdaFruit Sharp display, the computation of the display buffer address associated with a pixel is incorrect.

I would further suggest that the Display module's SysConfig content be enhanced to support 'lcdHeight' and 'lcdWidth' values rather than 'lcdSize' so that a user can easily adapt the Display driver to work with Sharp LCDs that are not square.

Alan