#include "Display.h" #include #include #include static std::shared_ptr createTouch() { auto configuration = std::make_unique( I2C_NUM_0, LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); auto configuration = std::make_unique( LCD_SPI_HOST, LCD_PIN_CS, LCD_PIN_DC, LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, touch, false, true, false, false ); configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; auto display = std::make_shared(std::move(configuration)); return std::reinterpret_pointer_cast(display); }