You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've managed to get my ST7789V based display working almost correctly, however, I noticed the cursor was disappearing off of the right hand side of the screen. I used the command:
xdpyinfo | grep -oP 'dimensions:\s+\K\S+'
Which reports that my resolution is 960x320. 960 is a multiple of both 320 and 240 so I must have messed up a setting somewhere.
Below are the changes I made to the files. This is on a fresh install of Raspbian on a CM4 plugged into the IO board. Ignore the [!], these aren't in the code, I just used them for syntax highlighting.
config.h:
// If defined, rotates the display 180 degrees. This might not rotate the panel scan order though,
// so adding this can cause up to one vsync worth of extra display latency. It is best to avoid this and
// install the display in its natural rotation order, if possible.
! #define DISPLAY_ROTATE_180_DEGREES
// If defined, displays in landscape. Undefine to display in portrait.
! //#define DISPLAY_OUTPUT_LANDSCAPE
#ifdef ST7789
// The ST7789 controller is actually a unit with 320x240 graphics memory area, but only 240x240 portion
// of it is displayed. Therefore if we wanted to swap row address mode above, writes to Y=0...239 range will actually land in
// memory in row addresses Y = 319-(0...239) = 319...80 range. To view this range, we must scroll the view by +80 units in Y
// direction so that contents of Y=80...319 is displayed instead of Y=0...239.
if ((madctl & MADCTL_ROW_ADDRESS_ORDER_SWAP))
! SPI_TRANSFER(0x37/*VSCSAD: Vertical Scroll Start Address of RAM*/, 0, 0);#endif
I've managed to get my ST7789V based display working almost correctly, however, I noticed the cursor was disappearing off of the right hand side of the screen. I used the command:
Which reports that my resolution is 960x320. 960 is a multiple of both 320 and 240 so I must have messed up a setting somewhere.
The display I am using is the Phoenix Contact 1226370.
Below are the changes I made to the files. This is on a fresh install of Raspbian on a CM4 plugged into the IO board. Ignore the [!], these aren't in the code, I just used them for syntax highlighting.
The cmake command I used was:
Thank you in advance.
The text was updated successfully, but these errors were encountered: