Add display color inversion flag and logic for Feather TFT

This commit is contained in:
Adolfo Reyna
2026-01-30 23:02:53 -05:00
parent 45cbcc8384
commit d2fd001e70
4 changed files with 28 additions and 14 deletions

View File

@@ -22,7 +22,12 @@ LowLevelDisplay* LowLevelDisplay::create(DisplayType type, int width, int height
.gpio_bl = DISPLAY_BL_PIN,
};
printf("Creating ST7796 display (%dx%d)\n", width, height);
return new LowLevelDisplayST7796(&lcd_config, width, height);
// Use board config flag for color inversion
#ifdef DISPLAY_INVERT_COLOR
return new LowLevelDisplayST7796(&lcd_config, width, height, DISPLAY_INVERT_COLOR);
#else
return new LowLevelDisplayST7796(&lcd_config, width, height, false);
#endif
}
case DISPLAY_TYPE_ST7789: {