These display drivers always write color data to the screen region defined by their row address (RA) and column address (CA) registers.
The SPI command to update the addresses in these registers are RASET and CASET. It is not necessary to re-transmit RASET/CASET when refreshing the color data in the same address window repeatedly.
Apparently, it is extremely common for graphics drivers to refresh a fixed region of the display (full-screen refresh, dirty rectangles, bitmap fonts/sprites, etc.). So this optimization yields a substantial performance improvement in nearly all cases without penalty.
Also, the call to writecommand(ST7735_RAMWR) has been refactored into the setAddr routine. You can easily see from the patch that this command is always transmitted immediately following calls to setAddr. So this merely reduces a lot of duplicate lines.
These display drivers always write color data to the screen region defined by their row address (
RA
) and column address (CA
) registers.The SPI command to update the addresses in these registers are
RASET
andCASET
. It is not necessary to re-transmitRASET
/CASET
when refreshing the color data in the same address window repeatedly.Apparently, it is extremely common for graphics drivers to refresh a fixed region of the display (full-screen refresh, dirty rectangles, bitmap fonts/sprites, etc.). So this optimization yields a substantial performance improvement in nearly all cases without penalty.
Also, the call to
writecommand(ST7735_RAMWR)
has been refactored into thesetAddr
routine. You can easily see from the patch that this command is always transmitted immediately following calls tosetAddr
. So this merely reduces a lot of duplicate lines.