#include "Display.h" #include #include #include std::shared_ptr createTouch() { auto configuration = std::make_unique( CROWPANEL_LCD_SPI_HOST, CROWPANEL_TOUCH_PIN_CS, 240, 320, false, true, false ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); auto configuration = std::make_unique( CROWPANEL_LCD_SPI_HOST, CROWPANEL_LCD_PIN_CS, CROWPANEL_LCD_PIN_DC, 240, 320, touch ); configuration->mirrorX = true; configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; auto display = std::make_shared(std::move(configuration)); return std::reinterpret_pointer_cast(display); }