#include "Display.h" #include #include #include std::shared_ptr _Nullable createTouch() { auto configuration = std::make_unique( I2C_NUM_0, 240, 240, false, true, true, GPIO_NUM_13, GPIO_NUM_5 ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); auto configuration = std::make_unique( SPI2_HOST, GPIO_NUM_9, GPIO_NUM_8, 240, 240, touch, false, false, true, true, 0, LCD_RGB_ELEMENT_ORDER_BGR ); configuration->resetPin = GPIO_NUM_14; configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; auto display = std::make_shared(std::move(configuration)); return std::reinterpret_pointer_cast(display); }