#include "CrowPanelDisplay.h" #include "CrowPanelDisplayConstants.h" #include #include #include #define TAG "crowpanel_display" static std::shared_ptr createTouch() { // Note for future changes: Reset pin is 48 and interrupt pin is 47 auto configuration = std::make_unique( I2C_NUM_0, 320, 480 ); return std::make_shared(std::move(configuration)); } std::shared_ptr createDisplay() { auto touch = createTouch(); auto configuration = std::make_unique( CROWPANEL_LCD_SPI_HOST, CROWPANEL_LCD_PIN_CS, CROWPANEL_LCD_PIN_DC, CROWPANEL_LCD_HORIZONTAL_RESOLUTION, CROWPANEL_LCD_VERTICAL_RESOLUTION, touch, false, false, false, true ); configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty; return std::make_shared(std::move(configuration)); }