#include "Display.h" #include #include #include #include static std::shared_ptr createTouch() { auto config = std::make_unique( CYD_TOUCH_MOSI_PIN, CYD_TOUCH_MISO_PIN, CYD_TOUCH_SCK_PIN, CYD_TOUCH_CS_PIN, CYD_DISPLAY_HORIZONTAL_RESOLUTION, CYD_DISPLAY_VERTICAL_RESOLUTION, false, true, false ); return std::make_shared(std::move(config)); } std::shared_ptr createDisplay() { auto configuration = std::make_unique( CYD_DISPLAY_SPI_HOST, CYD_DISPLAY_PIN_CS, CYD_DISPLAY_PIN_DC, CYD_DISPLAY_HORIZONTAL_RESOLUTION, CYD_DISPLAY_VERTICAL_RESOLUTION, createTouch(), false, true, false, false, 0, LCD_RGB_ELEMENT_ORDER_BGR ); configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; return std::make_shared(std::move(configuration)); }