Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flip screen function #544

Closed
eugenner opened this issue Feb 11, 2020 · 1 comment
Closed

Flip screen function #544

eugenner opened this issue Feb 11, 2020 · 1 comment
Labels

Comments

@eugenner
Copy link

Hi, thanks for nice working library,
but is there any simple workaround to get possibility to flip screen content?
It is useful sometimes when text should be reflected by mirror...

@Bodmer
Copy link
Owner

Bodmer commented Feb 15, 2020

There is a control register 0x36 (MADCTL) that sets mirroring, it is used by the rotation function, for example here for the ILI9341 driver. The bits in the data byte are define here for the ILI9341. The bit functions are:

#define TFT_MAD_MY 0x80 // Mirror rows
#define TFT_MAD_MX 0x40 // Mirror columns
#define TFT_MAD_MV 0x20 // Row and column exchange
#define TFT_MAD_ML 0x10 // Vertical refresh order
#define TFT_MAD_BGR 0x08 // RGB or BRG colour order
#define TFT_MAD_MH 0x04 // Horizontal refresh order

Check the data sheet for your TFT controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants