mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 12:46:37 +00:00
Add invert_display runtime option
This commit is contained in:
parent
724317c6ca
commit
755b3ea825
@ -86,11 +86,11 @@ TFT_Class tft(io, controller, TFT_WIDTH, TFT_HEIGHT);
|
|||||||
/**
|
/**
|
||||||
* Initialize the ILI9341 display controller
|
* Initialize the ILI9341 display controller
|
||||||
*/
|
*/
|
||||||
void fsmc_ili9341_init(uint8_t rotation)
|
void fsmc_ili9341_init(uint8_t rotation, bool invert_display)
|
||||||
{
|
{
|
||||||
tft.init();
|
tft.init();
|
||||||
tft.setRotation(rotation);
|
tft.setRotation(rotation);
|
||||||
tft.setRotation(rotation);
|
tft.invertDisplay(invert_display);
|
||||||
tft.fillScreen(TFT_DARKCYAN);
|
tft.fillScreen(TFT_DARKCYAN);
|
||||||
int x = (tft.width() - logoWidth) / 2;
|
int x = (tft.width() - logoWidth) / 2;
|
||||||
int y = (tft.height() - logoHeight) / 2;
|
int y = (tft.height() - logoHeight) / 2;
|
||||||
|
@ -40,7 +40,7 @@ extern "C" {
|
|||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
void fsmc_ili9341_init(uint8_t rotation);
|
void fsmc_ili9341_init(uint8_t rotation, bool invert_display);
|
||||||
void fsmc_ili9341_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p);
|
void fsmc_ili9341_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p);
|
||||||
// void fsmc_ili9341_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p);
|
// void fsmc_ili9341_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p);
|
||||||
// void fsmc_ili9341_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color);
|
// void fsmc_ili9341_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user