Hello,
The screen contents can be flipped as you have discovered, but it is difficult to write a portrait mode translation of the screen contents due to the pixel difference in the length and width.
I can recommend looking into the writeRemap() function of the TinyScreen library. We have rewritten this function to work with rotating a different, square screen using the following code:
uint8_t _rotateDisplay=1;
void TinyScreen::writeRemap(void){
uint8_t remap=(1<<5)|(1<<4)|(0<<2)|(1<<1);
if(_flipDisplay){
remap^=((1<<4)|(1<<1));
//Set_Display_Offset(0x00);
}else{
//Set_Display_Offset(0x40);
}
if(_rotateDisplay)
remap^=((1<<1)|(1<<0));
if(_mirrorDisplay)
remap^=(1<<1);
if(_bitDepth)
remap|=(1<<6);
if(_colorMode)
remap^=(1<<2);
startCommand();
TSSPI->transfer(0xA0);//set remap
TSSPI->transfer(remap);
endTransfer();
}
This does not work with the TinyScreen as is, but might be a good starting point for altering the writeRemap() function.
I hope that helps!
Thanks,
RĂ©na