#include "CrowPanelDisplay.h" #include "CrowPanelDisplayConstants.h" #include #include #include std::shared_ptr createTouch() { auto configuration = std::make_unique( CROWPANEL_LCD_SPI_HOST, CROWPANEL_TOUCH_PIN_CS, 320, 480, true, true, true ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); /** * This display is mirrored on X, but that doesn't seem to work with the driver. * Instead, we swap XY, which does work. That results in a landscape image. */ auto configuration = std::make_unique( CROWPANEL_LCD_SPI_HOST, CROWPANEL_LCD_PIN_CS, CROWPANEL_LCD_PIN_DC, 480, 320, touch, true, false, false ); configuration->mirrorX = true; configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; return std::make_shared(std::move(configuration)); }