#include "Display.h" #include #include #include static std::shared_ptr createTouch() { auto configuration = std::make_unique( I2C_NUM_0, 240, 320 ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); auto configuration = std::make_unique( SPI2_HOST, GPIO_NUM_15, GPIO_NUM_2, 240, 320, touch, true, true, true, true, 0, LCD_RGB_ELEMENT_ORDER_RGB ); configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; auto display = std::make_shared(std::move(configuration)); return std::reinterpret_pointer_cast(display); }