#include "Display.h" #include std::shared_ptr createDisplay() { auto configuration = std::make_unique( SPI2_HOST, GPIO_NUM_40, // CS GPIO_NUM_5, // DC 400, // Width 300, // Height nullptr, // Touch device false, // swapXY false, // mirrorX false, // mirrorY true, // invertColor - initial true to match existing inverted look, user can toggle via Settings->Display 0 // bufferSize (0 = default, which is full screen = 120,000 pixels) ); configuration->resetPin = GPIO_NUM_41; auto display = std::make_shared(std::move(configuration)); return std::reinterpret_pointer_cast(display); }