#include "Display.h" #include #include #include static constexpr size_t JC3248W535C_LCD_DRAW_BUFFER_SIZE = 320 * 480; static std::shared_ptr createTouch() { auto configuration = std::make_unique( I2C_NUM_0, 320, // width 480, // height false, // mirror_x false, // mirror_y false // swap_xy ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); auto configuration = std::make_unique( SPI2_HOST, GPIO_NUM_45, //CS GPIO_NUM_NC, //DC GPIO_NUM_NC, //RST GPIO_NUM_38, //TE 320, // width 480, // height touch, false, // swap_xy false, // mirror_x false, // mirror_y false, // invert color JC3248W535C_LCD_DRAW_BUFFER_SIZE ); configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; return std::make_shared(std::move(configuration)); }