#include #include #include #include #include #include #include #include //#include //#define CANVAS_BUFFER_SIZE (3600) using namespace touchgfx; #ifdef __linux__ int main(int argc, char** argv) { #else #include #ifdef _UNICODE #error Cannot run in unicode mode #endif int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int argc; char** argv = touchgfx::HALSDL2::getArgv(&argc); #endif touchgfx::NoDMA dma; //For windows/linux, DMA transfers are simulated LCD& lcd = setupLCD(); touchgfx::SDL2TouchController tc; touchgfx::HAL& hal = touchgfx::touchgfx_generic_init(dma, lcd, tc, SIM_WIDTH, SIM_HEIGHT, 0, 0); setupSimulator(argc, argv, hal); // Ensure there is a console window to print to using printf() or // std::cout, and read from using e.g. fgets or std::cin. // Alternatively, instead of using printf(), always use // touchgfx_printf() which will ensure there is a console to write // to. //touchgfx_enable_stdio(); // Setup the CanvasWidgetRenderer. ONLY needed if you use CanvasWidgets // in your application. The CANVAS_BUFFER_SIZE can be adjusted to match // your needs in performance vs. RAM usage. Read more on this in the // TouchGFX Manual. //static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE]; //touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE); touchgfx::HAL::getInstance()->taskEntry(); //Never returns return EXIT_SUCCESS; }